question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ServiceWorker errors: inactive tab, keepAlive

See original GitHub issue

Issue 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

Screenshot 2022-09-15 at 12 31 13

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:open
  • Created a year ago
  • Comments:36 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
guillaume-chervetcommented, Nov 14, 2022

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.

1reaction
beanovarcommented, Sep 28, 2022

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 ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found