While using the extension, I noticed that the service worker was becoming inactive after a period of no onResponseStarted events, (i.e. not browsing for a while). I added a listener for webNavigation to then reattach the listener for onResponseStarted . Found the solution in the links below.
While using the extension, I noticed that the service worker was becoming inactive after a period of no
onResponseStarted
events, (i.e. not browsing for a while). I added a listener forwebNavigation
to then reattach the listener foronResponseStarted
. Found the solution in the links below.https://stackoverflow.com/questions/66618136/persistent-service-worker-in-chrome-extension https://developer.chrome.com/docs/extensions/reference/webNavigation/