mk-fg / reliable-discord-client-irc-daemon

Reliable personal discord-client to irc-server translation daemon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seems like you need a captcha verification to log in

Volkor3-16 opened this issue · comments

Found this project while looking for alternatives for the now unmaintained discorcircd, unfortunately I can't even test it out because it seems it needs a captcha to log in.

This is the trace when I start the daemon.

Traceback (most recent call last):
  File "./rdircd", line 365, in _task_wrapper
    await aio_await_wrap(coro)
  File "./rdircd", line 335, in aio_await_wrap
    if inspect.isawaitable(res): res = await res
  File "./rdircd", line 1506, in ws_poller
    status = await aio_await_wrap(h.func(msg_data))
  File "./rdircd", line 335, in aio_await_wrap
    if inspect.isawaitable(res): res = await res
  File "./rdircd", line 1554, in op_hello
    await self.op_hello_auth()
  File "./rdircd", line 1559, in op_hello_auth
    token = await self.req_auth_token()
  File "./rdircd", line 1337, in req_auth_token
    auth=False, json=dict(email=email, password=pw) )
  File "./rdircd", line 1367, in req
    raise DiscordHTTPError(f'[{res.status}] {res.reason} - {body}')
DiscordHTTPError: [400] BAD REQUEST - {"captcha_key": ["captcha-required"]}

I've seen notes on captcha in bitlbee-discord, but never seen one requested from my two accounts.

Iirc it might be related to accounts with two-factor authentication (2FA) enabled, do you have that?
(not entirely sure, as it sounds like you'd need more than captcha to log into these - an actual second factor)

If not - oh well, no idea what to do about it, or how to reproduce it myself, and would actually rather not reproduce it on my account, as I hate clicking on these stupid road signs and buses for google :)

You can try bitlbee-discord and libpurple-discord (or eionrobb-discord is iirc how they call in in #bitlbee channel) as alternatives - they are much more widely-used, and this issue is probably popped-up for people there and was addressed somehow.

If you'll have time to type it out or remember about this issue, maybe let me know if you'll find anything, I'd be interested to know at least when or why this happens, but doubt I can do much to fix it in any kind of automatic way here anyway.

Oh, but guess I'll add a link to this issue to the README at least, thanks for reporting it.

bitlbee-discord has some more info on discord captchas here:
sm00th/bitlbee-discord#118

But from quick skim over the comment thread, I haven't seen if anyone said why it happens specifically, just seem to happen to some people, and then they have to work around that by setting auth token manually after solving the captcha and extracting it from browser, ouch.

Did add a note on how one can work around this issue in similar fashion as bitlbee-discord suggests in its README, here:
https://github.com/mk-fg/reliable-discord-client-irc-daemon#captcha-solving-is-required-for-login-for-some-reason

Don't think such token gets invalidated often, as usually reconnects succeed with the same one here, and that's the only place where it can change, so maybe not a big deal to extract it from the browser once.

Note that I've also added token-manual = yes option in case captcha is always required for you, to prevent rdircd from ever trying to update it automatically (as presumably it'd always fail anyway).
Didn't actually test that change, so if you get syntax error or something - let me know :)

Don't have 2FA enabled, but this is good to know. Could just be the IP/VPS I'm using.
This is the same way I had to log in with discordircd, I've been using the same token for quite a while (at least since may).
I'll test this out after Christmas, thanks for the in depth replies and quick patch.

Have a great Christmas mate :)

Thanks, and happy holidays to you as well! :)