ServiceWorker errors: inactive tab, keepAlive
See original GitHub issueIssue and Steps to Reproduce
Log in to your app; Turn on ‘Preserve log’ setting of your js console; Switch to another tab for some minutes; Go back, see errors in console before you will be redirected to auth provider;
Versions
Current latest;
Screenshots
For better search posting here are errors:
initWorker.js:105 GET http://localhost:3000/OidcKeepAliveServiceWorker.json net::ERR_FAILED
bundle.js:23846 Uncaught (in promise) TypeError: Failed to fetch
at keepAlive
OidcServiceWorker.js:262 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'access_token')
at handleFetch (OidcServiceWorker.js:262:80)
Issue Analytics
- State:
- Created a year ago
- Comments:36 (19 by maintainers)
Top Results From Across the Web
[Feature request] Allow keeping service worker alive #1558
Idea 3: keep the service worker alive. As soon as the client is closed, it stops sending "keepalive" messages, and so the SW...
Read more >Persistent Service Worker in Chrome Extension - Stack Overflow
Problem 3: SW inactivity timer isn't prolonged for a new chrome API event ... "Persistent" service worker while a connectable tab is present....
Read more >ServiceWorker is shut down every 5 minutes for manifest V3 ...
Hi. I have Browser Extension(MV2) that starts keeping websocket connection. on MV3, Service worker often changes active - inactive. MV3 does not have ......
Read more >Service Worker Issue - Not reactivating on new events
I created / deleted tabs to change the service worker from Inactive to Active. I think this method is a forcible solution.
Read more >Host and deploy ASP.NET Core Blazor WebAssembly
To disable compression, add the BlazorEnableCompression MSBuild property to ... If a 500 - Internal Server Error is received and IIS Manager ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @MidoAhmed , @chaimabenkaddour , @beanovar, The version 6.10.16, now continue fetches refresh token in background.
It work also with mobile and laptop back after a sleep mode.
Thanks. I’m curious where you found that chrome will not give enough time for http fetches to successfully complete when the tab is in the background ? I’ve done digging and all I can find is that chrome will throttle your timers to only execute every minute (even if they are scheduled to run more frequently) https://developer.chrome.com/blog/timer-throttling-in-chrome-88/
I can’t find anything that describes the amount of time you have to execute your code once the timer does trigger is limited ?