error: addon-sdk: fail: Correct active window - 3 ("window 2 - Nightly" != "window 3 - Nightly")

RESOLVED FIXED in 1.14

Status

defect
P1
normal
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: KWierso, Assigned: mossop)

Tracking

unspecified
1.14

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Reporter

Description

7 years ago
info: addon-sdk: executing 'test-windows.testActiveWindow'

error: addon-sdk: fail: Correct active window - 3 ("window 2 - Nightly" != "window 3 - Nightly")
info: addon-sdk: Traceback (most recent call last):
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/lib/sdk/tabs/tab-firefox.js", line 69, in _onReady
    this._emit(EVENTS.ready.name, this._public);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 123, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 153, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 240, in onReady
    nextStep()
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 249, in nextStep
    testSteps.shift()();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 195, in exports.testActiveWindow/testSteps<
    continueAfterFocus(rawWindow2);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 269, in continueAfterFocus
    nextStep();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 249, in nextStep
    testSteps.shift()();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 198, in exports.testActiveWindow/testSteps<
    nextStep();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 249, in nextStep
    testSteps.shift()();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 215, in exports.testActiveWindow/testSteps<
    continueAfterFocus(rawWindow2);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 269, in continueAfterFocus
    nextStep();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 249, in nextStep
    testSteps.shift()();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 220, in exports.testActiveWindow/testSteps<
    continueAfterFocus(rawWindow3);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 269, in continueAfterFocus
    nextStep();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 249, in nextStep
    testSteps.shift()();
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 223, in exports.testActiveWindow/testSteps<
    test.assertEqual(windows.activeWindow.title, window3.title, "Correct active window - 3");
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 187, in assertEqual
    this.fail(message);
  File "resource://542427b9-b14c-4bcd-9c4d-94a2ced23b59-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail
    this.console.trace();

This seems to be an intermittent failure on Linux64:
https://tbpl.mozilla.org/php/getParsedLog.php?id=18889530&tree=Jetpack&full=1
https://tbpl.mozilla.org/php/getParsedLog.php?id=18889573&tree=Jetpack&full=1
Reporter

Comment 1

7 years ago
Matteo, could you look at this?
Assignee: nobody → zer0
OS: Windows 8 → All
Priority: -- → P1
Hardware: x86_64 → All
Reporter

Updated

7 years ago
Duplicate of this bug: 833051
Assignee

Updated

7 years ago
Attachment #709197 - Flags: review?(poirot.alex)

Comment 4

7 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/b79ad3cdeb994c44e96a5b2ea55ed81349740e2c
Bug 831933: Introduce a short timeout after the window gets focus before continuing

https://github.com/mozilla/addon-sdk/commit/ac9eb0cd2df59812531716e92febffa2d6a48c15
Merge pull request #758 from Mossop/bug831933

Fix Bug 831933: Introduce a short timeout after the window gets focus before continuing r=@erikvold
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Attachment #709197 - Flags: review?(poirot.alex) → review+
Still not right
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee

Updated

7 years ago
Attachment #709309 - Flags: review?(poirot.alex)
Dave, I was started to discuss the issue with Wes on IRC, but since you've already have code for that I'm assigning the issue to you. :)
Assignee: zer0 → dtownsend+bugmail
Comment on attachment 709309 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/760

Thanks for your hard work in chasing these intermittents!
Attachment #709309 - Flags: review?(poirot.alex) → review+

Comment 9

7 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/cd080127e70c6b3095f1066103ac0071874ba198
Bug 831933: Force focus the active window so the focus manager knows what is going on. r=ochameau
Still failing :(

error: addon-sdk: fail: Saw correct title ("Nightly" != "window 3 - Nightly")
info: addon-sdk: Traceback (most recent call last):
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/tabs/tab-firefox.js", line 70, in _onReady
    this._emit(EVENTS.ready.name, this._public);
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 123, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 153, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 245, in onReady
    test.assertEqual(rawWindow3.document.title, window3.title, "Saw correct title");
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 187, in assertEqual
    this.fail(message);
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail
    this.console.trace();
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/lang/functional.js", line 71, in null
    return function() fn.apply(this, args.concat(Array.slice(arguments)));
info: addon-sdk: pass: Correct number of browser windows
info: addon-sdk: pass: Correct number of windows returned by iterator
error: addon-sdk: fail: Correct active window - 3 ("Nightly" != "window 3 - Nightly")
info: addon-sdk: Traceback (most recent call last):
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/timers.js", line 31, in notify
    callback.apply(null, args);
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 257, in nextStep
    testSteps.shift()();
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/tests/windows/test-firefox-windows.js", line 206, in null
    test.assertEqual(windows.activeWindow.title, window3.title, "Correct active window - 3");
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 187, in assertEqual
    this.fail(message);
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail
    this.console.trace();
  File "resource://58c1c699-de3a-4c4b-8218-8970a1653a6e-at-jetpack/addon-sdk/lib/sdk/lang/functional.js", line 71, in null
    return function() fn.apply(this, args.concat(Array.slice(arguments)));
(In reply to Dave Townsend (:Mossop) from comment #10)
> Still failing :(
> 
> error: addon-sdk: fail: Saw correct title ("Nightly" != "window 3 - Nightly")

I think the only way this can happen is if rawwindow3 is pointing to the wrong window, so getMostRecentWindow is failing somewhere. I have an idea...
Assignee

Updated

7 years ago
Attachment #709814 - Flags: review?(poirot.alex)
Attachment #709814 - Flags: review?(poirot.alex) → review+

Comment 13

7 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/35026a1929a0711aec5c669ca79e197b7a6b0370
Bug 831933: Use a window tracker to detect the newloy opened windows instead of getMostRecentWindow.

https://github.com/mozilla/addon-sdk/commit/7e95e5555db52193ff3620c5ff58c19af479dacf
Bug 831933: Verify we got the correct raw windows in the test.

https://github.com/mozilla/addon-sdk/commit/9550fe3dbc4b2496cb9dce6a4869f3937547d53a
Merge pull request #762 from Mossop/bug831933_3

Bug 831933: Use a window tracker to detect the newly opened windows instead of getMostRecentWindow. r=ochameau
Reporter

Comment 14

7 years ago
Updated Jetpack's tests on inbound to pick this up: https://hg.mozilla.org/integration/mozilla-inbound/rev/8f6b848a136c
Three clean runs with no failures? I think we're done here \o/
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED

Comment 17

6 years ago
Commits pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/c049928e3251f513eb4603220db8ac2d7916027f
Merge pull request #758 from Mossop/bug831933

Fix Bug 831933: Introduce a short timeout after the window gets focus before continuing r=@erikvold(cherry picked from commit ac9eb0cd2df59812531716e92febffa2d6a48c15)

https://github.com/mozilla/addon-sdk/commit/06089023fa2322e12684eb7e68fafa7d189a5610
Bug 831933: Force focus the active window so the focus manager knows what is going on. r=ochameau
(cherry picked from commit cd080127e70c6b3095f1066103ac0071874ba198)

https://github.com/mozilla/addon-sdk/commit/b563e7dd1c882eccfacdec1171758e03f6e044f5
Merge pull request #762 from Mossop/bug831933_3

Bug 831933: Use a window tracker to detect the newly opened windows instead of getMostRecentWindow. r=ochameau(cherry picked from commit 9550fe3dbc4b2496cb9dce6a4869f3937547d53a)

Conflicts:
	test/windows/test-firefox-windows.js
Assignee

Updated

6 years ago
Target Milestone: --- → 1.14
You need to log in before you can comment on or make changes to this bug.