I created a simple Firefox extension (using WebExtensions) that I want to use every day in Firefox without publishing it on addons.mozilla.org (AMO). I was able to install it temporarily and verify that it works by going to about:debugging
, clicking on the "Load Temporary Add-On" button, and opening the manifest.json file.
Since I want to use the extension without having to go through that process every time I restart Firefox, I packaged it into an XPI file and tried installing it like a regular local extension. I archived the two files (manifest.json, content_script.js) and the one directory (icons/) into a ZIP file and renamed it to test.xpi. At about:addons
, I clicked the gear icon, selected "Install Add-on From File", and selected the test.xpi file. But Firefox always gave me the error
"This add-on could not be installed because it appears to be corrupt".
In creating the ZIP file, I was careful to keep the manifest file at the top of the archive, and did not include the containing folder itself. I tried following some detailed instructions on installing an XPI file locally, and even installed Cygwin in order to get access to the "zip" utility that the instructions mention, but I'm not able to find that utility in any of the Cygwin folders.
To see if the problem was a lack of a Mozilla signature, I submitted it to AMO (addons.mozilla.org) for signing. AMO signed it and provided me with a new XPI file, which I assumed to be installable since it was signed. But this officially created and signed XPI file still got the error that it was corrupt.
Does anyone have ideas as to how I can figure out what's causing this?