signal-golang / textsecure

TextSecure(signal) client package for Go
GNU General Public License v3.0
57 stars 26 forks source link

428 when sending messages #54

Open selfbc opened 2 years ago

selfbc commented 2 years ago

textsecure has stopped sending messages and now gives error 428 on send. I am still seeing a lot of unexpected closes, but this has not been preventing textsecure to work. Sometimes the unexpected closes cause messages to not be received. I am on the latest build.

time="2022/01/26 18:34:30" level=debug msg="[textsecure] Websocket Connecting to signal-server" time="2022/01/26 18:34:30" level=debug msg="[textsecure] Websocket Connected successfully" time="2022/01/26 18:34:30" level=debug msg="[textsecure] Ask for new messages" time="2022/01/26 18:34:30" level=info msg="[textsecure] No new messages" time="2022/01/26 18:34:30" level=debug msg="[textsecure] Websocket sending message" time="2022/01/26 18:34:58" level=debug msg="[textsecure-crayfish-ws] Sending websocket ping message" time="2022/01/26 18:34:58" level=debug msg="[textsecure-crayfish-ws] Received websocket pong message" time="2022/01/26 18:35:15" level=debug msg="[textsecure] Sending websocket ping message" time="2022/01/26 18:35:15" level=error msg="[textsecure] Failed to send websocket ping message" error="websocket: close sent" time="2022/01/26 18:35:15" level=debug msg="[textsecure] Closing writeWorker" time="2022/01/26 18:35:24" level=debug msg="[textsecure] Sending websocket ping message" time="2022/01/26 18:35:24" level=debug msg="[textsecure] Received websocket pong message" time="2022/01/26 18:35:30" level=debug msg="[textsecure] Websocket UnexpectedCloseError: websocket: close 1000 (normal): OK" 2022/01/26 18:35:30 websocket: close 1000 (normal): OK time="2022/01/26 18:35:33" level=debug msg="[textsecure] Websocket Connecting to signal-server" time="2022/01/26 18:35:33" level=debug msg="[textsecure] Websocket Connected successfully" time="2022/01/26 18:35:33" level=debug msg="[textsecure] Ask for new messages" time="2022/01/26 18:35:33" level=info msg="[textsecure] No new messages" time="2022/01/26 18:35:33" level=debug msg="[textsecure] Websocket sending message" time="2022/01/26 18:35:52" level=debug msg="[textsecure-crayfish-ws] Sending websocket ping message" time="2022/01/26 18:35:52" level=debug msg="[textsecure-crayfish-ws] Received websocket pong message" time="2022/01/26 18:36:05" level=debug msg="[textsecure] handleMessage" time="2022/01/26 18:36:05" level=debug msg="[textsecure] handleDataMessage 1643240165277 1643240165277 86400" time="2022/01/26 18:36:05" level=debug msg="[textsecure] PUT /v1/messages/\ 428\n" time="2022/01/26 18:36:06" level=debug msg="[textsecure] PUT /v1/messages/\ 428\n" time="2022/01/26 18:36:06" level=debug msg="[textsecure] PUT /v1/messages/\ 428\n" time="2022/01/26 18:36:06" level=debug msg="[textsecure] Websocket sending message"

selfbc commented 2 years ago

Based on signal-cli having the same issue and resolving the problem - it looks like the 428 is wanting you to complete a challenge before you can continue send messages. Could this functionality be added to textsecure and axolotl? Please see https://github.com/AsamK/signal-cli/issues/708, https://github.com/AsamK/signal-cli/commit/50e5acdf52139cc607a7bed615e4ab33912c8471, https://github.com/AsamK/signal-cli/blob/master/src/main/java/org/asamk/signal/commands/SubmitRateLimitChallengeCommand.java, and https://github.com/AsamK/signal-cli/blob/master/src/main/java/org/asamk/signal/util/SendMessageResultUtils.java for how they fixed it.