搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How do I install an unsigned addon on the Developer edition?

  • 7 回覆
  • 2 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

I want to install an unsigned addon that I made. I can load it temporarily via about:debugging, but I can't actually install it. Maybe I'm doing it wrong, I couldn't actually find any explicit instructions online, so I packed the files into a zip with a .xpi extension, and tried dragging it into the about:addons page. I get a "the addon could not be installed because it appears to be corrupt" error.

After reading this thread: https://support.mozilla.org/en-US/questions/1134589, I went and installed the developer version of Firefox Quantum, but I'm having the same problem.

I want to install an unsigned addon that I made. I can load it temporarily via about:debugging, but I can't actually install it. Maybe I'm doing it wrong, I couldn't actually find any explicit instructions online, so I packed the files into a zip with a .xpi extension, and tried dragging it into the about:addons page. I get a "the addon could not be installed because it appears to be corrupt" error. After reading this thread: https://support.mozilla.org/en-US/questions/1134589, I went and installed the developer version of Firefox Quantum, but I'm having the same problem.

被選擇的解決方法

I just solved my own problem.

It occurred to me that Firefox probably logs more details about the "addon was corrupt" error in the Browser console (Ctrl + J), so I opened that, and there it was:

1519080608004 addons.xpi WARN Invalid XPI: Error: Cannot find id for addon C:\Users\Jack\Documents\WebExtensions\NoHistory\NoHistory.xpi (resource://gre/modules/addons/XPIInstall.jsm:1603:17) JS Stack trace: loadManifest@XPIInstall.jsm:1603:17

So the problem was the lack of id in manifest.json . For anyone else with this problem, also remember that the id needs to be formatted like an e-mail address.

So in summary, the process is:

1. Grab all the files for your WebExtension and package them directly (not in a folder) in an uncompressed zip.

2. Replace the .zip extension with .xpi.

3. Drag the XPI into Firefox's about:addons page.

4. If an error appears, check the browser console (Ctrl + J). Maybe open the console first and then load the extension, just in case.

5. (EDIT) At least on Linux, I also had to go into about:config and change the xpinstall.signatures.required parameter to "false".

從原來的回覆中察看解決方案 👍 0

所有回覆 (7)

more options

This seems to indicate it is corrupted or doesn't meet the FF57+ requirements to install properly. You should ask Mozilla debug support what else is causing the corrupt install.

more options

Where can I contact debug support?

more options

Is this about a Legacy extension or about a WebExtension?

What is the folder structure in the XPI (ZIP) archive?

The install.rdf file and the chrome.manifest file needs to be in the root level. If you packed a directory and not the individual files then the root level might be a folder.

more options

It's a WebExtension.

I've never actually heard of an install.rdf file. All I have other than scripts and images is manifest.json . I'm honestly working off of guesswork here because I couldn't find explicit instructions on how to do this - the closest I could find is this page, but it doesn't mention install.rdf .

The ZIP file contains the files directly, ie they're not in any subfolders within the ZIP.

Weirdly, I was able to package and install a different addon that I developed, using the same process.

more options

選擇的解決方法

I just solved my own problem.

It occurred to me that Firefox probably logs more details about the "addon was corrupt" error in the Browser console (Ctrl + J), so I opened that, and there it was:

1519080608004 addons.xpi WARN Invalid XPI: Error: Cannot find id for addon C:\Users\Jack\Documents\WebExtensions\NoHistory\NoHistory.xpi (resource://gre/modules/addons/XPIInstall.jsm:1603:17) JS Stack trace: loadManifest@XPIInstall.jsm:1603:17

So the problem was the lack of id in manifest.json . For anyone else with this problem, also remember that the id needs to be formatted like an e-mail address.

So in summary, the process is:

1. Grab all the files for your WebExtension and package them directly (not in a folder) in an uncompressed zip.

2. Replace the .zip extension with .xpi.

3. Drag the XPI into Firefox's about:addons page.

4. If an error appears, check the browser console (Ctrl + J). Maybe open the console first and then load the extension, just in case.

5. (EDIT) At least on Linux, I also had to go into about:config and change the xpinstall.signatures.required parameter to "false".

由 Gaiajack 於 修改

more options

A forum to ask for Extensions help is in https://discourse.mozilla.org/c/add-ons and a secondary place is on the independent mozillaZine forum http://forums.mozillazine.org/viewforum.php?f=19 if you have an account there.

more options