Skip to content
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

Failed to register: [413] Rate limit exceeded: 413 #1202

Closed
regan-a opened this issue Mar 17, 2023 · 31 comments
Closed

Failed to register: [413] Rate limit exceeded: 413 #1202

regan-a opened this issue Mar 17, 2023 · 31 comments

Comments

@regan-a
Copy link

regan-a commented Mar 17, 2023

I have been trying to register my land line phone number but every time I try I get the following error:

Failed to register: [413] Rate limit exceeded: 413\n

I understand that there is a limit to the number of times you are allowed to attempt a registration over a 24-hour period but I'm getting this response even if I wait a week and then submit another registration request. I'm wondering why this is happening and if there are any other reasons why I'd receive a "Rate limit exceeded" message besides hitting an actual rate limit (which in my case, seems to be 0)?

@mattwr18
Copy link

@regan-a I am also experiencing this same issue this week. I haven been trying to register a landline as well and waited two days and still getting this rate limit exceeded error on the first attempt to register.

signal-cli v0.11.4

@ddawson
Copy link

ddawson commented Mar 20, 2023

Same problem here. Have tried several times, including twice each after waiting over 24 hours, and most recently after generating a captcha token first, so I ran the command for the first time in over 24 hours with the token.

I have another number that can receive SMS that I tried. No problem there. The issue only seems to occur when attempting voice verification.

@frozen-sky
Copy link

Same issue here, without --voice it works fine. But not on landline/voice line

@frozen-sky
Copy link

frozen-sky commented Mar 28, 2023

I did some more research. In my case it seems the land-line numbers are fully blocked by signal. I discovered in an attempt to circumvent this issue, I tried to install the official Signal app on a (virtual) android device (with the idea to copy the keys to signal-cli).
It literally looks like it blocks every land line number in my country (Netherlands/+31), with the very non-descriptive "Network connection error" message (dried different source IPs and different phone numbers). The debug log showed "Bad Gateway" errors. Mobile phone numbers do work. Both in signal-cli and signal app. I tried mobile phone with voice call validation (from app), it was allowed to do, but the call never arrived.

Looks some changes at Signal side of things, that said, the "Bad Gateway" errors / Non-descriptive errors do point there are still some missing error handling or something. Hopefully this will be restored...

Edit: According to this comment, it looks like Signal will try to sent a SMS, and if it fails, they throw a 502 to the Signal app. Blocking further registration via voice or whatsover.

Edit 2: Reading the source code of the registration manager and the android app itself, it looks the policy is changed and there is now a session-based registration process, which requires to wait one minute between 'text' and 'voice' validation. This will require to provide a session ID when doing the verfication. As far as i understand (my java is not good), this is not implemented in signal-api and it probably blocking this process. The changes where pushed around the 20th of February and matches with when this was reported.

If I feel brave enough I will try to hack a session id in signal-cli...

@ddawson
Copy link

ddawson commented Mar 28, 2023

If I feel brave enough I will try to hack a session id in signal-cli...

Do let us know if you come up with something usable. Thanks.

@AsamK
Copy link
Owner

AsamK commented Mar 28, 2023

Thanks for the analysis, I've started working on updating libsignal-service-java which brings the API with the session id, but haven't finished that yet.

@frozen-sky
Copy link

I am not 100% if that will work. With land-lines/non-SMS lines, the twilio API (API used by Signal), throws an error. I am not 100% convinced if voice is possible in that session later again. Once again, i am not a java expert, so I had a hard time understanding the code.

@AsamK
Copy link
Owner

AsamK commented Apr 1, 2023

I've pushed a commit that implements the session based registration. I had success requesting a voice verification, by first requesting an sms and a minute later requesting the voice verification.
Please try the development build if it works for you now:
https://github.com/AsamK/signal-cli/actions/runs/4582714390

@ddawson
Copy link

ddawson commented Apr 1, 2023

So, just to be clear, the SMS part is required?

@AsamK
Copy link
Owner

AsamK commented Apr 1, 2023

Looks like it, I get a Rate limit exceeded: 429 error without it.

@ddawson
Copy link

ddawson commented Apr 2, 2023

Okay, I finally had an opportunity to try this. It's still not working for me. When I try the SMS method, it gives Bad response: 502. The voice verification then fails with 429. If there's something I'm doing wrong, I really can't be sure.

  • Does it matter if I first generate a CAPTCHA token and register with it, and not try without one?
  • Does it matter if I reuse the token when doing the voice step?
  • Does it matter if signal-cli still has data stored for the not-yet-registered account from previous attempts at this, i.e. should I delete what it has when I try again?

