gpt4 book ai didi

javascript - 系统JS : WARNING error running cfx run once updated to Firefox v25

转载 作者:行者123 更新时间:2023-11-30 12:54:26 26 4
gpt4 key购买 nike

我正在尝试测试我正在开发的附加组件,该附加组件在我升级到 Firefox v25 之前一直有效。然后我开始收到以下错误:

System JS : WARNING chrome://browser/content/tabbrowser.xml:2635
function loadURI does not always return a value
System JS : WARNING chrome://browser/content/tabbrowser.xml:2655
function loadURIWithFlags does not always return a value

然后当我点击任何东西时出现过多的 js 错误。我运行了 cfx testall 并遇到了一堆错误。然后我下载了全新安装,但在运行 cfx testall 时仍然出现错误。

我运行的最后一个 cfx testall 的完整结果:http://www.otherrealm.org/cfxErrorMessages.txt整个错误跟踪太长以适应一个 stackoverflow 问题,但这是其中的一部分:

(C:\xampp\htdocs\firefoxaddon\addon-sdk-master) C:\xampp\htdocs\firefoxaddon\addon-sdk-master>cfx testall
Testing cfx...
.....................................................................................
----------------------------------------------------------------------
Ran 85 tests in 43.652s

OK
Testing all examples...
Testing annotator...
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\aaron~1.eva\appdata\local\temp\tmpixuz5_.mozrunner'.
Running tests on Firefox 25.0/Gecko 25.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under winnt/x86-msvc.
Error: TypeError: mr.collectReports is not a function
Traceback (most recent call last):
File "resource://extensions.modules.anonid0-annotator-at-jetpack.commonjs.path/sdk/timers.js", line 40, in notify
callback.apply(null, args);
File "resource://extensions.modules.anonid0-annotator-at-jetpack.commonjs.path/sdk/test/runner.js", line 46, in runTests/<
onDone: onDone
File "resource://extensions.modules.anonid0-annotator-at-jetpack.commonjs.path/sdk/test/harness.js", line 588, in runTests
startLeaks = getPotentialLeaks();
File "resource://extensions.modules.anonid0-annotator-at-jetpack.commonjs.path/sdk/test/harness.js", line 383, in getPotentialLeaks
mr.collectReports(logReporter, null);
0 of 1 tests passed.
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined
Total time: 2.666000 seconds
Program terminated unsuccessfully.
Testing library-detector...
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\aaron~1.eva\appdata\local\temp\tmpok6vjq.mozrunner'.
Running tests on Firefox 25.0/Gecko 25.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under winnt/x86-msvc.
Error: TypeError: mr.collectReports is not a function
Traceback (most recent call last):
File "resource://extensions.modules.jid1-r4rsvnkbannvgq-at-jetpack.commonjs.path/sdk/timers.js", line 40, in notify
callback.apply(null, args);
File "resource://extensions.modules.jid1-r4rsvnkbannvgq-at-jetpack.commonjs.path/sdk/test/runner.js", line 46, in runTests/<
onDone: onDone
File "resource://extensions.modules.jid1-r4rsvnkbannvgq-at-jetpack.commonjs.path/sdk/test/harness.js", line 588, in runTests
startLeaks = getPotentialLeaks();
File "resource://extensions.modules.jid1-r4rsvnkbannvgq-at-jetpack.commonjs.path/sdk/test/harness.js", line 383, in getPotentialLeaks
mr.collectReports(logReporter, null);
0 of 1 tests passed.
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined
Total time: 2.571000 seconds
Program terminated unsuccessfully.
Testing reading-data...
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\aaron~1.eva\appdata\local\temp\tmp8oghkx.mozrunner'.
Running tests on Firefox 25.0/Gecko 25.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under winnt/x86-msvc.
Error: TypeError: mr.collectReports is not a function
Traceback (most recent call last):
File "resource://extensions.modules.reading-data-example-at-jetpack-dot-mozillalabs-dot-com.commonjs.path/sdk/timers.js", line 40, in notify
callback.apply(null, args);
File "resource://extensions.modules.reading-data-example-at-jetpack-dot-mozillalabs-dot-com.commonjs.path/sdk/test/runner.js", line 46, in runTests/<
onDone: onDone
File "resource://extensions.modules.reading-data-example-at-jetpack-dot-mozillalabs-dot-com.commonjs.path/sdk/test/harness.js", line 588, in runTests
startLeaks = getPotentialLeaks();
File "resource://extensions.modules.reading-data-example-at-jetpack-dot-mozillalabs-dot-com.commonjs.path/sdk/test/harness.js", line 383, in getPotentialLeaks
mr.collectReports(logReporter, null);
0 of 1 tests passed.
Total time: 2.652000 seconds
Program terminated unsuccessfully.
Testing reddit-panel...
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\aaron~1.eva\appdata\local\temp\tmp22os34.mozrunner'.
Running tests on Firefox 25.0/Gecko 25.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under winnt/x86-msvc.
Error: TypeError: mr.collectReports is not a function
Traceback (most recent call last):
File "resource://extensions.modules.anonid0-reddit-panel-at-jetpack.commonjs.path/sdk/timers.js", line 40, in notify
callback.apply(null, args);
File "resource://extensions.modules.anonid0-reddit-panel-at-jetpack.commonjs.path/sdk/test/runner.js", line 46, in runTests/<
onDone: onDone
File "resource://extensions.modules.anonid0-reddit-panel-at-jetpack.commonjs.path/sdk/test/harness.js", line 588, in runTests
startLeaks = getPotentialLeaks();
File "resource://extensions.modules.anonid0-reddit-panel-at-jetpack.commonjs.path/sdk/test/harness.js", line 383, in getPotentialLeaks
mr.collectReports(logReporter, null);
0 of 1 tests passed.
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined
Total time: 2.656000 seconds
Program terminated unsuccessfully.
Some examples tests were unsuccessful.
Testing all unit-test addons...
Testing addon-page...
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\aaron~1.eva\appdata\local\temp\tmp8r3n4v.mozrunner'.
console.error: addon-page:
Message: SyntaxError: missing ( before formal parameters
Stack:
@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/deprecated/list.js:119
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/windows/firefox.js:8
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/windows.js:18
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/tabs/tabs-firefox.js:7
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/tabs/tabs.js:18
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/tabs.js:10
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
@resource://test-addon-page-at-jetpack/addon-page/lib/main.js:19
CuddlefishLoader/options<.load@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/loader/cuddlefish.js:129
run@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/addon/runner.js:146
startup/<@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/addon/runner.js:113
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:153
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:153
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:118
then@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:43
resolve@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/core/promise.js:185
readAsync/<@resource://extensions.modules.test-addon-page-at-jetpack.commonjs.path/sdk/net/url.js:49
@resource://gre/modules/NetUtil.jsm:137

JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined
Total time: 38.135000 seconds
Program terminated successfully.
Testing chrome...
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\aaron~1.eva\appdata\local\temp\tmppcscos.mozrunner'.
Running tests on Firefox 25.0/Gecko 25.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under winnt/x86-msvc.
Error: TypeError: mr.collectReports is not a function
Traceback (most recent call last):
File "resource://extensions.modules.test-chrome-at-jetpack.commonjs.path/sdk/timers.js", line 40, in notify
callback.apply(null, args);
File "resource://extensions.modules.test-chrome-at-jetpack.commonjs.path/sdk/test/runner.js", line 46, in runTests/<
onDone: onDone
File "resource://extensions.modules.test-chrome-at-jetpack.commonjs.path/sdk/test/harness.js", line 588, in runTests
startLeaks = getPotentialLeaks();
File "resource://extensions.modules.test-chrome-at-jetpack.commonjs.path/sdk/test/harness.js", line 383, in getPotentialLeaks
mr.collectReports(logReporter, null);
0 of 1 tests passed.
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined
Total time: 2.342000 seconds
Program terminated successfully.

最佳答案

Javascript 严格警告,包括您提供的 tabbrowser 警告,可以安全地忽略,来自 Firefox 代码本身,只是因为 how the SDK sets up javascript.options.strict 而出现。 .

我测试了some stuff from github使用 SDK 1.14,虽然确实有很多严格的警告(以及一些可以忽略的不相关的 Firefox 错误),但总体上似乎可以正常工作。

如果您遇到任何无法正常工作的具体问题,请修改您的问题。

testall 错误是预期的:您正在针对 Firefox Release 运行 SDK master,它尚不支持 function* 也不支持它有 bug 910517然而(collectReports 东西)。同样,这没什么好担心的,因为将使用 Firefox 附带的 SDK 库版本,除非您明确告诉 cfx 否则(无论如何都不支持)。

关于javascript - 系统JS : WARNING error running cfx run once updated to Firefox v25,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19746609/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com