Closed Bug 1274943 Opened 8 years ago Closed 8 years ago

Intermittent test_fallback_update.py TestFallbackUpdate.test_update | NoSuchWindowException: No window found for '<function <lambda> at 0x016BD1B0>'

Categories

(Testing :: Firefox UI Tests, defect)

49 Branch
Unspecified
Windows
defect
Not set
normal

Tracking

(firefox48 wontfix, firefox49 wontfix, firefox50 fixed, firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox48 --- wontfix
firefox49 --- wontfix
firefox50 --- fixed
firefox51 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

()

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

https://treeherder.mozilla.org/logviewer.html#?job_id=3930243&repo=mozilla-central

 06:47:02     INFO - TEST-UNEXPECTED-ERROR | test_fallback_update.py TestFallbackUpdate.test_update | NoSuchWindowException: NoSuchWindowException: No window found for '<function <lambda> at 0x016BD1B0>'

 06:47:02     INFO - Traceback (most recent call last):

 06:47:02     INFO -   File "c:\jenkins\workspace\mozilla-central_update\build\venv\lib\site-packages\marionette\marionette_test.py", line 344, in run

 06:47:02     INFO -     testMethod()

 06:47:02     INFO -   File "c:\jenkins\workspace\mozilla-central_update\build\tests\firefox-ui\tests\update\fallback\test_fallback_update.py", line 21, in test_update

 06:47:02     INFO -     self.download_and_apply_forced_update()

 06:47:02     INFO -   File "c:\jenkins\workspace\mozilla-central_update\build\venv\lib\site-packages\firefox_ui_harness\testcases.py", line 326, in download_and_apply_forced_update

 06:47:02     INFO -     dialog = self.windows.switch_to(lambda win: type(win) is UpdateWizardDialog)

 06:47:02     INFO -   File "c:\jenkins\workspace\mozilla-central_update\build\venv\lib\site-packages\firefox_puppeteer\ui\windows.py", line 196, in switch_to

06:47:02 INFO - .format(target))
OS: Unspecified → Windows
Summary: TEST-UNEXPECTED-ERROR | test_fallback_update.py TestFallbackUpdate.test_update | NoSuchWindowException: NoSuchWindowException: No window found for '<function <lambda> at 0x016BD1B0>' → TEST-UNEXPECTED-ERROR | test_fallback_update.py TestFallbackUpdate.test_update | NoSuchWindowException: No window found for '<function <lambda> at 0x016BD1B0>'
Got this failing constantly on the same machine (mm-win-7-32-1.qa.scl3.mozilla.com) for Firefox 49 Beta 2 ondemand updates on beta-cdntest - see the following job and the next three: https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&revision=b1bdd0f3482a&group_state=expanded&filter-tier=3&filter-searchStr=Fxup-beta-cdntest(&selectedJob=1438838
This failure mainly occurs on Windows XP machines. The slave nodes we currently have in mozmill-ci had all a Java update prompt open. Looks like the update checks somehow have been turned on again. I disabled the update checker completely now by removing it from the autostart. Lets see if that makes a difference. If not I will re-check this bug again.
So this problem seems to have started on May 22nd:

https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1274943&startday=2016-05-01&endday=2016-05-29&tree=all

We actually fail to switch to the old UpdateWizardDialog:

> dialog = self.windows.switch_to(lambda win: type(win) is UpdateWizardDialog) 

It means that the build we are running at this time is the one from May 21st due to Fxup-nightly(en-US-1). So a change between May 20th and 21st should have caused this problem.
Those are all the changesets between May 20th and 21st:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c67dc1f9fab86d4f2cf3224307809c44fe3ce820&tochange=f1f2644d34440fe38c098e323bf570e09197e51a

There is nothing in that list which indicates this failure, which was really only mozilla-central related at this time.
Nowadays the logs are actually showing a JS exception:

05:54:25     INFO -  *************************
05:54:25     INFO -  A coding exception was thrown in a Promise resolution callback.
05:54:25     INFO -  See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
05:54:25     INFO -  Full message: TypeError: win is null
05:54:25     INFO -  Full stack: onSuccess@resource://app/components/nsBrowserGlue.js:758:17
05:54:25     INFO -  Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:937:23
05:54:25     INFO -  this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:816:7
05:54:25     INFO -  Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:747:11
05:54:25     INFO -  this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:779:7
05:54:25     INFO -  this.PromiseWalker.completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:714:7
05:54:25     INFO -  get _worker/worker.onmessage@resource://gre/modules/PromiseWorker.jsm:231:9
05:54:25     INFO -  Spinner.prototype.observe@resource://gre/modules/AsyncShutdown.jsm:551:9
05:54:26     INFO -  *************************

https://dxr.mozilla.org/mozilla-central/rev/b7f7ae14590aced450bb0b0469dfb38edd2c0ace/browser/components/nsBrowserGlue.js#758

This is actually part of checkForPendingCrashReports() and was added by bug 1269998. Not sure if this actually affects us but it could be. I will file a separate bug for that.
Depends on: 1299798
I expanded the pushlog to a day before and after:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c4449eab07d39e20ea315603f1b1863eeed7dcfe&tochange=16663eb3dcfa759f25b5e27b101bc79270c156f2

There is the landing of bug 311614, which delayed the opening of the software update dialog. This could clearly be the reason here. So expanding the timeout should help.
Blocks: 311614
Flags: needinfo?(spohl.mozilla.bugs)
Keywords: regression
(In reply to Henrik Skupin (:whimboo) from comment #23)
> I expanded the pushlog to a day before and after:
> https://hg.mozilla.org/mozilla-central/
> pushloghtml?fromchange=c4449eab07d39e20ea315603f1b1863eeed7dcfe&tochange=1666
> 3eb3dcfa759f25b5e27b101bc79270c156f2
> 
> There is the landing of bug 311614, which delayed the opening of the
> software update dialog. This could clearly be the reason here. So expanding
> the timeout should help.

I didn't catch the question for the n-i here. Could you clarify?
Flags: needinfo?(spohl.mozilla.bugs)
(In reply to Stephen A Pohl [:spohl] from comment #24)
> I didn't catch the question for the n-i here. Could you clarify?

Sorry, originally I wanted to put ni? on you but then decided to only CC you. Then I missed to remove the ni? request.

Given that this was a kinda long outstandig ui issue, the problem here is that we expect the software update window to appear immediately after a restart:

https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/testing/firefox-ui/harness/firefox_ui_harness/testcases.py#321

I think a simple Wait.until() call should do the trick by killing this race. Also we shouldn't have to rely on the sessionstore-windows-restored observer notification which is not yet supported by Marionette (bug 1300709).
Happy to take a patch if you have one but as it is not a recent regression...
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Summary: TEST-UNEXPECTED-ERROR | test_fallback_update.py TestFallbackUpdate.test_update | NoSuchWindowException: No window found for '<function <lambda> at 0x016BD1B0>' → Intermittent test_fallback_update.py TestFallbackUpdate.test_update | NoSuchWindowException: No window found for '<function <lambda> at 0x016BD1B0>'
Comment on attachment 8788397 [details]
Bug 1274943 - Ensure to wait for the update dialog after a forced fallback.

https://reviewboard.mozilla.org/r/76900/#review75042
Attachment #8788397 - Flags: review?(mjzffr) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/431b256767de
Ensure to wait for the update dialog after a forced fallback. r=maja_zf
https://hg.mozilla.org/mozilla-central/rev/431b256767de
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Depends on: 1300709
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: