Manifest V3 Service worker registration failed
See original GitHub issueType:
- [x ] bug
- feature
- enhancement
- question
Environment:
- OS:
- Browser: Chrome
- Library Version:
I’m going to open a PR:
- yes
- [ x] no
Description:
Getting error: “Service worker registration failed” ,
"background": { "service_worker": "background.js" },
is highlighted in the error. When I build for production, the error goes away. I think it has to do with all of the code that this library adds to the background.js file when it is output.
This is from my config file:
// Chrome extension hot reloading.
isEnvDevelopment &&
new ChromeExtensionReloader({
reloadPage: true, // Force the reload of the page also
entries: {
// The entries used for the content/background scripts
background: "background",
contentScript: "content-script", // Use the entry names, not the file name or the path
},
}),
].filter(Boolean),
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:16
Top Results From Across the Web
Service worker registration failed. Chrome extension
If the worker script throws an error at installation, the worker won't be registered and you will not be getting the error information...
Read more >Manifest V3 service worker registration failed - Google Groups
I'm trying to convert an extension to Manifest V3 and begun by making the necessary changes to the manifest.json file and creating a...
Read more >Known issues when migrating to Manifest V3
This page lists major known issues that affect developers as they migrate to Manifest V3. Known issues are divided into two primary groups:....
Read more >Service worker registration failed. Cannot read property ...
... advisable to wrap the background.js via a wrapper so you'll get better error message, so if there's no action property in manifest.json....
Read more >Chrome Extension Tutorial: Migrating to Manifest V3 from V2
Manifest V3 replaces background scripts with service workers. ... and when you click it, it will say "service worker registration failed.
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 Free
Top 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
I am experiencing same issue. It’s because it injects the “webpack-extension-reloader” code in compiled background.js. That prevents the service worker from working.
Thanks makes sense!