0

I developed an extension for Chrome which I would like to port to Firefox. I followed Mozilla's guide for porting a Chrome extension to Firefox. The extension worked fine when tested locally in Firefox. But, after submitting it to AMO, installing it from there gave me the "file corrupted" error:

File corrupted error

After downloading it from Firefox store, I unzipped it only to find all my files are intact. Here is the extension link.

Any insights to the problem is appreciated!

Makyen
  • 31,849
  • 12
  • 86
  • 121
sjy_0831
  • 29
  • 4
  • What, *exactly*, was shown in the [Browser Console](https://developer.mozilla.org/en-US/docs/Tools/Browser_Console) (Ctrl-Shift-J, or Cmd-Shift-J on OSX) when you tried to install and use the extension? – Makyen Feb 03 '17 at 02:18
  • When testing locally, did you try installing the *.xpi* file prior to upload? Or, did you only try it on the unpacked files? – Makyen Feb 03 '17 at 02:27
  • FYI: Your *.xpi* file looks generally OK (e.g. no extra directory level; no compression methods used other than deflate and store; *manifest.json* exists in the right place and is valid JSON). I do note that it has not yet been reviewed by Mozilla, and is not signed. Not being signed should generate a different error than "corrupt", but still not be installable in the branded release or Beta versions of Firefox. I have not actually tried to install it, as it has quite a bit of code, which I don't have the time to review prior to installing it (personal review; I'm not a Mozilla reviewer). – Makyen Feb 03 '17 at 02:37
  • *Please* don't load jQuery into **every** page (`content_scripts` with your `matches`) unless you **need** to. jQuery is 85kiB of minimized code. This is a significant burden with which to saddle *every single page*. What of those of us who have 100's of tabs open? While It is possible you really *need* to load jQuery, You appear to load jQuery for the *sole purpose* of using `$(document).mousemove()` ONCE, which, as used, is just `document.addEventListener('mousemove',...)`, doing so is a ***very*** poor trade-off from your user's point of view. – Makyen Feb 03 '17 at 02:52
  • In addition, it would be better to move the 44kB of data in *siteRuleBook.js* into an event page. You can then either message back and forth from your content script to get the data for the current page (all that is actually needed for the particular instance of the content script), or you can store it in `storage.local` and have the content script retrieve the specific site that is needed for the current host (not the entire data structure). Basically, you do not need a separate copy of the entire data structure being loaded into every page of potentially hundreds of tabs. – Makyen Feb 03 '17 at 03:00
  • @Makyen Thanks for the review! Really appreciate it! The error I get from Mozilla store page is: "1486086390589 addons.xpi WARN Download of https://addons.mozilla.org/firefox/downloads/file/583881/ffinery_shopping_tool-12.7.0-an+fx.xpi?src=dp-btn-primary failed: Error: Cannot find id for addon /private/var/folders/....". Is it because the extension is not signed? – sjy_0831 Feb 03 '17 at 16:51

0 Answers0