2

I have a basic Google Chrome extension which needs to be ported to Firefox. I uploaded the .crx file to the Firefox marketplace and it got accepted but is under review rightnow. I downloaded the the generated xpi file and tried to install it locally but without any success. It tell that the plugin is invalid or corrupted.

Another method that I tried is I ported the extension using chrome-tailor and generated the xpi. I am able to install the extension in this but the content scripts are not injected and the extension doesn't work as expected.

I want to install it in Firefox and test it. I have also set xpinstall.signatures.required to false.

serv-inc
  • 35,772
  • 9
  • 166
  • 188
  • 1
    Are you saying that you submitted it to Mozilla without bothering to test it first to see if it works? – Makyen Aug 21 '16 at 19:08
  • We could **guess** at what your problem is, but without code, a [mcve], there is no way for us to actually know what the problem really is. Please [edit] the question to include enough information for us to duplicate the problem. At an *absolute minimum*, we would need a pointer to somewhere we could download your extension. However, even with such a pointer, without code actually in the question, this question is off-topic. – Makyen Aug 21 '16 at 19:11
  • 1
    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 the extension? – Makyen Aug 21 '16 at 19:15
  • 1
    Have you attempted to install it as a [Temporary Extension](https://www.google.com/search?num=100&lr=&as_qdr=all&q=MDN+temporary+extension&oq=MDN+temporary+extension&gs_l=serp.3..33i21k1.77720.82932.0.84728.19.19.0.0.0.0.124.1839.12j7.19.0....0...1c.1.64.serp..0.17.1637...0j35i39k1j0i20k1j0i22i30k1j0i22i10i30k1j33i160k1.7wD_9Lr5gUw) from `about:debugging`? – Makyen Aug 21 '16 at 19:18

1 Answers1

3

WebExtensions

To test WebExtension based add-ons, they are usually loaded as a "Temporary Installation in Firefox"

That MDN page describes how to temporarily install a WebExtensions (i.e. similar code to Chrome) in Firefox. The gist of it is:

  1. Navigate to about:debugging
  2. Click the button "Load Temporary Add-on"
  3. Use the file selection dialog to select the manifest.json file, or packaged .xpi file for the extension.

Load a temporary add-on

Note on testing WebExtensions:
The WebExtensions API is still in development. For now, you are probably best off developing and testing your WebExtension add-on with Firefox Developer Edition, or Firefox Nightly. You should also make careful note of what version of Firefox is required for the functionality you desire to use. This information is contained in the "Browser compatibility" section of the MDN documentation pages.

Firefox Add-on SDK

To test Firefox Add-on SDK based ad-ons, use jpm run. You might want to take a look at this answer to "jpm run does NOT work with Firefox 48, or later"

Community
  • 1
  • 1
Makyen
  • 31,849
  • 12
  • 86
  • 121