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

Submit challenge error: [413] Rate limit exceeded: 413 #1497

Open
i-infra opened this issue Mar 21, 2024 · 6 comments
Open

Submit challenge error: [413] Rate limit exceeded: 413 #1497

i-infra opened this issue Mar 21, 2024 · 6 comments

Comments

@i-infra
Copy link
Contributor

i-infra commented Mar 21, 2024

Trying to clear a ratelimit with the submitRateLimit command, and apparently the submitRateLimit command itself can be ratelimited?

Any ideas what might be going on here? Weird times.

./signal-cli/build/install/signal-cli/bin/signal-cli -c state submitRateLimit --challenge 1711059846xxx --captcha 'signalcaptcha://signal-hcaptcha.5fad97...

....
WARN ServiceConfig - activated HTTP logging
Submit challenge error: [413] Rate limit exceeded: 413

@AsamK
Copy link
Owner

AsamK commented Mar 22, 2024

Possible ... a verbose log with -v might show if it's actually the submit rate limit call.

There are two different captcha pages, the one for "challenge" should be used: https://github.com/AsamK/signal-cli/wiki/Registration-with-captcha#get-captcha-token
Also there have been previous reports with captcha issues, if the captcha page is opened on another host than the one running signal-cli...

@i-infra
Copy link
Contributor Author

i-infra commented Mar 22, 2024

I have already learned the hard way that the CAPTCHA must be submitted from the same IP from which it is solved.

My submitRateLimit request today succeeded as expected. Closing this until I can reproduce again.

@i-infra i-infra closed this as completed Mar 22, 2024
@i-infra
Copy link
Contributor Author

i-infra commented Mar 29, 2024

excerpt from submitRateLimit invocation with verbose logs

