1

I am developing an extension on manifest 3 clapping

I don’t understand how, but I very rarely get to freeze the service worker, sometimes it just doesn’t wake up (service worker (inactive)) on call, and sometimes it’s somehow duplicated(service worker \n service worker) - and in both situation only update btn via chrome://ext helps...


  • I'm init bg by: "background": {"service_worker": "js/background.js"},

  • In bg, it has only one import at 1 line: importScripts('./basic_script.js');

  • I'm still using bg as a request manager and handler for most stuff

  • 90 percent of the code is async

  • basic_script.js is used in almost all js files (I see that the bg page for some reason writes its console logs to the devtools opened from the exts local html === maybe this is the issue?)

  • basic_script.js has const request=(data)=>{return new Promise((done)=>{ with AbortController() + fetch.then.catch combo-wombo


I can't get repeatability, once this chrome bug(?) met me after a while, today I got it almost immediately... I just update the local pages(chrome), and the background dies completely and turns off the main ability of my extension :(

I can't google/find any, because I'm stupid

Vadim
  • 306
  • 1
  • 5
  • 13
  • https://imgur.com/KVy54zW – Vadim Apr 22 '22 at 09:54
  • The question is unanswerable without [MCVE](/help/mcve). It's either a bug in Chrome (I've seen several reports with the same symptoms) or a mistake in the code that manifests in certain conditions. As a workaround try [Persistent Service Worker in Chrome Extension](https://stackoverflow.com/a/66618269). – wOxxOm Apr 22 '22 at 12:25

0 Answers0