Problem with Strophe.js in Chrome while window is on background

83 views
Skip to first unread message

Georg Deuytche

unread,
Jul 27, 2022, 9:16:52 AM7/27/22
to Strophe
Hi All,

Please help with this!
In our deployment, we are experiencing the following issue:

Problem description:

In Chrome, when browser window running strophe.js has been hidden (minimized, or running on the background) for more than 5 minutes, session is disconnected due to inactivity.

Our investigation lead us to the following conclusions:

Problem details:

The problem seems to be affected by the recently introduced feature in Chrome for heavy throttling chained JavaScript timers for hidden pages.
Here is a link to an article with more information:
https://developer.chrome.com/blog/timer-throttling-in-chrome-88/

When not in an active window, this implementation affects strophe.js and leads to not sending polling requests for more than the inactivity time (60 seconds), which results in that the session is considered inactive on the server side. For this reason, the next polling request receives 404-Not Found from the server, resulting in session disconnection.

Strophe.js versions tested: 1.5.0, 1.2.6

Browser version on which the issue has been observed:
Google Chrome versions 88, 90, 93, 97, 99, 100, 103
Microsoft Edge version 100, 103

Browser versions on which the issue has NOT been reproduced:
Google Chrome version 84
Mozilla Firefox - all versions

Had someone else also hit this? Strange enough, I couldn't find a discussion on this topic, while I suspect that there should be a massive impact for everyone using strophe.js.
Is there a real solution of the problem, or at least any workaround?

Best regards,
Georg

Reply all
Reply to author
Forward
0 new messages