Private messages no longer received after websocket reconnect
See original GitHub issueTest setup:
- Latest Converse.js master
- Firefox
- A bot that sends a message to a MUC and a private chat every 5 seconds
- The following config:
websocket_url: "wss://xxx/ws",
view_mode: "fullscreen",
clear_messages_on_reconnection: true,
Everything functions fine at first. Then on the websocket server, I issue a service nginx restart
to force the websocket connection to restart. This generates log messages:
ERROR: Websocket closed unexpectedly converse-core.js:284:17
2019-10-18T12:10:24.476Z INFO: Status changed to: DISCONNECTED converse-core.js:293:21
2019-10-18T12:10:24.478Z INFO: RECONNECTING: the connection has dropped, attempting to reconnect. converse-core.js:293:21
2019-10-18T12:10:24.504Z WARNING: Could not restore session for jid: Error message: The "restore" method can only be used with a BOSH connection. converse-core.js:286:17
2019-10-18T12:10:24.504Z INFO: Status changed to: CONNECTING converse-core.js:293:21
2019-10-18T12:10:25.120Z INFO: SASL authentication succeeded. converse-core.js:293:21
2019-10-18T12:10:25.162Z INFO: Status changed to: undefined converse-core.js:293:21
2019-10-18T12:10:25.285Z INFO: Status changed to: CONNECTED converse-core.js:293:21
2019-10-18T12:10:25.287Z INFO: Reconnected
After this, the bot’s messages are still received in the MUC but no longer in the private conversation.
The same problem does not occur when using BOSH instead of websockets.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
WebSocket messages are lost while client is reconnecting
This results in that some messages from the server are lost while the client is reconnecting. Is there any way to prevent this?...
Read more >design patterns - buffering messages and send after reconnect
A solution seems to be sending a uuid from client side as message client side identifier and check it after receiving acknowledge from...
Read more >WebSockets support in ASP.NET Core - Microsoft Learn
The server receives a disconnect message only if the client sends it, which can't be done if the internet connection is lost. If...
Read more >25. WebSocket Support - Spring
The DISCONNECT may have been sent from the client, or it may also be automatically generated when the WebSocket session is closed. In...
Read more >How to Implement SignalR Automatic Reconnect with Angular
SignalR does not reconnect automatically after a disconnection. ... Generally, WebSocket connections get disconnected automatically after a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix released in version 5.0.5
We saw an issue (using Openfire), which is probably this one. We will test.