1
votes

I'm trying to develop an extension to run on the FirefoxDeveloperEdition (which doesn't require signing) on mac.

I followed the "Your first WebExtension" guide and everything works fine when using the "Load temporary add-on". But when I try to package it and install it using the "install add-on from file", it shows "this add-on could not be installed because it appears to be corrupt". enter image description here

I zip all the files (borderify.js, manifest.json, icons, without the container folder) and change the suffix to .xpi. Is this the correct way of packaging? some answers mention that there should be a "install.rdf" ?, if so, how can I create that file? it seems there is no guide on the docs.

UPDATE:

I've tried using the mac builtin "compress n items", xpi file, also tried using web-ext build, xpi file. they all end up with the same error alert.

UPDATE 2:

I've set xpinstall.signatures.required false in about:config.

My firefox version is: 51.0a2 (2016-10-17) (64-bit)

Is there anyone able to load the unsigned xpi? Is it a Firefox bug? or is it just me?

1
How, exactly, are you creating the .zip file? - Makyen
Without your .xpi file, there is no way for us to answer this other than guessing at what the problem might be. - Makyen
I've updated the question with the xpi file links. - Keoros
Try going to about:debugging then click on "load temporary addon" and load this xpi. - Noitidart

1 Answers

8
votes

If you want to install .xpi, you need to provide an id. Add this to your manifest.json root

"applications": {
  "gecko": {
    "id": "[email protected]",
  }
}

It's not particularly well documented, specifically this page tells that "add-on will be assigned a randomly-generated temporary ID when you install it in Firefox.". However, that only seems to work for installing over about:debugging - xpi installation still requires an ID. It might be any string, since you've running it on DevEdition with disabled checks anyway.

Goes without saying, that would not work on release Firefox.

P.S: Ctrl-Shift-J will open a browser console that will usually contain additional information about the extension installation error - might be useful next time.