Intermittent [tier 2] /webdriver/tests/close_window/user_prompts.py | test_ignore[capabilities0-alert] - webdriver.error.JavascriptErrorException: javascript error (500): JavaScriptError: Document was unloaded
Categories
(Remote Protocol :: Marionette, defect, P5)
Tracking
(Not tracked)
People
(Reporter: intermittent-bug-filer, Unassigned)
References
Details
(Keywords: intermittent-failure)
Filed by: mlaza [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=401376198&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/HpCsiQZnR3qw0wPT5mGP8A/runs/0/artifacts/public/logs/live_backing.log
task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - TEST-PASS | /webdriver/tests/close_window/user_prompts.py | test_dismiss_and_notify[capabilities0-prompt-None]
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/close_window/user_prompts.py | test_ignore[capabilities0-alert] - webdriver.error.JavascriptErrorException: javascript error (500): JavaScriptError: Document was unloaded
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - check_user_prompt_not_closed_but_exception = <function check_user_prompt_not_closed_but_exception.<locals>.check_user_prompt_not_closed_but_exception at 0x0000016E395B03A0>
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - dialog_type = 'alert'
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO -
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - @pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - @pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type):
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO - > check_user_prompt_not_closed_but_exception(dialog_type)
[task 2023-01-04T19:49:03.026Z] 19:49:03 INFO -
[task 2023-01-04T19:49:03.027Z] 19:49:03 INFO - check_user_prompt_not_closed_but_exception = <function check_user_prompt_not_closed_but_exception.<locals>.check_user_prompt_not_closed_but_exception at 0x0000016E395B03A0>
[task 2023-01-04T19:49:03.027Z] 19:49:03 INFO - dialog_type = 'alert'
[task 2023-01-04T19:49:03.027Z] 19:49:03 INFO -
[task 2023-01-04T19:49:03.027Z] 19:49:03 INFO - tests\web-platform\tests\webdriver\tests\close_window\user_prompts.py:110:
[task 2023-01-04T19:49:03.027Z] 19:49:03 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2023-01-04T19:49:03.027Z] 19:49:03 INFO - tests\web-platform\tests\webdriver\tests\close_window\user_prompts.py:60: in check_user_prompt_not_closed_but_exception
Comment 1•2 years ago
|
||
The underlying failure for the reported issue happened in Execute Async Script
:
https://treeherder.mozilla.org/logviewer?job_id=401376198&repo=autoland&lineNumber=10977-10995
[task 2023-01-04T19:48:52.584Z] 19:48:52 INFO - PID 8828 | 1672861732582 Marionette DEBUG 0 -> [0,6,"WebDriver:ExecuteAsyncScript",{"args":["alert","alert"],"script":"\n let dialog_type = arguments[0];\n let text = arguments[1];\n\n setTimeout(function() {\n ... lse {\n window.dialog_return_value = window[dialog_type](text);\n }\n }, 0);\n "}]
[task 2023-01-04T19:48:53.945Z] 19:48:53 INFO - PID 8828 | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to C:\Users\task_167285755374373\AppData\Local\Temp\tmpzzgzdz7j.mozrunner\runtests_leaks_3956_tab_pid8832.log
[..]
[task 2023-01-04T19:48:54.069Z] 19:48:54 INFO - PID 8828 | 1672861734072 RemoteAgent TRACE WebDriverProcessData actor created for PID 8832
[task 2023-01-04T19:48:54.079Z] 19:48:54 INFO - PID 8828 | 1672861734079 Marionette TRACE [11] MarionetteCommands actor created for window id 26
[task 2023-01-04T19:48:54.128Z] 19:48:54 INFO - PID 8828 | JavaScript error: resource://gre/actors/BrowserElementChild.jsm, line 22: TypeError: can't access property "windowUtils", this.contentWindow is null
[task 2023-01-04T19:48:54.158Z] 19:48:54 INFO - PID 8828 | 1672861734163 Marionette DEBUG 0 <- [1,6,{"error":"javascript error","message":"JavaScriptError: Document was unloaded","stacktrace":"RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8\nWebDriverError@chrome://remote/content/shared/webdriver/Er ... sm:1049:17\nalert@resource://gre/modules/Prompter.jsm:1321:17\n@moz-nullprincipal:{7cafcd8d-ab0d-4591-9112-a65280663118}:10:65\n"},null]
The failure is not coming from our code but from BrowserElementChild.jsm
when the code tries to access this.contentWindow
in line 22 because our code opens a new alert prompt.
While for our MarionetteCommandChild actor the contentWindow
is available it's not anymore for any code as triggered by opening the dialog.
Nika, what should actually happen in such a situation? Should the child actor respond with some kind of error so that the related code in parent can retry? I'm not sure how Marionette should react on that.
Comment hidden (Intermittent Failures Robot) |
Comment 3•2 years ago
|
||
Comment hidden (Intermittent Failures Robot) |
Comment 5•1 year ago
|
||
Most likely fixed by bug 1816538.
Description
•