Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZIP confused. Plugin appears to be corrupted

I'm trying to write my first Firefox extension (I use Firefox 8.0.1) and I'm stuck: I have a working sample from https://addons.mozilla.org/en-US/developers/tools/package/ - downloaded file plugin.zip renamed to plugin.xpi seems to be OK. Then I extract it to folder, and without any modification compress it again (using default Ubuntu 10.04LTS context menu package archiver). When I'm trying to install recompressed_plugin.xpi Firefox returns: "This add-on could not be installed because it appears to be corrupt.". What am I doing wrong?

Which compression tools should I use to get it working? How can I determine the internal ZIP type (both files plugin.zip and recompressed_plugin.zip have the same MIME type: Zip archive (application/zip))?

like image 230
adiog Avatar asked Dec 22 '11 06:12

adiog


1 Answers

You didn't compress the package correctly - this message means that there is no install.rdf at the top level of your ZIP file. You've probably run zip recompressed_plugin.xpi plugin/ instead of zip recompressed_plugin.xpi plugin/*. To test run unzip -l recompressed_plugin.xpi, it should list install.rdf and not plugin/install.rdf or something like that.

like image 64
Wladimir Palant Avatar answered Nov 09 '22 05:11

Wladimir Palant