8

Background:

I'm working on an extension for Firefox and obviously made a mistake somewhere. This is my first extension, so I wouldn't be surprised if the problem ends up being something simple.

The issue is though that I can't even get a decent error from Firefox to hunt down the problem.

The Problem

When I attempt to install my extension by dragging the XPI file into the Awesome/Location bar, I get an error message stating "This addon could not be installed because it appears to be corrupt." This is not a terribly useful error for someone trying to develop and extension.

Does anyone know of a way to get a more verbose error message? Googling around I wasn't able to find anything myself.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
Zell Faze
  • 1,815
  • 2
  • 14
  • 16
  • How did you create the XPI? What is the structure within? – TheZ Aug 16 '12 at 17:25
  • I took a zip file with the contents of my extension and renamed it. I'm actually looking less for that though and more for an error message from Firefox. If another problem like this crops up in the future I need to be able to solve it on my own. – Zell Faze Aug 16 '12 at 17:26
  • I'd agree that Firefox could be more verbose, but I believe the error is just what it says, that you have not created the zip properly. Do this answer (+comments) help? http://stackoverflow.com/a/6569738/1217408 or this more explicit one? http://stackoverflow.com/questions/8209508/error-when-installing-add-on – TheZ Aug 16 '12 at 17:29
  • Neither of those happen to be my problem. The extension was not a modification of a signed extension, so there is no signature to remove, nor did I accidentally zip the folder (actually was the first thing I checked). If it turns out to be impossible to have Firefox be more verbose, I'll file a bug report with Mozilla. – Zell Faze Aug 16 '12 at 17:33
  • The verbose version of that message would be: "install.rdf could not be found at the top level of the package" (that's what it really means given the current Add-on Manager implementation). If you packed up correctly, do you have an `install.rdf` file in your extension? – Wladimir Palant Aug 17 '12 at 14:03

2 Answers2

8

Firefox has an error console under "Tools">"Web Developer">"Error Console" (ctrl+shift+j for me).

Open up the error console, there will probably be a lot of warnings already listed. Clear all of these and then try to do something, i.e. install your extension. The console will update automatically.

Usagi
  • 2,896
  • 2
  • 28
  • 38
0

I ran into similar issue on Windows 10. Same extension works great in Opera/Edge/Chrome without any errors. I tried different solutions that I found on the internet and in the end nothing helped me, so I just downloaded my own extension from Opera as a zip file. Works like a charm!

Go to https://addons.opera.com/developer/package/_your_package_here/ Click on Versions tab Pick the version you want to download and there you have a download button under Info Package

Cody Tookode
  • 862
  • 12
  • 22