Hangs in "WebDriver:Back" and "WebDriver:Forward" with BFCache enabled in parent process (for Fission)
Categories
(Remote Protocol :: Marionette, defect, P1)
Tracking
(Fission Milestone:M7a, firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: neha, Assigned: whimboo)
References
(Blocks 2 open bugs)
Details
Attachments
(5 files, 1 obsolete file)
These tests fail with BFCache+Fission
webdriver/tests/back/back.py
webdriver/tests/back/user_prompts.py
webdriver/tests/close_window/close.py
webdriver/tests/element_click/navigate.py
webdriver/tests/execute_script/execute.py
webdriver/tests/forward/forward.py
webdriver/tests/forward/user_prompts.py
failure log: https://treeherder.mozilla.org/logviewer?job_id=332690156&repo=try&lineNumber=2112
Prefs to use: fission.autostart and fission.bfcacheInParent
Reporter | ||
Comment 1•4 years ago
|
||
:whimboo, would you be able to debug these failures? If you see a DOM issue, please NI smaug or peterv. Thanks!
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
I'll have a look at those tests when I'm done with the new tab modal dialog support in Marionette.
Note that the WebDriver spec doesn't contain anything around bfcache yet. As such we won't have to block bug 721859.
Comment 3•4 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #2)
I'll have a look at those tests when I'm done with the new tab modal dialog support in Marionette.
In that case, I will tentatively assign this bug to you to determine the next action.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
So I had a quick look at the problems with Wdspec tests and the problem here is that the top-level browsing context gets swapped when the target page gets loaded from BFCache. Due to this swap the following check fails, and events as reported by the correct JSWindowActor instance (but different browsing context id now) are simply ignored:
So far when a navigation (e.g COOP) causes a process change we used the browsing-context-discarded
notification and continued waiting for the navigation to complete if the browsing context has been replaced:
https://searchfox.org/mozilla-central/rev/72951aa826642f048da4c6b71b8b3e36a9606dcd/testing/marionette/navigate.js#316-327
https://searchfox.org/mozilla-central/source/testing/marionette/driver.js#639-664
I wonder if there could be a dedicated notification that informs about a top-level browsing context swap like browsing-context-swapped
. Nika, would there anything like that doable?
If not we might be able to get it done by improving the check in onNavigation
by also allowing events from another top-level browsing context that has the same browserId. The downside is still that we won't recognize that swap if some other code that might be executed via execute_script
triggers a back/forward navigation.
So an event that we could listen for would be great to have.
Comment 5•4 years ago
|
||
You might be able to use the XULFrameLoaderCreated
event which is fired by the <browser>
element whenever a toplevel process switch of any kind has occurred: https://searchfox.org/mozilla-central/rev/72951aa826642f048da4c6b71b8b3e36a9606dcd/dom/base/nsFrameLoaderOwner.cpp#224. At that point, if the target browser is the one you're interested in, IIRC its .browsingContext
attribute should be updated to the new one.
Assignee | ||
Comment 6•4 years ago
|
||
Thanks Nika! That is actually the same as Olli also mentioned to me recently. I quickly tried to register this event and it seems to work fine for us. By using that we should be able to replace the whole logic around browsing-context-attached.
Assignee | ||
Comment 7•4 years ago
|
||
As testing has shown there is also bug 1680479, which is now happening way more often and which needs to bee also fixed before BFCache can be enabled for Fission when running Marionette tests. Nevertheless I got most of the previously skipped tests re-enabled (except the certificate error test from test_navigation.py). So navigation related issues should be (hopefully) all fixed once this bug is fixed.
Due to bug 1680479 we should not enable BFCache by default yet for Marionette.
Assignee | ||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
I hope bug 1703607 helps with the about:certerror case.
Assignee | ||
Comment 9•4 years ago
|
||
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D113766
Assignee | ||
Comment 11•4 years ago
|
||
When there is a remoteness change the order of page load events
is not guaranteed. As such a "pagehide" event from the current
page might be received after a "pageshow" event from the target
page.
Depends on D113767
Assignee | ||
Comment 12•4 years ago
|
||
Especially with BFCache enabled for Fission there is no new
browsing context created when a page comes out of the cache.
As such the current logic to detect remoteness changes doesn't
work. Instead the "XULFrameLoaderCreated" event on the tabbrowser
object can be used instead, which is always fired.
Depends on D113768
Assignee | ||
Comment 13•4 years ago
|
||
(In reply to Olli Pettay [:smaug] (away May 1 - 8) from comment #8)
I hope bug 1703607 helps with the about:certerror case.
It doesn't help at least with those changes that already landed. As such I will keep this single test disabled.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 14•3 years ago
|
||
Depends on D113766
Assignee | ||
Updated•3 years ago
|
Comment 15•3 years ago
|
||
Comment 17•3 years ago
|
||
Backed out for causing wpt failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/6f0af2de57abf4f1ca8f7c154026bc4b2e8e07cc
Failure log: https://treeherder.mozilla.org/logviewer?job_id=339271959&repo=autoland&lineNumber=1915
Assignee | ||
Comment 19•3 years ago
|
||
Reason here is the following failure: TypeError: tabBrowser.addEventListener is not a function
.
It's because the mobile browser implementation adds a shim around the tab browser:
https://searchfox.org/mozilla-central/rev/716d7cd80b3dcd81c005ad13b51d3e6a85bd7e73/testing/marionette/browser.js#71-104
I'll have to figure out where I have to register for the event, and if it is available at all.
Assignee | ||
Comment 20•3 years ago
|
||
Depends on D113768
Comment 21•3 years ago
|
||
Comment 22•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d8615fb91eed
https://hg.mozilla.org/mozilla-central/rev/7a9ad3123c6f
https://hg.mozilla.org/mozilla-central/rev/07367d3fdd97
https://hg.mozilla.org/mozilla-central/rev/78a4c80b04a7
https://hg.mozilla.org/mozilla-central/rev/a381d0b29463
Updated•2 years ago
|
Description
•