Search code examples
firefox-addonfirefox-addon-sdkfirefox-22

Firefox add-on sdk packaging to xpi does not show exact icon and popup


I am developing an add-on for Firefox. My current problem is while using cfx run command add-on appears properly in navigation toolbar with icon and popup BUT when I package it using cfx xpi and install that xpi file then the icon and popup does not appear properly in navigation toolbar. What could be that cause?

This is the popup when I use cfx run
enter image description here.

And this is the popup when I package to xpi and install it:
enter image description here.


Solution

  • EDIT: Fixed by Serialize data content, fixes #1:

    The cfx tool of Add-on SDK does not include any files in the data directory of third-party modules in the built xpi file.

    This commit introduces a build script which serializes all files in the data-dir to base64-encoded data-URIs, output in browser-action-jplib-data.js

    This change does not require any changes in the public API.


    This is a bug, being tracked at https://github.com/Rob--W/browser-action-jplib/issues/1.

    The issue is caused by a bug in the cfx tool: cfx xpi does not add files from the data directory of third-party modules to the final .xpi file. I've reported this bug at https://bugzilla.mozilla.org/show_bug.cgi?id=892977.