5

I have a new Firefox add-on with the following directory structure:

/
   package.json
   data/
       icons/
           icon48.png

In my package.json file I have this:

 "icon": "data/icons/icon48.png",

(among other things). When I run jpm run as recommended by the Firefox add-on docs, the extension loads but the icon is not visible in the add-on manager. Any idea what I'm missing? I have been referencing this page: https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/package_json#icon, but no luck.

Thanks!

winhowes
  • 7,845
  • 5
  • 28
  • 39
  • 2
    "asked 2 hours ago", I found this because I'm having the exact same problem. Right now. – Aylen Sep 12 '15 at 02:07

2 Answers2

4

Apparently this is a bug. See this issue in the jpm repository.

For me, moving the icon image to the root directory (i.e. the same path as package.json) and renaming it "icon.png" fixed the problem.

Aylen
  • 3,524
  • 26
  • 36
3

I still have this bug with jpm 1.0.6 version. I solved it adding the next icon path:

{

  "id": "jid1-AKuBexDY5zJsIQ@jetpack",
  "icon": "resource://jid1-akubexdy5zjsiq-at-jetpack/data/images/icon48.png",

}

Note that the "path" is similar to the "id" field but there are not capital letters

  • It works with capital letters too, the only trick is to change `@` for `-at-` in the id. Thanks! – IvanRF May 30 '16 at 23:23