lhk
lhk

Reputation: 30066

Firefox extension: unexpected property in contentscript permissions

I'm trying to load an extension, which was originally developed for Chrome, into Firefox. I'm aware that there are subtle differences, my idea was to fix the errors one by one.

The manifest can actually be loaded, an icon is added and the extension is listed as installed. But during the loading, there are two warnings. One of them is:

Reading manifest: Error processing content_scripts.0.permissions: An unexpected property was found in the WebExtension manifest.

Unfortunately, this doesn't tell me which property is unexpected. I opened the debug consoles, the message is identical, there is no additional information.

The content_scripts section from the manifest is this:

"content_scripts": [
    {
      "css": [
        "extra.css",
        "all.css",
        "bootstrap.min.css"
      ],
      "js": [
        "firebase.js",
        "jquery.min.js",
        "content.js",
        "popper.min.js",
        "bootstrap.min.js"
      ],
      "matches": [
        "https://dlab.epfl.ch/*",
        "https://*.wikipedia.org/*"
      ],
      "permissions": [
        "storage",
        "activeTab"
      ]
    }],

The permissions look good to me. I checked against the Mozilla docs here, to avoid something like a spelling mistake. But storage and activeTab are allowed as permissions.

How can I find out what this unexpected property is ?

For reference, here is the full manifest: https://pastebin.com/dkaNmZHk

Upvotes: 0

Views: 319

Answers (1)

lhk
lhk

Reputation: 30066

As @wOxxOm said, it is a simple mistake in the JSON layout:

permissions should be top-level and not within content_scripts.

Upvotes: 1

Related Questions