1

I am currently trying to learn how to develop Firefox add-ons, but for my misfortune, I faced a problem before I even start doing so. I downloaded the demo add-on provided by the Firefox developer team which is called "Borderify" and can be seen here: GitHub. After that, I opened WinRar, and converted the folder to a .XPI file. However, when I try to install it manually on my Firefox browser I got this message "This add-on cannot be installed because it appears to be corrupted". I will be grateful if someone points what I've done wrong.

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
George Smith
  • 415
  • 8
  • 25
  • Without access to your `.xpi` file there's no way for use to be able to tell you exactly what the problem is. – Makyen Jun 12 '17 at 21:03
  • 1
    Related / possible duplicate: [Firefox extension .xpi file structure: description, contents, creation, and installation](https://stackoverflow.com/a/31043045) – Makyen Jun 12 '17 at 23:16
  • @Makyen Sorry apparently my link was invalid. Also, thank you for the link you provided. It was very helpful. – George Smith Jun 13 '17 at 08:57

1 Answers1

5

Note that just packing the files and renaming the .ZIP file to an .XPI to install it doesn't work. If you want to test and debug the extension, you need to install the extension temporarily. To do so, go to about:debugging and click Load Temporary Add-on, then choose the XPI file to install the add-on. You can also load the add-on from the sources without packing it to an XPI by simply choosing its manifest.json file.

To get the XPI file to install as expected, it needs to be signed. This will be done automatically when you publish it on addons.mozilla.org (AMO).

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
  • 1
    Thank you for your answer. I was able to load the extension but another problem popped up. When I loaded it and clicked on `debugging` the develop tools menu popped out and I got tonnes of different errors (CSS, JS and even a security error) from files and recently visited websites which are clearly not connected to my extension at all. Such as `BackgroundPageThumbs.jsm`, `main.js` `disco-1f1932e106d04c1319f1.js`, `mdn.0d46c673f0ec.css`, `light-theme.css:16:453`, etc. Can you please tell me if that is normal? Thank you in advance once again. – George Smith Jun 13 '17 at 08:55
  • I can reproduce that and me it looks like a bug, so I've filed [bug 1372562](https://bugzilla.mozilla.org/show_bug.cgi?id=1372562) for it. If there's a reason why messages unrelated to the add-on are listed, it will be clarified there. – Sebastian Zartner Jun 13 '17 at 12:30
  • Thank you so much. I will be following the topic. Hopefully, soon it will be resolved. – George Smith Jun 13 '17 at 18:56
  • Turned out that this issue is already filed as [bug 1006102](https://bugzilla.mozilla.org/show_bug.cgi?id=1006102) (so my one got marked as duplicate), which is actively being worked on already. – Sebastian Zartner Jun 14 '17 at 06:59
  • Yes, I noticed that. I really hope that this fix will not take too long time to be updated. In the meantime, I will use the method proposed in the thread. Thank you for everything! – George Smith Jun 14 '17 at 12:06