jsonfirefoxmanifest

The extension ID is required in Manifest Version 3 and above. Firefox Error in manifest


I have an extension, that changes old dark theme to something better. I want to upload it to Mozzila Addons (for firefox), but when I tried uploading it, I get the following error:

Manifest ID is required in Manifest Version 3 and above

My manifest:

{
  "content_scripts": [
    {
      "js": [
        "script.js"
      ],
      "matches": [
        "https://forum.training-server.com/*"
      ],
      "run_at": "document_end"
    }
  ],
  "icons": {
    "128": "icons/icon128x128.png",
    "16": "icons/icon16x16.png",
    "32": "icons/icon32x32.png",
    "48": "icons/icon48x48.png"
  },
  "manifest_version": 3,
  "name": "Training-forum Improved dark theme",
  "version": "0.3"
}

I don't know, what I should add/fix in Manifest to upload without this error.


Solution

  • According to the documentation:

    Extension IDs are 80 characters of text which must be unique to the extension. Using an email address that's specifically for just that particular extension is a typical example of an ID, but nearly any text 80 characters or less will work, as long as it's unique. UUIDs are very likely to be unique, so are often used, particularly if automatically generated.

    See also here.

    If you are using one single manifest.json for FF and chrome, chrome will show an warning, regarding browser_specific_settings but the extension will work as intended.

    Manifest Version 2

    Once you have finished developing the extension, you can package it and submit it to AMO for review and signing. If the packaged extension you upload does not contain an ID, AMO will generate one for you. It's only at this point that the add-on will be assigned a permanent ID, which will be embedded in the signed packaged extension.

    Manifest Version 3

    All Manifest V3 extensions need an add-on ID in their manifest.json when submitted to AMO. Contrary to Manifest V2 extensions, AMO will not accept Manifest V3 extensions without an ID and it will not automatically embed this ID in the signed packaged extension.

    Example extension ID in manifest.json for Manifest Version 3
    "browser_specific_settings": {
      "gecko": {
        "id": "My chosen ID for this extension"
      }
    }