Closed
Bug 607077
Opened 14 years ago
Closed 14 years ago
symbiont tests fail with "TypeError: setting a property that has only a getter" exceptions
Categories
(Core :: XPConnect, defect)
Tracking
()
VERIFIED
FIXED
mozilla2.0b7
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta7+ |
People
(Reporter: myk, Assigned: gal)
References
Details
On trunk, the panel tests all fail with "TypeError: setting a property that has only a getter" exceptions, which causes the tests for all modules that depend on symbiont (f.e. panel) to fail as well:
--------------------------------------------------------------------------------
(addon-sdk)myk@myk:~/Projects/addon-sdk/packages/jetpack-core$ cfx test -F symbiont
Using binary at '/home/myk/bin/firefox'.
Using profile at '/tmp/tmp89kHKl.mozrunner'.
(firefox-bin:2716): GLib-WARNING **: g_set_prgname() called multiple times
console: [JavaScript Error: "uncaught exception: TypeError: setting a property that has only a getter"]
error: TEST FAILED: test-content-symbiont.test:constructing symbiont && validateing API (timed out)
console: [JavaScript Error: "uncaught exception: TypeError: setting a property that has only a getter"]
error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-symbiont.js", line 124, in
onMessage: function(msg) {
File "resource://jetpack-core-jetpack-core-lib/traits.js", line 118, in Trait
return self.constructor.apply(self, arguments) || self._public;
File "resource://jetpack-core-jetpack-core-lib/content/symbiont.js", line 79, in Symbiont
this.contentURL = options.contentURL;
TypeError: setting a property that has only a getter
error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-symbiont.js", line 145, in
onMessage: function(message) {
File "resource://jetpack-core-jetpack-core-lib/traits.js", line 118, in Trait
return self.constructor.apply(self, arguments) || self._public;
File "resource://jetpack-core-jetpack-core-lib/content/symbiont.js", line 79, in Symbiont
this.contentURL = options.contentURL;
TypeError: setting a property that has only a getter
0 of 6 tests passed.
No tests were run
FAIL
Total time: 41.791663 seconds
Program terminated unsuccessfully.
--------------------------------------------------------------------------------
Irakli: any idea what might be going on here?
Reporter | ||
Comment 1•14 years ago
|
||
Against the latest Firefox nightly build, with the latest tip of the SDK tree, the test results are now different, but there is still a failure:
--------------------------------------------------------------------------------
(addon-sdk)myk@myk:~/Projects/addon-sdk/packages/jetpack-core$ cfx test -F symbiont
Using binary at '/home/myk/bin/firefox'.
Using profile at '/tmp/tmpuRCQQA.mozrunner'.
(firefox-bin:21779): GLib-WARNING **: g_set_prgname() called multiple times
console: [JavaScript Error: "uncaught exception: Error: The script option must be a string or an array of strings."]
error: TEST FAILED: test-content-symbiont.test:constructing symbiont && validateing API (timed out)
....
4 of 5 tests passed.
FAIL
Total time: 11.658048 seconds
Program terminated unsuccessfully.
--------------------------------------------------------------------------------
Reporter | ||
Comment 2•14 years ago
|
||
This might actually be a loader problem. Here are the test results for content/loader:
--------------------------------------------------------------------------------
(addon-sdk)myk@myk:~/Projects/addon-sdk/packages/jetpack-core$ cfx test -F content-loader
Using binary at '/home/myk/bin/firefox'.
Using profile at '/tmp/tmpKgWJEE.mozrunner'.
(firefox-bin:25070): GLib-WARNING **: g_set_prgname() called multiple times
...........................error: TEST FAILED: test-content-loader.test:contentScript (exception)
error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-loader.js", line 168, in
loader.contentScript = value = ["1;", "2;"];
File "resource://jetpack-core-jetpack-core-lib/content/loader.js", line 189, in
value = validate(value, valid.contentScript);
File "resource://jetpack-core-jetpack-core-lib/content/loader.js", line 108, in validate
{ $: validation }
File "resource://jetpack-core-jetpack-core-lib/api-utils.js", line 137, in validateOptions
throw requirementError(key, req);
File "resource://jetpack-core-jetpack-core-lib/api-utils.js", line 185, in requirementError
return new Error(msg);
Error: The script option must be a string or an array of strings.
.....error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-loader.js", line 212, in
loader.contentScriptURL = value = [uri];
File "resource://jetpack-core-jetpack-core-lib/content/loader.js", line 173, in
value = validate(value, valid.contentScriptURL);
File "resource://jetpack-core-jetpack-core-lib/content/loader.js", line 108, in validate
{ $: validation }
File "resource://jetpack-core-jetpack-core-lib/api-utils.js", line 137, in validateOptions
throw requirementError(key, req);
File "resource://jetpack-core-jetpack-core-lib/api-utils.js", line 185, in requirementError
return new Error(msg);
Error: The `contentScriptURL` option must be a local file URL or an array ofURLs.
32 of 34 tests passed.
FAIL
Total time: 1.574987 seconds
Program terminated unsuccessfully.
--------------------------------------------------------------------------------
Irakli: any thoughts on what is going on here?
Comment 3•14 years ago
|
||
Myk, can you explain how this can be reproduced? Where should one pull from, what needs to be built, etc etc?
Reporter | ||
Comment 4•14 years ago
|
||
Pull from http://github.com/mozilla/addon-sdk or its Hg mirror at https://hg.mozilla.org/labs/jetpack-sdk/. Then enter your local clone's directory in a terminal and run "source bin/activate" ("bin\activate.bat" on Windows). Then enter packages/jetpack-core/ and run "cfx test -F symbiont" or "cfx test -F content-loader".
That command will look for Firefox, but if it doesn't find it (or if you think it might be finding a different binary than the one you want to test with), specify "--binary=/path/to/binary" on that command line.
Comment 5•14 years ago
|
||
I can't reproduce using the current nightly and SDK tree. All content-loader and symbiont tests pass. I'm 99% sure the array-related errors were fixed by the api-utils isArray fix I landed last night -- same code path.
Comment 6•14 years ago
|
||
With the fixes for bugs 607799, 607863, 606585, and bug 608142 I still see a failure, but a different one than what's reported here. The symbiont tests pass, but the content-loader tests fail with the following output:
(jetpack-sdk)[jst@gandalf jetpack-core]$ cfx test -F content-loader --binary=/home/jst/work/tip/fb-rel/dist/bin/firefox
Using binary at '/home/jst/work/tip/fb-rel/dist/bin/firefox'.
Using profile at '/tmp/tmpQ8jbHl.mozrunner'.
error: TEST FAILED: test-content-loader.test:contentURL (exception)
error: An exception occurred.
Traceback (most recent call last):
File "chrome://browser/content/browser.js", line 6539, in delayedStartup
.init(window);
File "file:///home/jst/work/tip/fb-rel/dist/bin/components/nsSessionStore.js", line 389, in sss_init
this.onLoad(aWindow);
File "file:///home/jst/work/tip/fb-rel/dist/bin/components/nsSessionStore.js", line 727, in sss_onLoad
Services.obs.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
File "file:///tmp/tmpQ8jbHl.mozrunner/extensions/xulapp@toolness.com/components/harness.js", line 385, in Harness_observe
this.load(lifeCycleObserver192.loadReason || "startup");
File "file:///tmp/tmpQ8jbHl.mozrunner/extensions/xulapp@toolness.com/components/harness.js", line 317, in Harness_load
obSvc.notifyObservers(null, APP_READY_TOPIC, null);
File "resource://jetpack-core-jetpack-core-lib/observer-service.js", line 174, in
this.callback(subject, data);
File "resource://jetpack-core-test-harness-lib/run-tests.js", line 106, in doRunTests
callbacks.print);
File "resource://jetpack-core-test-harness-lib/run-tests.js", line 69, in runTests
onDone: onDone});
File "resource://jetpack-core-test-harness-lib/harness.js", line 367, in runTests
nextIteration();
File "resource://jetpack-core-test-harness-lib/harness.js", line 286, in nextIteration
onDone: nextIteration});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 50, in findAndRunTests
onDone: options.onDone});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 284, in startMany
runNextTest(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-loader.js", line 6, in
let loader = Loader(),
File "resource://jetpack-core-jetpack-core-lib/traits.js", line 118, in Trait
return self.constructor.apply(self, arguments) || self._public;
TypeError: self.constructor is undefined
error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-loader.js", line 100, in
let loader = Loader();
File "resource://jetpack-core-jetpack-core-lib/traits.js", line 118, in Trait
return self.constructor.apply(self, arguments) || self._public;
TypeError: self.constructor is undefined
error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-loader.js", line 134, in
let loader = Loader(), value;
File "resource://jetpack-core-jetpack-core-lib/traits.js", line 118, in Trait
return self.constructor.apply(self, arguments) || self._public;
TypeError: self.constructor is undefined
error: An exception occurred.
Traceback (most recent call last):
File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
this._callback.apply(null, this._params);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
this.test.testFunction(this);
File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
test(runner);
File "resource://jetpack-core-jetpack-core-tests/test-content-loader.js", line 176, in
let loader = Loader(), value, uri = self.data.url("test-content-loader.js");
File "resource://jetpack-core-jetpack-core-lib/traits.js", line 118, in Trait
return self.constructor.apply(self, arguments) || self._public;
TypeError: self.constructor is undefined
0 of 4 tests passed.
No tests were run
FAIL
Total time: 8.168638 seconds
Program terminated unsuccessfully.
(jetpack-sdk)[jst@gandalf jetpack-core]$ cfx test -F symbiont --binary=/home/jst/work/tip/fb-rel/dist/bin/firefox
Using binary at '/home/jst/work/tip/fb-rel/dist/bin/firefox'.
Using profile at '/tmp/tmpbPY9Dn.mozrunner'.
.........
9 of 9 tests passed.
OK
Total time: 4.616517 seconds
Program terminated successfully.
Assignee | ||
Comment 7•14 years ago
|
||
Blocks a blocker. Please b7+.
Assignee | ||
Updated•14 years ago
|
Component: Jetpack SDK → XPConnect
Product: Mozilla Labs → Core
QA Contact: jetpack-sdk → xpconnect
Target Milestone: -- → mozilla2.0b7
Version: unspecified → Trunk
Assignee | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Updated•14 years ago
|
blocking2.0: ? → beta7+
Assignee | ||
Comment 8•14 years ago
|
||
I am passing the test harness with a TM tip debug build.
symbiont:
9 of 9 tests passed.
content-loader:
34 of 34 tests passed.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → gal
Assignee | ||
Comment 9•14 years ago
|
||
I am ready to WFM this if jst can confirm.
Assignee | ||
Comment 10•14 years ago
|
||
Please re-open if you still see issues, this seems resolved for me with TM tip.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 11•14 years ago
|
||
Yup, I see that too. Marking fixed rather than worksforme since it is known to have been broken and then fixed (even if it isn't entirely clear exactly what it was that fixed the problem).
Status: RESOLVED → VERIFIED
Resolution: WORKSFORME → FIXED
Comment 12•14 years ago
|
||
FWIW with the patch in bug 596031 applied, I get the same errors in comment 6.
Reporter | ||
Comment 13•14 years ago
|
||
(In reply to comment #11)
> Yup, I see that too.
Note: I actually meant to say that tests are all passing for me on the latest trunk nightly.
You need to log in
before you can comment on or make changes to this bug.
Description
•