eddie3 / gogrepo

Python-based tool for downloading all your GOG.com game and bonus collections to your local computer for full offline enjoyment.
481 stars 114 forks source link

"login failed, verify your username/password and try again." error #42

Closed ghost closed 4 years ago

ghost commented 5 years ago

Does this error only occur when wrong credentials are given or also when the CAPTCHA authentication fails? I've tried importing my cookies (in Firefox, with cookies.txt).

login failed, verify your username/password and try again.

DerPit commented 5 years ago

Can't really answer the main question - but are you sure you have the right cookies? I'm using Vivaldi/Chromium and "Export Cookies 0.3.", and get two different ones offered: for gog.com and for www.gog.com. You need the gog.com ones...

evancg81 commented 5 years ago

Did you ever resolve this? I've tried everything - various cookie files, various login attempts, various passwords (in case there were invalid characters or something). I can't get this to work - just keep getting "login failed, verify your username/password and try again."

Using Windows 10 and Python3.

ghost commented 5 years ago

Did you ever resolve this? I've tried everything - various cookie files, various login attempts, various passwords (in case there were invalid characters or something). I can't get this to work - just keep getting "login failed, verify your username/password and try again."

Using Windows 10 and Python3.

I've now tried again and the login surprisingly went through! Unless I'm entirely mistaken I had deleted the exported cookie, here is the syntax from my gog-cookies.dat created by gogrepo:

#LWP-Cookies-2.0
Set-Cookie3:<the following content removed>
Set-Cookie3:<the following content removed>
Set-Cookie3:<the following content removed>
Set-Cookie3:<the following content removed>
Set-Cookie3:<the following content removed>
Set-Cookie3:<the following content removed>

All lines likely contain personally identifiable information so I can't sadly share much more.

The only gogrepo-related change I remember doing is installing OpenSSL (pip install pyopenssl) for Kalanyr/gogrepoc (which I'm not running now).

Unfortunately it was never clear to me what specifically fixed the login failed, verify your username/password and try again. error. I then started receiving the CAPTCHA error, gave up and didn't run the program until now. I recommend deleting your exported cookie file and periodically trying again, maybe once a day or so.

evancg81 commented 5 years ago

Thanks for the response! You weren't kidding about the best solution being "try again later". This is a literal copy\paste from an open console I've had. As you can tell by the timestamp, one was yesterday around 6:15pm and the other was today around 2:50pm. Literally no changes between these other than pressing up and hitting enter in the console window.

H:\GOG>python gogrepo.py login username@gmail.com password 18:14:30 | attempting gog login as 'username@gmail.com' ... 18:14:32 | login failed, verify your username/password and try again. 18:14:32 | exiting...

H:\GOG>python gogrepo.py login username@gmail.com password 14:50:07 | attempting gog login as 'username@gmail.com' ... 14:50:12 | login successful! 14:50:12 | exiting...

Maybe some weird excess activity block from GOG that the script couldn't interpret. Either way, it's running now and looking great.

tiehichi commented 5 years ago

This may be because the function of detecting reCAPTCHA has failed, and the login failure is caused by reCAPTCHA.

You can replace line 553 like this

if len(etree.findall('.//div[@class="g-recaptcha form__recaptcha"]')) > 0:

I have already submitted a pull request #43

tritigr commented 5 years ago

Maybe it is possible to circumvent the whole captcha problem by activating 2 factor authorization? At least, I havent seen a captcha for a long time...

Am 21.05.19 um 11:41 schrieb tiehichi:

This may be because the function of detecting reCAPTCHA has failed, and the login failure is caused by reCAPTCHA.

You can replace line 553 like this

|if len(etree.findall('.//div[@class="g-recaptcha form__recaptcha"]')) > 0: |

I have already submitted a pull request #43 https://github.com/eddie3/gogrepo/pull/43

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eddie3/gogrepo/issues/42?email_source=notifications&email_token=AAR72MTBJ23NMNNEOGYXOHLPWO7WPA5CNFSM4HJTBO52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV3LMUI#issuecomment-494319185, or mute the thread https://github.com/notifications/unsubscribe-auth/AAR72MQ6NAF7KCOM3HEQGL3PWO7WPANCNFSM4HJTBO5Q.

DerPit commented 5 years ago

tritigr wrote:

Maybe it is possible to circumvent the whole captcha problem by activating 2 factor authorization? At least, I havent seen a captcha for a long time...

If with 'captcha' you mean those mark-all-cars thingy, indeed, I haven't seen that for ages (if at all at GOG - cannot remember). I do use 2FA (email confirmation code). gogrepo.py login is nevertheless not producing proper cookies anymore that way. But the copy-cookies-from-browser does work well here, as long as you renew it before calling gogrepo.py.

eddie3 commented 4 years ago

Thanks @tiehichi , I merged your PR which should fix the recaptcha detection.