Closed Bug 1841428 Opened 2 years ago Closed 1 year ago

Intermittent dom/base/test/fullscreen/test_fullscreen_modal.html | single tracking bug

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox115 --- unaffected
firefox116 --- wontfix
firefox117 --- wontfix
firefox123 --- wontfix
firefox124 --- wontfix
firefox125 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: bradwerth)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression)

Attachments

(1 file)

Filed by: ctuns [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=421285374&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ayNUVo1KRdqpDRl1pg-jJw/runs/0/artifacts/public/logs/live_backing.log


[task 2023-07-02T09:57:02.941Z] 09:57:02     INFO - TEST-PASS | dom/base/test/fullscreen/test_fullscreen_modal.html | Should be transitioning to fullscreen 
[task 2023-07-02T09:57:02.941Z] 09:57:02     INFO - Buffered messages finished
[task 2023-07-02T09:57:02.941Z] 09:57:02     INFO - TEST-UNEXPECTED-FAIL | dom/base/test/fullscreen/test_fullscreen_modal.html | Test timed out. - 
[task 2023-07-02T09:57:03.907Z] 09:57:03     INFO - GECKO(7452) | MEMORY STAT | vsize 6734MB | residentFast 130MB | heapAllocated 7MB
[task 2023-07-02T09:57:03.919Z] 09:57:03     INFO - TEST-OK | dom/base/test/fullscreen/test_fullscreen_modal.html | took 322486ms
[task 2023-07-02T09:57:07.029Z] 09:57:07     INFO - Error: Unable to restore focus, expect failures and timeouts.
[task 2023-07-02T09:57:07.056Z] 09:57:07     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-07-02T09:57:07.056Z] 09:57:07     INFO - TEST-UNEXPECTED-FAIL | dom/base/test/fullscreen/test_fullscreen_modal.html | TypeError: Fullscreen request aborted - Should not throw any errors
[task 2023-07-02T09:57:07.056Z] 09:57:07     INFO -     add_task/nextTick/<@SimpleTest/SimpleTest.js:2165:26
[task 2023-07-02T09:57:07.056Z] 09:57:07     INFO -     async*nextTick@SimpleTest/SimpleTest.js:2182:11
[task 2023-07-02T09:57:07.056Z] 09:57:07     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:920:41
[task 2023-07-02T09:57:07.057Z] 09:57:07     INFO -     add_task@SimpleTest/SimpleTest.js:2096:17
[task 2023-07-02T09:57:07.057Z] 09:57:07     INFO -     @dom/base/test/fullscreen/test_fullscreen_modal.html?currentTestURL=dom%2Fbase%2Ftest%2Ffullscreen%2Ftest_fullscreen_modal.html&closeWhenDone=1&showTestReport=false&expected=pass:65:9
[task 2023-07-02T09:57:07.057Z] 09:57:07    ERROR - TEST-UNEXPECTED-FAIL | SimpleTest | this test already called finish!
[task 2023-07-02T09:57:07.092Z] 09:57:07     INFO - GECKO(7452) | [Parent 7452, Main Thread] WARNING: Received `load` event on unbridged BrowserParent!: file /builds/worker/checkouts/gecko/dom/ipc/BrowserParent.cpp:4016
[task 2023-07-02T09:57:07.092Z] 09:57:07     INFO - GECKO(7452) | [Parent 7452, Main Thread] WARNING: Received `load` event on unbridged BrowserParent!: file /builds/worker/checkouts/gecko/dom/ipc/BrowserParent.cpp:4016
[task 2023-07-02T09:57:07.095Z] 09:57:07    ERROR - addAssertionCount should only be called by a cross origin test
[task 2023-07-02T09:57:07.096Z] 09:57:07     INFO - TEST-UNEXPECTED-ERROR | dom/base/test/fullscreen/test_fullscreen_modal.html | called finish() multiple times
[task 2023-07-02T09:57:07.096Z] 09:57:07     INFO - TEST-INFO 
[task 2023-07-02T09:57:07.099Z] 09:57:07     INFO - GECKO(7452) | [Child 7464, Main Thread] WARNING: IPC message 'PContent::Msg_StoreUserInteractionAsPermission' discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp:508
[task 2023-07-02T09:57:07.100Z] 09:57:07     INFO - GECKO(7452) | [Child 7464, Main Thread] WARNING: nsAppShell::Exit() called redundantly: file /builds/worker/checkouts/gecko/widget/cocoa/nsAppShell.mm:861
[task 2023-07-02T09:57:07.205Z] 09:57:07     INFO - GECKO(7452) | [Parent 7452, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/netwerk/dns/nsEffectiveTLDService.cpp:234
[task 2023-07-02T09:57:07.206Z] 09:57:07     INFO - GECKO(7452) | [Parent 7452, Main Thread] WARNING: 'NS_FAILED(rv)', file /builds/worker/checkouts/gecko/toolkit/components/antitracking/AntiTrackingUtils.cpp:517
[task 2023-07-02T09:57:07.212Z] 09:57:07     INFO - TEST-START | Shutdown

:bradwerth, since you are the author of the regressor, bug 1827202, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(bwerth)
Assignee: nobody → bwerth
Flags: needinfo?(bwerth)

Hmmm... thought we had this one figured in Bug 1827202. I'll take another look.

Set release status flags based on info from the regressing bug 1827202

Looking again to try to fixup the test definitively. It's hard. The error log gives us "Fullscreen request denied" which comes from https://searchfox.org/mozilla-central/rev/877adfeec838cdad97369441865bac605109427d/dom/base/FullscreenChange.h#106, but it doesn't output whichever of the many reasons for rejection. Since those are internal error enums representing an implementation detail, it's hard to justify exposing them to JS. Best guess is that this is another instance of FullscreenDeniedNotFocusedTab, but it's hard to know how to force the browsing context to be topmost, which is what causes this rejection. Options:

  1. Try the request N times with a delay until it succeeds, swallowing the intermediate rejections.
  2. Do more to force the browsing context to be topmost. Apparently fullscreenElement.focus(); is not sufficient.

I'll see if I can get either one of those to look nice in the context of this test. It's really a shame that our fullscreen stuff is so timing dependent, because the fullscreen API resolves promises when the fullscreen transition begins, not when it ends.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

The most recent failure shows that document.exitFullscreen() is getting dropped. There are multiple early exits that could cause this...

In RestorePreviousFullscreenState:

  • No active window. Probably impossible since the document had a window when it entered fullscreen.
  • Not in fullscreen mode. Not this. The test checks that there is a fullscreen element.

In SetFullscreenInternal:

  • Some confusion about whether we are in DOM fullscreen or window fullscreen. Not this. The logic should keep this from mattering since exiting fullscreen is allowed for both cases.
  • If we're still in a fullscreen processing request. This is at least possible since we just entered fullscreen and awaiting the promise is not really a signifier that the internal fullscreen state has caught up.

So the fix will be adding a wait on some signal that the fullscreen enter request is all the way done. I'm still not sure what the last signal is in the fullscreen transition. Many other fullscreen tests choose to wait on the browsing context becoming active again. That works in those tests; that's what I'll add here.

This change checks that the interal fullscreen state is sensible before
trying to exit fullscreen. Awaiting the requestFullscreen promise is not
sufficient.

Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/17158d000a76 In test_fullscreen_modal, ensure document is active before trying to exit fullscreen. r=edgar
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: