-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to retrieve anything from Duolingo ... #64
Comments
Thanks for reporting this! I confirm that I get the same.
I'll have to get back to this on Sunday.
…On Sat, Feb 18, 2023 at 2:58 AM swa72 ***@***.***> wrote:
What used to work, now shows ...
[image: 2023-02-18 11_56_31-]
<https://user-images.githubusercontent.com/17599763/219856637-91c08393-4dd4-475c-896e-c52160cc0410.png>
—
Reply to this email directly, view it on GitHub
<#64>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABO2Q4HLOMGO5BCE2F7I2SLWYCTMFANCNFSM6AAAAAAVAJACQY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
OK. It looks like something has changed in Duolingo which has broken this plugin. They may have added some extra security that rejects requests that aren't coming from their own web page or mobile apps. This plugin uses a third party code library to interact with Duolingo, and other users of that library are reporting similar issues which started in the last couple of days in the following issue KartikTalwar/Duolingo#128 . Right now it's not clear if:
I'm going to investigate more today. If it's case (1) then I might be able to make a fix. If it's (2) then our days of AnkiSyncDuolingo might be at an end. :( In either case, thanks for bringing up this issue and if I can't fix it then I'll prominently post that in the description of the plugin. |
I think this can be worked around. First, I don't think this layer of security is actually doing anything at the moment. I was able to successfully submit this as a request and get a valid JWT back:
The user-agent header appeared to be required, so I just used the one from my browser. I also found the above was the minimal input I could use and still get a valid JWT at the end. I'm not entirely sure this is replicable though. I attempted to hack it into the add on, but I didn't have success and experienced an opaque error message. Maybe I just did something wrong, maybe my experiments with cURL don't translate to python requests, or maybe there's just gremlins in the code. Long term, it also appears scraping the credentials from a login is a viable route. There's a few different ways to make it easier to grab a JWT from a given Duolingo session so we can make the request. Here's some rough ideas:
I would recommend the second approach, since it's pretty natural to log into Duolingo for end users and would be resilient against further changes to the login API. Obviously more work that just pasting in a JWT though. @JASchilz: Could you try the above request format and see if it works for you? |
Got it, James. I'm definitely interested in looking at these possibilities,
and the idea of an embedded web browser seems like it could work and the
idea is appreciated:)
I'll give it a try. Because it might take a while to get things working,
I'll put a notice on the plugin that it's temporarily out of commission.
…On Mon, Feb 20, 2023 at 6:05 PM James Kraus ***@***.***> wrote:
@JASchilz <https://github.com/JASchilz>, I opened a PR which allows for
inputting the JWT instead of a password: #65
<#65>. If the workaround
in my above message doesn't work for you, then maybe this is a potential
route forward. The copy is pretty poor, so would obviously tweaking on
instructions.
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABO2Q4C6GEKVLSZEE3ECJHTWYQPHZANCNFSM6AAAAAAVAJACQY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi folks including @swa72 ! I've created a release candidate from @jameskraus's pull request, which beautifully addresses this problem on my own machine. You can install the plugin manually from https://github.com/JASchilz/AnkiSyncDuolingo/releases/tag/2.1.0rc1 . I'll make a couple of additional help/documentation changes and perform a full release on the Anki site within the next week. |
I tried 2.1.0rc1, but it doesn't seem to be working for accounts created with Google. |
Hi @Exkywor , thanks for trying this out and letting me know.
To confirm, is it the case that you've created a password with Duolingo (separate from your Google account credentials) and the site is telling you to log in with Google? If you haven't, could you try creating a password at https://www.duolingo.com/settings/password and logging in with that? |
OK! I've published a new released on Ankiweb from the I did confirm that I also wasn't able to log in using Google, like @Exkywor, but I'm still curious to know if you found a way to log in with Duolingo username/password. Over the next week or so, I'm going to clean things up like some orphan code and an error message that you get if you close the log in browser. Thanks again to everyone reporting the issue and @jameskraus for providing a solution. I'll keep this issue open until I'm sure that we have a clean log in path for all users. |
That is the case, yeah. I created my account with Google, and later added a password, with which I tried logging in, which is when it told me that my account was created with Google. |
This may be an artifact of Duolingo’s login process. My rough understanding
is if an account exists, has SSO, and logging in fails, then it attempts to
get you to log in with SSO.
My weird experience with this was while developing the embedded auth
prototype. I accidentally wrote an infinite loop and must have triggered
some rate limiting in Duolingo. For the next day, logging in would fail and
it would tell me to log in with Google, but that was also rate limited.
Anyways, in summary, I think the auth mechanism for Duolingo is a little
funky since it doesn’t appear to be aware of some failure conditions (e.g.
rate limiting) and treats these as if you need to log in some different way
(e.g. Google SSO).
…On Tue, Mar 7, 2023 at 12:03 AM Fernando Quant ***@***.***> wrote:
To confirm, is it the case that you've created a password with Duolingo
(separate from your Google account credentials) and the site is telling you
to log in with Google?
That is the case, yeah. I created my account with Google, then I tried
logging in and it told me it was created with Google.
However, I tried again today just in case, and it seems to have gone
through without issues?
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADFKUKOAJSNYADPNG4VMPLW226TNANCNFSM6AAAAAAVAJACQY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
While login now works thanks to the fix ... can anyone confirm that you can pull new vocabulary? I've recently finished one and started another section. Yet, the add-on reports no new vocabulary to pull. |
Hi @swa72 ! I confirm that I'm able to pull new vocabulary in the sense of:
So it works in that sense, but I haven't studied anything new and then imported that using the plugin, as I'm not currently studying with Duolingo. Let us know if this helps you diagnose your case, or leaves open some questions. And as always, the plugin will import from the language that you most recently had open on the Duolingo site. |
Ok, have to correct myself. Having completed yet another section, it did pull down new vocabulary. No idea, why it didn't before ;-) Thanks for your effort. |
Confirmed that it's not working with accounts created via Facebook even if you have a proper password set-up. |
What used to work, now shows ...
The text was updated successfully, but these errors were encountered: