jpm run不适用于Firefox 48或更高版本 [英] jpm run does NOT work with Firefox 48, or later
问题描述
jpm版本是1.1.3
npm版本是2.15.8
节点版本是4.4.7
Firefox版本是48.0
$ b
index.js 的内容:
var self = require(sdk / self);
console.log(************************************);
jpm run命令的输出
JPM [info]创建一个新的配置文件
根据 index.js 文件的内容,一行 *
符号应该在控制台上输出。但是,欲望输出不在控制台中。
有什么问题吗?
我的包的内容.json file:
$ b
{
title:My Jetpack Addon,
name:temp,
version:0.0.1,
description:基本附件,
main: index.js,
author:,
engines:{
firefox:> = 38.0a1,
fennec: > = 38.0a1},
license:MIT,
keywords:[
jetpack]
}
jpm run
Firefox 48或更高版本的发行版
问题不在于 jpm
,而是您尝试使用它与Firefox 48的发行版本。从Firefox 48开始,Mozilla禁用了将首选项 xpinstall.signatures.required
设置为 false的功能
来允许加载无符号的加载项。因此,您的加载项正在被添加到Firefox配置文件中,但被禁用:
jpm run
code>
您需要安装和使用不同版本的Firefox
要测试您的加载项,您需要安装不同版本的Firefox并使用
nightly 是一个快捷方式,可解析为Firefox Nightly的默认位置被安装。根据您使用的操作系统,还有其他可以使用的快捷方式名称(例如 firefox
, firefoxdeveloperedition
, beta
, nightly
和 aurora
)。但是,它们不能在所有操作系统上正确解析。您总是可以选择指定您希望使用的Firefox版本的完整路径。
使用 -b 用于指定路径的code>选项是将
JPM_FIREFOX_BINARY
环境变量更改为您希望与 jpm一起使用的Firefox可执行文件的路径
。
注意:我更新了安装文档,以便反映在Firefox 48上需要有一个非发布版本的Firefox。如果您最近访问过该页面,则可能需要使用 Ctrl - F5 刷新页面以查看新内容。
jpm version is 1.1.3
npm version is 2.15.8
Node version is 4.4.7
Firefox version is 48.0
Content of index.js:
var self = require("sdk/self");
console.log("************************************");
Output of "jpm run" command
JPM [info] Starting jpm run on My Jetpack Addon
JPM [info] Creating a new profile
As per the content of the index.js file, a line of *
symbols should be output on the console. But, the desire output is not in the console.
Is there any problem with the code?
Content of my package.json file:
{
"title": "My Jetpack Addon",
"name": "temp",
"version": "0.0.1",
"description": "A basic add-on",
"main": "index.js",
"author": "",
"engines": {
"firefox": ">=38.0a1",
"fennec": ">=38.0a1" },
"license": "MIT",
"keywords": [
"jetpack" ]
}
jpm run
does not work with the release version of Firefox 48, or later
The issue is not jpm
, but that you are attempting to use it with the release version of Firefox 48. As of Firefox 48, Mozilla has disabled the ability of the setting the preference xpinstall.signatures.required
to false
to permit unsigned add-ons to be loaded. Thus, your add-on is being added to that Firefox profile, but is disabled:
jpm run
You need to install and use a different version of Firefox
To test your add-on, you will need to install a different version of Firefox and use the -b
option to jpm run
to tell jpm
which version of Firefox to use. Assuming you don't want an old version of Firefox, your options are Firefox Developer Edition, Firefox Nightly, Unbranded Beta, or Unbranded Release.
[Note (2016-08-11): My testing over the last couple of days has shown that the Unbranded Release version of Firefox 48, and the Unbranded Beta version of Firefox 49.0b2 exhibit problems which were not in 48 or 49 while those versions were Nightly or Developer Edition. These problems do not exist in the current Developer Edition (50.0a2) or Nightly (51.0a2). In other words, I have an add-on which works in Developer Edition (50.0a2), & Nightly (51.0a2), and worked in both Developer Edition (49.0a2), and Developer Edition (48.0a2), but which does not work in Unbranded Release (48.0), or Unbranded Beta (49.0b2). Thus, I recommend against using the Unbranded versions of Firefox at this time.]
The simplest thing to do is to download Firefox Nightly and start jpm
using:
jpm run -b nightly
The word nightly
is a shortcut which resolves to the default location for Firefox Nightly to be installed. Depending on what OS you are using, there are other shortcut names which can be used (e.g. firefox
, firefoxdeveloperedition
, beta
, nightly
, and aurora
). However, they do not resolve correctly on all operating systems. You always have the option of specifying the complete path to the Firefox version you desire to use.
The other alternative to using the -b
option to specifying the path is to change the JPM_FIREFOX_BINARY
environment variable to the path to the Firefox executable which you wish to use with jpm
.
Note: I have updated the installation documentation for jpm on MDN to reflect the need to have a non-release version for Firefox as of Firefox 48. If you have recently visited that page, you may need to use Ctrl-F5 to refresh the page in order to see the new content.
这篇关于jpm run不适用于Firefox 48或更高版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!