web-ext: `web-ext run` not working for manifest version 3

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?

$ web-ext run
Applying config file: ./package.json
Running web extension from
Use --verbose or open Tools > Web Developer > Browser Console to see logging

o: installTemporaryAddon: Error: Error: Could not install add-on: Error: Unsupported manifest version: 3
    at b.installTemporaryAddon (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:1:43054)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at a.startFirefoxInstance (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:1:29874)
    at a.run (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:1:27821)
    at async Promise.all (index 0)
    at x.run (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:1:5302)
    at $ (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:1:10140)
    at R.execute (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:1:64498)

error Command failed with exit code 1.

What is the expected or desired behavior?

Version information (for bug reports)

  • Firefox version: 97.0
  • Your OS and version: macOS 10.15.7
  • Paste the output of these commands:
node --version && npm --version && web-ext --version

v17.4.0 8.3.1 6.6.0

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 13
  • Comments: 16 (6 by maintainers)

Most upvoted comments

In Firefox, we have decided to support Event Pages in MV3, and our developer preview will not include Service Workers (we’re continuing to work on supporting these for a future release).

I’ll wait for service worker support, so I don’t have to maintain two code-bases

Also it seems MV3 based extensions with service worker are not supported, e.g.

Firefox doesn’t support service workers in extensions yet.

As a workaround, you can create two manifests, one with background: { service_worker: 'path.js' } for Chrome and one with background: { scripts: ['path.js'] } for Firefox.

@ChadBailey feel free to open new issues if you identify issues that might be fixed on the web-ext side. Also, if you have other issues, maybe you can try to get some help on Matrix.

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.

I am going to close this issue now given the CLI flag works and we can run valid MV3 add-ons.

@ChadBailey what are you looking for exactly? For Firefox, the following command should work:

web-ext run --firefox-preview

Perhaps an option like --manifest <path> could be added, so we can use a v2 manifest instead, when testing on Firefox.