Maybe these don't matter. But there are enough moving parts, I'm not sure.

I wouldn't usually ask, but in this case, it would be nice if there were some step-by-step instructions telling exactly what to do and what not to do. Or at least exactly what you did.

@AsamK
Copy link
Owner

AsamK commented Apr 2, 2023

I tried it with a new account with a captcha the first time.
I don't know how it works exactly, someone needs to try that out.
I'd suggest first deleting the existing account data and trying again.

@frozen-sky
Copy link

I tried as well, and got the same behaviour as ddawson.

According to comment i quoted before, it looks like the "502 Bad Gateway" is a result from an error code received from Signal's Phone verifier. If I am not mistaken, this is twilio. I've created an account myself at twilio, and indeed, if I try to verify with a land-line, it immediately throws an error. Voice still works there. I think the registration backend of Signal, does not start the whole registration session if the backend throws an error, and thus, you can not finish the registration with voice after one-two minutes. So my best guess is, if twilio does not recognize your phone number as text-service-ready, there is no way to register with a land-line.

Guess have to ask the Signal folks if that will be their policy and/or if that is a bug they want to solve eventually.

@csouti-chaps
Copy link

hello, any news about this issue ?
I can't register anymore a land-line from signal-cli (with --voice param) but from android app I can do that.
But, firstly a sms is sent (even if I'm not able to receive it) and if I'm waiting 60 seconds, I can ask verification code from voice call. Maybe voice workflow requires now to try firstly with a sms step ?

@ddawson
Copy link

ddawson commented Apr 13, 2023

Also, if signal-cli is unable to do this, is there any way to do the registration on the app or something else, and then fix things so that signal-cli becomes the primary device? I know it's not as simple as just copying data over, since they almost certainly store the data in different ways. But maybe there's something.

@frozen-sky
Copy link

As far as my research went: No.
I read the code of the registration service of Signal, and if your phone number can not receive short code text messages (you can test with Twilio), you won't be able to register. Not with app, not with signal-cli, not with anything.

I want to raise this with the Signal Team to know if this is a (new?) policy from them or a bug/side effect of the changes they did. But didn't find the time yet to do that.

@frozen-sky
Copy link

@csouti-chaps, do you know if you phone number can receive short code SMS (even though they may not arrive?). As far as i understand the recent test build of signal-cli, in that case it should be able to register via first SMS, wait and then Voice.

@csouti-chaps
Copy link

@frozen-sky yes I could register my land line, by voice and exclusely with signal-cli like that :

  1. register by sms (without --voice param, even if can't receive sms)
  2. wait 60 seconds (like android app)
  3. register by voide (with --voice, I received phone call to give me verifcation code)
  4. verify...

My phone number is a land line, normally my operator (free in france) don't provide sms support.
@ddawson with this workflow you should be able to register your line with signal-cli as primary device, no ?

@ddawson
Copy link

ddawson commented Apr 14, 2023

Just to be sure this is covered: to what extent are captchas involved in that?

@csouti-chaps
Copy link

I provided one captcha for step 1 and second captcha for step 3 with this method https://github.com/AsamK/signal-cli/wiki/Registration-with-captcha

@ddawson
Copy link

ddawson commented Apr 14, 2023

Nope. Still not working for me. I still get a 502 when trying the SMS registration. There seems to be some difference depending on country or provider.

@etlweather
Copy link
Contributor

etlweather commented Apr 16, 2023

@frozen-sky yes I could register my land line, by voice and exclusely with signal-cli like that :

  1. register by sms (without --voice param, even if can't receive sms)
  2. wait 60 seconds (like android app)
  3. register by voide (with --voice, I received phone call to give me verifcation code)
  4. verify...

My phone number is a land line, normally my operator (free in france) don't provide sms support. @ddawson with this workflow you should be able to register your line with signal-cli as primary device, no ?

Worked for me, with v0.11.8 (not sure that version matter, based on release notes).

I did like written above - registered my landline without --voice, waiting a tad over 60 sec and then did with the --voice.

Perhaps location matter, I have a +1727_______ phone number.

Note: I had to use a clean number for this to work. When I tried the number I got the "rate limit" initially that got me to find this issue, I still couldn't get through.

@nblock
Copy link

nblock commented May 24, 2023

Nope. Still not working for me. I still get a 502 when trying the SMS registration. There seems to be some difference depending on country or provider.

I do have the same issue - without --voice, I get a 502 response code and with --voice, a 429 Rate limit exceeded. I tried multiple landline numbers but none of them seem to work. The workflow suggested in #1202 (comment) does not work for me, unfortunately.

@etlweather
Copy link
Contributor

You have to also use captcha. Additionally, it does not take long before you are throttled if you don't follow the steps exactly. A few tries and bang, you're on the throttle list and you have to wait quite some time before it's freed up to use again.

@ddawson
Copy link

ddawson commented May 25, 2023

You have to also use captcha.

Please read my above comments. I did consider that, and used them. It didn't help.

A few tries and bang, you're on the throttle list and you have to wait quite some time before it's freed up to use again.

How long? Days? Or even longer? Because I did wait days and made sure to get everything right, but it still didn't help.

Also, even if it's as you say, the system is too unforgiving. Something needs to change. If not how many tries are allowed, then there should be more of a warning somewhere.

@etlweather
Copy link
Contributor

How long? Days? Or even longer? Because I did wait days and made sure to get everything right, but it still didn't help.

When I got rate limtted on my cell phone (not even signal-cli) in the past due to not remembering my PIN, I was locked for a week.

Also, even if it's as you say, the system is too unforgiving. Something needs to change. If not how many tries are allowed, then there should be more of a warning somewhere.

Yes, better communication from Signal would be nice. But please understand that this is something on Signal side, not signal-cli. signal-cli is just a client connecting to Signal server and does not control how Signal server works.

@ddawson
Copy link

ddawson commented May 25, 2023

Yes, I understand that already. But I thought that needed to be said.

@theblackhole
Copy link

@frozen-sky yes I could register my land line, by voice and exclusely with signal-cli like that :

  1. register by sms (without --voice param, even if can't receive sms)
  2. wait 60 seconds (like android app)
  3. register by voide (with --voice, I received phone call to give me verifcation code)
  4. verify...

My phone number is a land line, normally my operator (free in france) don't provide sms support. @ddawson with this workflow you should be able to register your line with signal-cli as primary device, no ?

It seems that it follows the same verification procedure as that of the application (we must wait before asking for a verification call). It worked with my land line ("Free" ISP in France too), with two freshly generated captchas for each registration attempt (the first one without --voice and the second with --voice).

I updated the Wiki to reflect these changes in the verification process.

I think that the first registration attempt (with SMS) needs to "succeed" (=no reply, no error) to allow a later attempt with --voice. Following this logic, it seems normal to me to get a "429 Rate Limit Exceeded" if the first step gave an error.

Also from what I could see about the "Rate limit exceeded", it seems that there would be a difference between the 413 code and 429 one:

  • [413] Rate limit exceeded: 413 seems to indicate a real limit where you have to wait before trying again (usually at least 24h, I don't know if this is the case with Signal since OP tried after a week and it gave the same error)
  • [429] Rate limit exceeded: 429 seems to only appear for verification with --voice and therefore does not seem to indicate a real restriction since it is possible to register immediatly after by following the two-step procedure above.

@mh-g
Copy link

mh-g commented Aug 25, 2023

I have tried several landline numbers (in Germany). The sequence that worked for me was:
signal-cli -u +49XXX register
Create a captcha and use it:

signal-cli -u +49XXX register --captcha signal-hcaptcha….
signal-cli -u +49XXX register --voice
signal-cli -a +49XXX verify

(In fact, I cheated a bit and used a landline number appended by a single digit to be able to have several signal instances registered for several servers. Some of the digits got "burned" with 429 errors and waiting for >36 hours did NOT help.)

@lindes
Copy link

lindes commented Sep 24, 2023

I'm not sure if this is sufficiently related to be worth noting here, but since it's an open issue with a similar error message, I'm starting here. I can log a separate issue, and/or upgrade and try again before further stuff, but I thought I'd start by mentioning here that I'm getting the same 413 Rate limit exceeded when trying to do a different command:

signal-cli -o json receive

This gets a bunch of messages received just fine, and then finally ends with:

WARN  SendHelper - Sending failed due to rate limiting from the signal server: [413] Rate limit exceeded: 413

This from a built-from-git version wherein signal-cli --version returns signal-cli 0.11.6 (built from commit 161ec9f).

Please let me know if I should file a separate issue, and/or update and re-build first. (Though actually, noticing the very next commit after the one above, I'm definitely going to do an update and see if that helps things... going ahead and commenting anyway, just in case it's somehow useful to someone. Apologies if it's noise.)

@AsamK
Copy link
Owner

AsamK commented Oct 10, 2023

rate limit when sending messages is another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests