1

I'm trying to create an extension for Firefox. The structure of my folder is:

icons
| _ image.ico
popup
| _ manageinstance.html
settings
| _ options.js
| _ options.html
manageinstance.js
manifest.json

Using 'Load Temporary add-on', everything works properly. At this point I created the zip containing the various files and folders, and I gave it the .xpi extension.

I uploaded the xpi package on the mozilla site for validation, and the file was validated with 0 errors.

At this point I download the signed xpi package, but when I try to install it on firefox a message alerts that add-on can't be installed because it's corrupted.

This is my manifest.json

{
  "manifest_version": 2,
  "name": "InstancesManager",
  "version": "1.0",
  "author": "Songini Daniele",

  "icons": {
    "48": "icons/image.ico"
  },

"browser_action": {
    "default_icon": "icons/image.ico",
    "default_title": "Manage Instances",
    "default_popup": "popup/manageinstance.html"
  },

  "options_ui": {
    "page": "settings/options.html"
  },

  "permissions": ["storage"],

  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["manageinstance.js"]
    }
  ]

}

At this point I don't know if the error is in the json file or if I miss some files, necessary for the installation.

Can anyone please explain how to make a correct xpi?

  • Did you try to load your *.xpi* file as a temporary add-on? Note: Without access to your actual *.xpi* file we can only guess at the actual reason. – Makyen Aug 20 '17 at 16:54
  • Related/possible duplicate: [Add-on "appears to be corrupt" when trying to install my add-on's .xpi file in Firefox](https://stackoverflow.com/q/39854127) – Makyen Aug 20 '17 at 16:55
  • Related/possible duplicate: [Firefox extension .xpi file structure: description, contents, creation, and installation](https://stackoverflow.com/q/30865644) – Makyen Aug 20 '17 at 16:58
  • Looks like [this answer](https://stackoverflow.com/a/45766517/3773011) is potentially related to your problem, but not your actual question. – Makyen Aug 20 '17 at 17:15

0 Answers0