A Virtual Agent chat client isolated in own window loses session due to lack of HTTP activity on WebSockets


Description

This issue occurs after the switch to WebSockets, with no more long polling to continually touch the HTTP session. In general, this continues to works for WebSocket too, since in most contexts the UI uses a combination of HTTP request and streaming to communicate with backend services.

This is not the case with some UIs such as Virtual Agent, which only requires WebSockets. If a VA guest user publishing messages does not keep the session active, the HTTP session is eventually expired and the WebSocket connection is lost. The guest session can not be re-established after expiring. The guest user has no way of reconnecting to their previous session, since the user was anonymous.

The popup message "This support session is now closed" does not show for guest users when the agent closes an anonymous chat. When an agent closes a support session there is normally a popup on the end user's side which says the session has been closed.

Steps to Reproduce

  1. Install Virtual Agent.
  2. Open a stand alone VA chat page.
  3. Set a low session timeout (one minute is the minimum).
  4. Wait for the timeout to occur. Notice you are no longer be able to add messages.

Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

As a temporary workaround, disable web sockets and use long polling, setting the property glide.cometd.websocket.enabled to false.
 

Related Problem: PRB1362325