-
Notifications
You must be signed in to change notification settings - Fork 27
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
reCAPTCHA causing null input error #118
Comments
aw snap, they've added captcha now? do you have debug output for this? (remember to remove any passwords/tokens before posting it) |
Yep! Here's some output:
I also tried logging out of Discord and logging back in on several of my devices; they all required me to do captcha sign-in. I also tried to use my server as a SOCK5 proxy + Firefox and logged in successfully, but still received the captcha error, so I'm guessing I would have to spoof to appear to be the application itself. |
So it doesn't work even after a succesfull login from a browser? |
I'm not quite following you, forgive me; how are you using an auth-token to sign into your account? (I'm just using my email/password since I thought auths are only for bots) |
Discord requires an auth token for every request bitlbee-discord does, so it actually caches the auth token and uses that till it gets invalidated and only after that it sends the credentials to get a new one. |
It could be set on a per-account basis, maybe too many incorrect logins? Or worse, it could be the testing phase of a wider rollout. |
Probably should add support for logging in with a token now, it's not hard to get |
The option is there, it is just hidden |
Can confirm directly setting the token allows me to log in from any previously unauthorized device. Thanks a bunch guys! |
Let's leave it open since we still have to deal with the capcha somehow. Also people would be able to find the workaround here until the issue is really solved. |
How do I get a token? |
You can login with your browser with "Web Developer"(in firefox)/"Developer Tools"(in chrome) in "network" mode. You should see a POST request to "login" with a response like |
Chrome's token can also be accessed under Developer Tools --> Application, where under the local storage dropdown, select https://discordapp.com and one of the Key/Value pairs is token/(your token). |
Neat, apparently FF has something similar: Web Developer -> Storage Inspector -> Local Storage -> http://discordapp.com -> token This is way easier than monitoring "network", thanks. |
Thanks for the hint - setting token cache works for me too now :) |
Thanks for keeping this open. Would've never figured out what to do without this issue. |
Agree. Super thankful! |
there is no token Key in my storage |
you need to login for it to be stored there |
At least on firefox, the token only appears for a few moments until discord loads completely. So I had to ctrl+f5 and copy it really quickly before it disappears. |
Looks like discord changed this behavior and it would probably be easier to use the method from my earlier comment #118 (comment) |
For other folks looking, if you've got MFA on, it's on the response to the POST to https://discordapp.com/api/v6/auth/mfa/totp (rather than to |
What is "MFA on"? I see in that link a method not allowed error. Not sure what/how to affect that in bitlbee. I've looked at my qutebrowser (chromium based) local storage with sqlite3 and it shows token as X'......' I wasn't sure whether to include the X'' in the token setting, but neither seems to work anyway. I'm logged in right now in my browser (after having to do a shedload of captchas, and responding to emails), but bitlbee is failing to login. If it matters, I need to use a proxy to connect out and I've set it in the /etc/bitlbee/ conf file. I don't have any other accounts in bitlbee so I can't tell if it's a proxy issue or not. How can I debug the connection attempts? All I'm seeing is login error. Failed to get info about self. |
MFA/2FA is multi- or two-step factor authentication, means each client has to be authorized by other means (usually one-time password generated by some other device). It's on your account settings page. I'm not a developer, but if you have to deal with captchas, bitlbee might not be able to make it past them. |
Ah right. I didn't set up two-factor because I assumed it might involve giving them my mobile number, and nobody gets that apart from some important sites like my bank. |
Hi @slackhead, please see the "Debugging" section at the bottom of README. This will help you get exact requests and responses bitlbee and discord are exchanging. |
Another way to get a token with firefox and some commands, first quit firefox and do:
You can probably skip the "quit firefox" step if you copy "webappsstore.sqlite" to a different location but when I did that the token wasn't there. For most people, going to dev tools/storage pane is probably still the easiest way, but the token is very hard to reach with keyboard navigation and screen readers. (we should maybe have proper documentation and proper error messages for this?) |
Alternatively, you can skip the 'quit firefox' step if you replace To do the latter part, type quickly. Or type the query in advance: |
Is this still supposed to work? I found my token, but when I issue |
Yes, this still works.
That doesn't sound right, you should at least see some If you see "logging in" messages but it never succesfully logins you can try following |
|
Ok, so I was a bit wrong ant it doesn't report much during login, only if it errors out or successfully logs in. None of the two happens in your log, so it is still in process of logging in or parsing your discord servers. First of all make sure you are running the latest version of bitlbee-discord because we had issues with login timeouts recently (#201, #202). Then give it a bit more time, you should either see |
I'm using https://github.com/mbologna/docker-bitlbee which in turn uses 0.4.2 which is the latest. After waiting a bit it goes like this:
|
0.4.2 is the latest release, but not the latest commit. 042 was released in december 2018; #202 was fixed this month. May be time to make a new release? |
Probably. 15 months is a long time! (I say, as if I don't manage a project that's gone longer.) |
Agreed. These changes are important enough to warrant a release so that people won't get confused. I wonder though why @mbologna chose to fetch 0.4.2 specifically instead of just getting latest git HEAD like with other plugins in docker-bitlbee? |
Probably because it's your newest release. :) Would've been my go to as well. Fetching head from other peoples' repos will sooner or later break your build. I've learnt that the hard way myself. |
A Docker-based GitHub action did that to me a few weeks ago, errors popped up because it was fetching the latest (pre-release) revision instead of the last stable. Always fetch tags! |
When the project offers releases, I tend to prefer them over HEAD. And that is why you can find a mix of these approaches when looking at the plugins I included in docker-bitlbee. The reason is a simple convention: releases should more stable, as HEAD is usually bleeding edge. |
Fair enough. Although with bitlbee-discord being in maintenance mode and me always forgetting to tag new versions it is more likely that relased version will be the one not working. Not trying to change your mind though, thats a good approach in general. I've tagged 0.4.3 now with said fixes. |
Can confirm it works now :) |
Can anyone confirm it is still possible to get the token using the methods listed above? I tried Dev Tools in both Chrome and Firefox, but there doesn't seem to be a token with either method. I have 2FA enabled if that makes any difference... |
Hm, it wasn't there when I first looked but showed up after I logged out and logged in again. Worked with MFA as well. |
Managed to get the token - used Chrome in ingocnito mode + dev tools to get it from local storage. Thanks for your help! |
For anyone recently getting tokens, I've found out on Firefox at least that the
I assume Discord changed the token storage method, perhaps as a way to try to stop people from extracting it. I don't know why it shows up again in mobile view; perhaps it's part of the mobile client login process..? I have no idea. |
@digitalcircuit thanks for the writeup. I'll probably need to move the best comments from this thread to a 'Q&A' section of 'discussions'. |
@sm00th Makes sense! The need to manage tokens looks like it's affecting other clients too, as was pointed out to me on (…I also wound up making a badly drawn meme/logo as a result of the account password resets, as unexpectedly shown in the issue linked above. So… PNG and SVG, CC-0.) |
I have the same issue in that function. setting token_cache didn't help.
|
I have exactly the same error as yours. I obtained my token from firefox and set it in bitlbee. My debug output looks like this.
|
I've been seeing the same "failed to switch to websocket mode" error with the same debug messages, but only since glib2 2.70, if that bit of extra detail helps narrow it down. Downgrading to 2.68 works around it for now. |
Downgrading works for me I opened #226 about the issue. |
I had the "captcha-required" issue today and can confirm that finding the location at Dev Tools->Application->Local Storage->token works fine and I was able to log in using it (on glib 2.68; I don't know about later glib versions). For those who are having trouble, here are a couple of tips:
After you log in successfully, I'd recommend logging out again, using |
I kept getting the null error when attempting to log into Discord, and a quick debug output shows that login is failing because the reCAPTCHA code section is blank and required (thus returning a 400).
Not exactly sure how this could be bypassed given Discord doesn't like botting into user accounts; I suppose theoretically one could MAC spoof to authenticate beforehand?
The text was updated successfully, but these errors were encountered: