Hang after interacting with prompt from beforeunload event
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(firefox-esr68 unaffected, firefox71 wontfix, firefox72 wontfix, firefox73 wontfix, firefox75 wontfix, firefox76 wontfix, firefox77 fixed)
People
(Reporter: kovalev007, Unassigned)
References
(Regression)
Details
Original discussion: https://github.com/mozilla/geckodriver/issues/1653
Testcase:
https://output.jsbin.com/fixoxun
- click on button with text "open"
- wait new window opened
- click on button with text "close"
- accept user promt
- wait new window closed
Actual results: geckodriver hung after accept user promt
Changeset due to which an error appeared: 5d6397e990cbc374be49baaa4fc6622dfed18119
Comment 1•4 years ago
|
||
What has not been mentioned above is the fact that also dom.disable_beforeunload
has to be set to false
. It means this code path is currently not supported, but we somehow introduced a change with dynamically handling the alerts in bug 1477977 and especially the above mentioned changeset.
Reporter | ||
Comment 2•4 years ago
|
||
Any response on this?
I maked some investigation on code.
https://hg.mozilla.org/integration/autoland/comparison/5d6397e990cbc374be49baaa4fc6622dfed18119/testing/marionette/driver.js#l3181r3186
https://hg.mozilla.org/integration/autoland/comparison/5d6397e990cbc374be49baaa4fc6622dfed18119/testing/marionette/driver.js#l3199r3203
And in my opinion "await new IdlePromise(win);" not needed in dismissDialog and acceptDialog.
I was looking for the use of "IdlePromise" in code:
IdlePromise used only in setWindowRect, minimizeWindow, maximizeWindow, fullscreenWindow.
All this functions work with window size.
And the use of "IdlePromise" in "dismissDialog" and "acceptDialog" - does not fit into the context of working with window size
Also the test case from first comment working correctly if I remove "await new IdlePromise(win);" from dismissDialog and acceptDialog.
What do you think about it?
Comment 3•4 years ago
|
||
The idlePromise
isn't only tied to any window manipulation code. It just means that the code has to wait for the main thread to become idle, and a requestAnimationFrame
event to be fired. The latter will happen about 17 times within a second. So I don't understand why removing it helps here. If it does for you it might actually cause a race condition.
Comment 4•4 years ago
|
||
George, does that work for you now? Please check with the latest Firefox Nightly. Thanks!
Reporter | ||
Comment 5•4 years ago
|
||
I will return later with results.
Reporter | ||
Comment 6•4 years ago
|
||
Henrik, I checked examples from this bug and from https://bugzilla.mozilla.org/show_bug.cgi?id=1619481. Both examples works good with the latest Firefox Nightly.
Comment 7•4 years ago
|
||
This is great to hear! Thanks a lot for your help and endurance to get this problem fixed. I kinda appreciate.
Given that the idlePromise
was the only problem I will go ahead and simply dupe this bug over.
Updated•4 years ago
|
Updated•2 years ago
|
Updated•10 months ago
|
Description
•