If the same error is still here after the script was moved to the root folder as wOxxOm mentioned, than you probably have an error in your background.js file. However at the time of this post there was no adequate error message on this, other than generic Service worker registration failed
.
Try to follow Simeon's workaround described here
For example you could wrap your v2 background.js
script into an error-catching service worker and import your old scripts in it:
// manifest.json
{
"name": "Throw on Register!",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background-wrapper.js"
}
}
// background-wrapper.js file
try {
importScripts("background.js");
} catch (e) {
console.error(e);
}
// background.js
console.log("start");
throw new Error("lol");
console.log("end");
After that your service worker will be registered as it is as simple as possible and you will have the error info in the console. In my case it looks like that: example
Happy moving to v3 :)