6

I'm developing an Firefox add-on with it's latest jpm SDK.

After I done the major code, I use jpm run command to run the extension.

but the addon is disabled. it says "ADDON NAME could not be verified for use in FIREFOX VERSION and has been disabled."

like in the picture. enter image description here anyone know how to turn off this Firefox feature?

Hank X
  • 1,988
  • 2
  • 14
  • 32

5 Answers5

5

The permanent fix in jpm to avoid having to go to preferences and disable signatures requirement every time you do "jpm run" is to change the preferences.js in your jpm profile, like this:

"xpinstall.signatures.required" : false

in file

npm\node_modules\jpm\data\preferences.js

See this changelist for an example: https://github.com/mozilla-jetpack/jpm/commit/d7f9b51f73d829e65d900a2cb0eed0cbaa957250

Credits for the original answer here

Sebas LG
  • 1,715
  • 1
  • 18
  • 31
  • Is that documented anywhere? The Github link is dead... You don't by any chance know where that would be on a Linux machine when install jpm with `npm install --global`? – Sebastian Blask Sep 28 '15 at 15:45
  • 1
    It seems the fix/change has been integrated into the main project but it has not yet been released. You can follow the instructions here to update manually: https://www.npmjs.com/package/jpm – Sebas LG Sep 28 '15 at 19:24
  • Ref Here: https://support.mozilla.org/en-US/kb/add-on-signing-in-firefox?as=u&utm_source=inproduct – Hitesh Chavda Aug 21 '16 at 14:00
3

From a comment left on a GitHub issue with the same problem last week:

Go to about:config and toggle the xpinstall.signatures.required preference.
— Keith94's comment (linked above)

James Donnelly
  • 126,410
  • 34
  • 208
  • 218
1

For Developing Add-Ons for Firefox use the Developer Edition of Firefox.

More about it:

Firefox 42 and beyond:

The Beta and Release versions of Firefox based on 42 and above (Beta 42 will be released at the same time as Firefox 41) will remove the preference that allows unsigned extensions to be installed, and will disable and/or prevent the installation of unsigned extensions.

The Nightly and Developer Editions of Firefox based on 42 and above will retain the preference to disable signing enforcement, allowing the development and/or use of unsigned add-ons in those versions. Unbranded versions of Firefox based on releases will also be made available for developers, and are expected to be in place for Firefox 42 for release (and potentially beta).

Community
  • 1
  • 1
jonaswjs
  • 11
  • 1
0

Update: You need to set xpinstall.signatures.required to false (as mentioned above) in about:config. However, you CANNOT do this when launching with jpm (as it will not persist). Instead you need to launch your profile via the firefox profile manager, make the change in about:config, then quit the profile, then launch the profile via jpm (with the -p PROFILE_NAME flag). This process applies similarly to other (persistent) changes you might want to make, e.g., preferences, bookmarks, etc.

rednoyz
  • 1,318
  • 10
  • 24
  • 1
    Answer to my own question: apparently any settings that one wants to persist need to be made after launching the profile directly (via the profile-manager, for example). Any changes made to about:config, bookmarks, etc. in a profile launched via jpm are reset when jpm exits. – rednoyz Dec 18 '15 at 12:18
  • you need to specify the profile when running jpm. Buy using -p PROFILE_NAME parameter when running jpm command then you can keep your settings – Hank X Dec 21 '15 at 06:45
  • It seems that it's not true @HankYang. When I run `jpm run --profile testprofile (...)` and change `xpinstall.signatures.required` to `false`, after Firefox/JPM restart (with `testprofile` selected again) the change is not persisted (`xpinstall.signatures.required` is still set to `true`). Although, if I alter that setting by launching `firefox -P` and selecting `testprofile` profile, changes in `about:config` are persisted both for Firefox and JPM subsequent runs. (Firefox version: _45.2.0esr_, JPM version: _1.0.7_) – falconepl Jun 27 '16 at 13:58
  • @falconepl did you specify the full path of the profile? if not, it will only looks for the profile in current path, and all changes only persisted in current profile folder – Hank X Jun 28 '16 at 15:24
  • @HankYang: Yes, I've tried both approaches - specifying profile by its name and by the full path. They work exactly the same when it comes to my experience with `about:config` settings not being persisted when set from JPM. – falconepl Jun 29 '16 at 12:19
0

If I run the same command through a script specified in my add-on package.json file, it loads my add-on correctly.

package.json:

{
  ...
  "scripts":{
    "firefox": "jpm run"
  }
}

In terminal/console: npm run firefox

I have no idea why this works

carlin.scott
  • 6,214
  • 3
  • 30
  • 35