We are using the Twilio Programmable Chat JavaScript SDK (v. 4.0.0) to build a chat application.
We have several channels for each user and we listen on every channel for messages via the messageAdded
-Event.
After a disconnect the client is reconnecting normally, but no events for messages sent in the meantime are fired.
Example:
- User A: Client goes offline
- User B: Sends message
- User A: Client goes online
- User A: Client is "connected"
- User A: No Event for new message
We would expect that after the client has re-established connection we would get events for the "missed" messages/created channels; especially as the docs state (probably only meant for the client, but whats the point then?):
There is no need to implement shutdown/create cycle on network drops → SDK reconnects automatically after regaining network.
- Is this intended behaviour?
- What would be the best way to retrieve "missed" events? Reload channels/messages manually?
(3) Another problem we discovered is, that sometimes the client is not able to reconnect at all, which results in a lot of Retrier attempt is already in progress
, Twilsock: request timeout
error messages. Any ideas on that?