为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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

  • 7 个回答
  • 2 人有此问题
  • 1754 次查看
  • 最后回复者为 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