WebSocketException occurred

Hi,

My application implements WebSocketListener to connect with GenesysCloud.
Suddenly a WebSocketException occurred and the websocket was disconnected (onError() was called).
-log message-
WritingThread - websocketlistener WebSocketException:Flushing frames to the server failed: Connection or outbound has closed

・What causes the WebSocketException?
・What should I investigate to determine the cause?

I am using version platform-client-v2:134.0.0.

Regards,

Hi Mkoya,

Flushing frames to the server failed" is an error message that can occur when using a WebSocket. It typically indicates a problem with sending data from the client to the server. The issue could be caused by a variety of reasons, such as a lost connection, an unreliable network, or a server that is not responding. This problem could be anywhere between the client and the server downstream.

WebSockets can be impacted by any kind of network interruption and if you get a connection broken you need to write your code to re-establish the connection. Be aware that for however long, your connection is down and being re-established and messages that would be sent over the socket are not queued.

That is why if you are building code of the state coming off of the socket, you often need to reconnect and then use the Genesys Cloud APIs for the data you are listening to grab the latest state (e.g. user presence). If this happens on a regular basis, I would open a ticket with our Care team for further investigation. They would be able to work with the services teams to determine if there were any errors on the Genesys Cloud side.

Thanks,
John Carnell
Director, Developer Engagement

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.