mozilla / web-ext

A command line tool to help build, run, and test web extensions
Mozilla Public License 2.0
2.67k stars 334 forks source link

Linting error EXTENSION_ID_REQUIRED for v3 extension targeted towards Chromium #3213

Open Connum opened 1 month ago

Connum commented 1 month ago

Is this a feature request or a bug?

Bug

What is the current behavior?

When linting an extension using a v3 manifest, it shows the error EXTENSION_ID_REQUIRED for the manifest.json. That's ok for Firefox, so I can get rid of it by adding

  "browser_specific_settings": {
    "gecko": {
      "id": "some-id@example.com"
    }
  }

but then, Chrome will show an error upon installation stating that "browser_specific_settings" is an unsupported key. (The extension will be installed and activated, but still, it will show that error on the extensions page.)

I thought I could maybe use the following:

  "web_accessible_resources": [{
    "resources": [],
    "matches": [],
    "extension_ids": ["some-id@example.com"]
  }]

but that will not get rid of the error.

What is the expected or desired behavior?

Either provide an argument to disable the error when targeting Chromium, or support an extension id syntax that works for both Chromium and Gecko environments.

Version information (for bug reports)

node --version && npm --version && web-ext --version

v18.15.0
8.15.0
8.2.0
Rob--W commented 1 week ago

The warning in Chrome is not fatal, there is a feature request at https://issues.chromium.org/issues/40196501 to stop emitting errors for known keys.