subdavis / kobo-book-downloader

A tool to download and remove DRM from your purchased Kobo.com ebooks and audiobooks.
https://pypi.org/project/kobodl/
The Unlicense
337 stars 31 forks source link

Login Failure! Incorrect CodePlease enter correct captcha code. #25

Closed ryanpcmcquen closed 3 years ago

ryanpcmcquen commented 4 years ago

Getting this after pasting the captcha response from the console. I'm making sure there aren't any crazy characters or newlines in the response.

Traceback (most recent call last):
  File "/usr/local/bin/kobodl", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kobodl/commands/user.py", line 62, in add
    actions.Login(user, password, captcha)
  File "/usr/local/lib/python3.8/site-packages/kobodl/actions.py", line 161, in Login
    kobo.Login(user.Email, password, captcha)
  File "/usr/local/lib/python3.8/site-packages/kobodl/kobo.py", line 464, in Login
    raise KoboException('Login Failure! ' + errors.text)
kobodl.kobo.KoboException: Login Failure! Incorrect CodePlease enter correct captcha code.
ryanpcmcquen commented 4 years ago

I've tried both Brave (Chromium) and Firefox.

subdavis commented 4 years ago

What about training spaces? You might have a stray space at the beginning or end.

There's really nothing I can do to help you here. I certainly can't reproduce this bug. Your best bet will probably be to create a new kobo account and see if it still happens.

Also:

NOTE: You must have a kobo email login for this tool to work (you can't use an external provider like Google or Facebook). However, you can create a NEW kobo account and link it with your existing account on the user profile page. Go to My Account -> Account Settings to link your new kobo login.

ryanpcmcquen commented 4 years ago

@subdavis, no trailing or leading spaces. I definitely have a Kobo account, although my account is quite old ... maybe that is the issue?

subdavis commented 4 years ago

Yeah, I couldn't even venture a guess. You might try creating a new account just to see if you have the same problem with a different account. The Kobo API is something of a minefield.

I'd love to help you, but there's very little I can do. You'd have to go in and dissect the HTTP response on your own. The best thing to do would be some kind of error reporting mechanism where the whole thing dumps to a file you can paste. Alas.

You could also see if TnS-hun/kobo-book-downloader works, just as a sanity check.

ryanpcmcquen commented 4 years ago

@subdavis thanks. I just made a brand new account and I am getting the same issue. I tried the browser form of the local server and the CLI.

subdavis commented 4 years ago

@ryanpcmcquen spoke too soon. This is happening for me now. Looks like Kobo changed something. I'll take a look later this evening.

Thanks for the report.

ryanpcmcquen commented 4 years ago

Probably captcha or something breaking the api? Maybe invisible recaptcha (or whatever it is called). Thanks for looking into it!

ryanpcmcquen commented 3 years ago

@subdavis, any discoveries here?

subdavis commented 3 years ago

@ryanpcmcquen thanks for the reminder. SiteKey for recaptcha changed, looks like kobo migrated to invisible recaptcha, which is good.

0.5.0 released on Pypi. Docker build is in progress. Please let me know if this doesn't resolve the problem.

ryanpcmcquen commented 3 years ago

Thank you @subdavis, it worked perfectly!