2024-03-29T19:47:06.957-0400 [main] INFO  okhttp3.OkHttpClient - Authorization: Basic REDACTED==
2024-03-29T19:47:06.957-0400 [main] INFO  okhttp3.OkHttpClient - X-Signal-Agent: Signal-Android/7.0.2 signal-cli/0.13.2-SNAPSHOT
2024-03-29T19:47:06.957-0400 [main] INFO  okhttp3.OkHttpClient - User-Agent: Signal-Android/7.0.2 signal-cli/0.13.2-SNAPSHOT
2024-03-29T19:47:06.957-0400 [main] INFO  okhttp3.OkHttpClient -
2024-03-29T19:47:06.957-0400 [main] INFO  okhttp3.OkHttpClient - {"type":"recaptcha","token":"1711755875370","captcha":"signal-hcaptcha.5fad97ac-7d06-4e44-b18a-b950b20148ff.challenge.P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.hadwYXNza2V5xQTb-WSdjIqDB7hAP1CerwNxL1Y3iDxKpzGooVUc6a8ojncuZEDVWxvIAjFBb-4qcZZcYdZWaGob0KuGxV4oVyssg8OqUnC2OxX4gU8PsS_iOE2-RrxsgAiIUhZq7QGSISb_wA3tw-kPVFh2gJCs2Fbnpy-7wNZVG0O0EIM4O0rbb2gsgEqqKupnpRxdo-bkJmlsjCo1WEb39rrPgllbnvy6dMm13QyXlZgH2doKSvsCAm_HkQfDWRu9zWBWMRIpCmIkVrZzQ3WhdKCUW8tTCDJJ75t3K2LNpuuCUxqTUtDgUHUL0BM9peiokdC_zObYr5n6wjl6JvcR7QI2zzDvYhrQRqyWrSx6DFDrWBUlS4jqFcB4KG6egaTu46Z4GRqBJcj_jn6wt9fo5d2WaZvDk5skXAE5HhetAF7Wc081gdccVz9iG01F1rKl-mPdVG_ZPUBhLDtxKL9q91wAQeUZjNRZsxTlgiwt7KxrKhkshwglVJlAguD9iVjGf7oS4X7AiOr6DPFQiSns-TeuRwEB-C4pIJQFHFnBhcUC7JX0RlkaLxkNKnd16SNdKPSgXkRqE0JiT_Y2I4eg9RbKanIW2iTfBgfALEEzswTvatbHPEB0aT0X3RmwPWw-Yt13NALzhtnK0FUfFoASkLJK9zr4quRaLokidL6O-SWjukiFXLMMf3Y85fuhr_oRdj6bz2hAWebvHlBDow4_rT0DEp1LNWSpS5A-QbgbGjRWoylcLevpjHZv2WqJF5GupmazncDS7Yef5Bg3VDi05n3fNT0K6yrBSGgYsc_LRLMM62hZmFXGFR5LyEVntaWBL5sJ6kiVXzpCypxbXrCAcs4k40eKKfVTgx5o7-Hm80gSwrObXXmVrlyrW2Mia9zSXLIcvnZ2MS6SoY8az9xCwEY35R8m-myBRwJ3_OqOpDuHH6ASKXO3IYSYiFf4bxItkebQgvtLZFEve_wfRH1GnJncrJ0xd1A7YlgS6KFkmO0ONJ5P_9jmTRw_EFp7r5i2Y5KXi2WI_HiP0Gmv-NHXADowbxJ_fbslGUCjPBZDD8A38aH0W4IBpQggEYdGSJwXxCwHPlD5A3QdaFjnx3RCLoOIp7bp3vW0fwy5JovpGk-J5Wix-tzHbSKJm0BGQ0yXC7JCjgnNX9okTypbKwFoIbmkIGKD2Po13OsjF7UepeoHermAJqeZw3ep6SsNrntnoPYaFy3UAEzar4kHkBrZj_z9nIbEnogIPAEGIiIGxqoRraMmDDQM3G0DjszZMP7luoXDbsWs9RDWWSJRGyWVnVBPcsFzxucVgEyA-goWqdw_w3AiXI7EyZm93WVLvDQpVapQQAWIGzULDPzcmEb-4xYT4bx9PTxzGhHcv8BrTBoUSEsy9-0VZsYp796xe18MBJC9HbYjg_thIRL0DiAg7DrmXPzMvIlU3L1HycealFhgHUpCrPQSpgDducDOvwU-kI1Rmnhb5RS_nD5amjMWNjPb_hdAse_sLtwKGrsjXyA7tyACOH6yyHq_4LCRSTz_TYaMaNTQSnZ9Z1Vx43Fx7qcpJkfE3lAF_zau3FJnuJe2SpFGC40REvPEe5KXrjQUU0DxJMDwXw3HGdFjpqaDOvEJqmxHJeviZqq7XONL03gzVCxBefC6CVKNXTBl7ke0FKc_DaNleHDOZgdTaKhzaGFyZF9pZM4xrUyBomtyqDMwNTQ3ZTFkonBkAA.42K1vE9OWuq2nLNnI1R9KgbLmfzB9TFK5LIqQ_oOrO4"}
2024-03-29T19:47:06.957-0400 [main] INFO  okhttp3.OkHttpClient - --> END PUT (1930-byte body)
2024-03-29T19:47:06.957-0400 [main] DEBUG okhttp3.internal.http2.Http2 - >> 0x0000000b    29 HEADERS       END_HEADERS
2024-03-29T19:47:06.957-0400 [main] DEBUG okhttp3.internal.http2.Http2 - >> 0x0000000b  1930 DATA          END_STREAM
2024-03-29T19:47:07.114-0400 [OkHttp chat.signal.org] DEBUG okhttp3.internal.http2.Http2 - << 0x0000000b    62 HEADERS       END_STREAM|END_HEADERS
2024-03-29T19:47:07.116-0400 [main] INFO  okhttp3.OkHttpClient - <-- 413 https://chat.signal.org/v1/challenge (158ms)
2024-03-29T19:47:07.116-0400 [main] INFO  okhttp3.OkHttpClient - date: Fri, 29 Mar 2024 23:47:07 GMT
2024-03-29T19:47:07.116-0400 [main] INFO  okhttp3.OkHttpClient - retry-after: 43200
2024-03-29T19:47:07.116-0400 [main] INFO  okhttp3.OkHttpClient - x-signal-timestamp: 1711756027149
2024-03-29T19:47:07.116-0400 [main] INFO  okhttp3.OkHttpClient - content-length: 0
2024-03-29T19:47:07.116-0400 [main] INFO  okhttp3.OkHttpClient - <-- END HTTP (0-byte body)
2024-03-29T19:47:07.117-0400 [main] DEBUG o.internal.concurrent.TaskRunner - Q10001 scheduled after   0 µs: OkHttp ConnectionPool
2024-03-29T19:47:07.118-0400 [OkHttp TaskRunner] DEBUG o.internal.concurrent.TaskRunner - Q10001 starting              : OkHttp ConnectionPool
2024-03-29T19:47:07.119-0400 [OkHttp ConnectionPool] DEBUG o.internal.concurrent.TaskRunner - Q10001 run again after  45 s : OkHttp ConnectionPool
2024-03-29T19:47:07.119-0400 [OkHttp TaskRunner] DEBUG o.internal.concurrent.TaskRunner - Q10001 finished run in 674 µs: OkHttp ConnectionPool
2024-03-29T19:47:07.129-0400 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2024-03-29T19:47:07.129-0400 [main] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Before shutdown stats (total=1, active=0, idle=1, waiting=0)
2024-03-29T19:47:07.131-0400 [HikariPool-1 connection closer] DEBUG com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Closing connection com.p6spy.engine.wrapper.ConnectionWrapper@3956b302: (connection evicted)
2024-03-29T19:47:07.132-0400 [main] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - After shutdown stats (total=0, active=0, idle=0, waiting=0)
2024-03-29T19:47:07.132-0400 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
Submit challenge error: [413] Rate limit exceeded: 413
org.whispersystems.signalservice.api.push.exceptions.RateLimitException: [413] Rate limit exceeded: 413
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.validateServiceResponse(PushServiceSocket.java:2150)
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:2131)
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:2068)
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.submitRateLimitRecaptchaChallenge(PushServiceSocket.java:1257)
	at org.whispersystems.signalservice.api.SignalServiceAccountManager.submitRateLimitRecaptchaChallenge(SignalServiceAccountManager.java:961)
	at org.asamk.signal.manager.internal.ManagerImpl.submitRateLimitRecaptchaChallenge(ManagerImpl.java:417)
	at org.asamk.signal.commands.SubmitRateLimitChallengeCommand.handleCommand(SubmitRateLimitChallengeCommand.java:40)
	at org.asamk.signal.commands.CommandHandler.handleLocalCommand(CommandHandler.java:35)
	at org.asamk.signal.App.handleLocalCommand(App.java:278)
	at org.asamk.signal.App.handleCommand(App.java:179)
	at org.asamk.signal.App.init(App.java:144)
	at org.asamk.signal.Main.main(Main.java:56)
2024-03-29T19:47:07.141-0400 [main] DEBUG java.lang.Runtime - Runtime.exit() called with status: 3
java.lang.Throwable: Runtime.exit(3)
	at java.base/java.lang.Shutdown.logRuntimeExit(Shutdown.java:179)
	at java.base/java.lang.Shutdown.exit(Shutdown.java:160)
	at java.base/java.lang.Runtime.exit(Runtime.java:188)
	at java.base/java.lang.System.exit(System.java:1920)
	at org.asamk.signal.Main.main(Main.java:68)

@i-infra i-infra reopened this Mar 29, 2024
@i-infra
Copy link
Contributor Author

i-infra commented Mar 30, 2024

https://github.com/signalapp/Signal-Server/blob/c35a6487347bb4984dfb763e3849b5c32def04c8/service/src/main/java/org/whispersystems/textsecuregcm/limits/RateLimiters.java#L48C5-L48C112

It looks like this might be the expected behavior - two solves per 12 hours, after which attempts to solve will be... ratelimited.

@johe123qwe
Copy link

I have the same problem.

@i-infra
Copy link
Contributor Author

i-infra commented Apr 16, 2024

@johe123qwe the only solution I've found is to wait out the timeout.

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

3 participants