SignalR Issue for MultipleTabs in Chrome

Jhonny Panchal 1 Reputation point
2022-10-27T04:41:53.397+00:00

Hello Team,

We have implemented the SignalR service in our Angular Project. However while opening multiple tabs in chrome like 5 tabs then somehow signalR is getting disconnected in 1 or 2 tabs after 3 hours and getting the error in undefined in on close event.

However in onclose event we have the used to start the connection again, unfortunately its not connecting. Can you please help me out for the next step so I can implement for the multiple tabs

Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
127 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 59,131 Reputation points
    2022-10-28T15:35:41.82+00:00

    Chrome aggressively shuts down inactive tabs by batching timers. You must assume any logic based in timers may not run when you expect.

    0 comments No comments

  2. Jhonny Panchal 1 Reputation point
    2022-10-29T05:14:08.827+00:00

    Thanks @Bruce (SqlWork.com) .

    Can you help me out if there is any solution for this so SignalR so not disconnect if i have open multiple tabs in Chrome.


  3. Jhonny Panchal 1 Reputation point
    2022-11-22T08:52:19.907+00:00

    @SnehaAgrawal-MSFT @Bruce (SqlWork.com)

    Can you please let me know how to resolve this below error in SignalR for multiple Tabs.

    ​ OnStart Error detail : Error: Unable to connect to the server with any of the available transports.
    Error: WebSockets failed: Error: WebSocket failed to connect. The connection could not be found on the server,
    either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets.
    If you have multiple servers check that sticky sessions are enabled. ServerSentEvents failed: Error: 'ServerSentEvents' is disabled by the client.
    LongPolling failed: Error: 'LongPolling' is disabled by the client.

    0 comments No comments