-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web-ext run
not working for manifest version 3
#2379
Comments
It's a feature request I guess, because its clearly mentioned in error message unsupported manifest version: 3 |
Perhaps an option like |
I guess already there are many switches, there should be a hack within them, and even if there is not, it make sense to fix it with some npmscript / waiting for firefox to adopt it then migrating to v3 |
Also it seems MV3 based extensions with service worker are not supported, e.g. > web-ext run --browser-console --firefox-preview -t firefox-desktop -s extension
Applying config file: ./package.json
Running web extension from /home/----------------------/extension
Configuring Firefox preferences for Manifest V3
Setting custom Firefox preferences: {
"extensions.manifestV3.enabled": true
}
Use --verbose or open Tools > Web Developer > Browser Console to see logging
WebExtError: installTemporaryAddon:
Error: Error: Could not install add-on at '/home/----------------------/extension/extension':
Error: background.service_worker is currently disabled
at RemoteFirefox.installTemporaryAddon (file:///home/----------------------/extension/node_modules/web-ext/lib/firefox/remote.js:100:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async FirefoxDesktopExtensionRunner.startFirefoxInstance (file:///home/----------------------/extension/node_modules/web-ext/lib/extension-runners/firefox-desktop.js:227:27)
at async FirefoxDesktopExtensionRunner.run (file:///home/----------------------/extension/node_modules/web-ext/lib/extension-runners/firefox-desktop.js:45:5)
at async Promise.all (index 0)
at async MultiExtensionRunner.run (file:///home/----------------------/extension/node_modules/web-ext/lib/extension-runners/index.js:72:5)
at async run (file:///home/----------------------/extension/node_modules/web-ext/lib/cmd/run.js:180:3)
at async Program.execute (file:///home/----------------------/extension/node_modules/web-ext/lib/program.js:285:7)
at async file:///home/----------------------/extension/node_modules/web-ext/bin/web-ext.js:13:1 |
Firefox doesn't support service workers in extensions yet. As a workaround, you can create two manifests, one with |
I'll wait for service worker support, so I don't have to maintain two code-bases |
The background service worker support in Firefox is planned but there is still more work needed, we decided to prioritized the event page support because:
In terms of compatibility, if your background script doesn't use anything that is only available in a service worker global (or use those only if runtime detection determined that they are available), manifest_version 3 extensions should be able to share the same code base and just use two different manifests. |
With the forced switch to manifest v3 just around the corner, I'd really like to begin testing manifest v3 support... Any updates on this/plans? We only have like 2-3 months before chrome forces the switch if I understood the announcement right. |
@ChadBailey what are you looking for exactly? For Firefox, the following command should work:
|
I must be doing something wrong, I still get the explicit failure that manifest version is unsupported. I'll take a second look at it |
Which web-ext version do you use? |
@willdurand I'm having the same issue. Currently on |
In this case, the problem was that the
|
I am going to close this issue now given the CLI flag works and we can run valid MV3 add-ons. |
I apologize for wasting your time, I imagine my issues were local only. I still haven't gotten it working properly but the current issues I'm experiencing are completely unrelated to this. |
@ChadBailey feel free to open new issues if you identify issues that might be fixed on the |
Is this a feature request or a bug?
I updated my manifest version to version 3 and I can't use
web-ext
any longer.What is the current behavior?
What is the expected or desired behavior?
Version information (for bug reports)
97.0
macOS 10.15.7
v17.4.0
8.3.1
6.6.0
The text was updated successfully, but these errors were encountered: