Closed Bug 1958630 Opened 1 year ago Closed 1 year ago

Intermittent /webdriver/tests/classic/get_element_rect/user_prompts.py | test_default[alert-None] - webdriver.error.NoSuchWindowException: no such window (404): Browsing context has been discarded [content process crash]

Categories

(Remote Protocol :: Marionette, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure)

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


[task 2025-04-05T14:10:01.009Z] 14:10:01     INFO - TEST-PASS | /webdriver/tests/classic/get_element_rect/user_prompts.py | test_ignore[prompt] 
[task 2025-04-05T14:10:01.009Z] 14:10:01     INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/classic/get_element_rect/user_prompts.py | test_default[alert-None] - webdriver.error.NoSuchWindowException: no such window (404): Browsing context has been discarded
[task 2025-04-05T14:10:01.009Z] 14:10:01     INFO - check_user_prompt_closed_with_exception = <function check_user_prompt_closed_with_exception.<locals>.check_user_prompt_closed_with_exception at 0x0000029BBA11AA20>
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - dialog_type = 'alert', retval = None
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO -     @pytest.mark.parametrize("dialog_type, retval", [
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO -         ("alert", None),
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO -         ("confirm", False),
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO -         ("prompt", None),
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO -     ])
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO -     def test_default(check_user_prompt_closed_with_exception, dialog_type, retval):
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - >       check_user_prompt_closed_with_exception(dialog_type, retval)
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - check_user_prompt_closed_with_exception = <function check_user_prompt_closed_with_exception.<locals>.check_user_prompt_closed_with_exception at 0x0000029BBA11AA20>
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - dialog_type = 'alert'
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - retval     = None
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - tests\web-platform\tests\webdriver\tests\classic\get_element_rect\user_prompts.py:122: 
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2025-04-05T14:10:01.010Z] 14:10:01     INFO - tests\web-platform\tests\webdriver\tests\classic\get_element_rect\user_prompts.py:47: in check_user_prompt_closed_with_exception
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -     assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         create_dialog = <function create_dialog.<locals>.create_dialog at 0x0000029BBA11ACA0>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         dialog_type = 'alert'
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         element    = <WebElement bc9381c8-0d25-41ae-95a1-e3b287b48607>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         inline     = <function inline.<locals>.inline at 0x0000029BBA11AFC0>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         response   = <Response status=500 error=<UnexpectedAlertOpenException http_status=500>>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         retval     = None
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         session    = <Session f1724437-bb8e-47ad-ace1-ccdf8e16a8ff>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO - tests\web-platform\tests\webdriver\tests\support\asserts.py:101: in assert_dialog_handled
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -     "User prompt with text '{}' was not handled.".format(expected_text))
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         expected_retval = None
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         expected_text = 'alert'
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         session    = <Session f1724437-bb8e-47ad-ace1-ccdf8e16a8ff>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO - tests\web-platform\tests\tools\webdriver\webdriver\client.py:22: in inner
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -     return func(self, *args, **kwargs)
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         args       = ()
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         func       = <function UserPrompt.text at 0x0000029BBA01E2A0>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         kwargs     = {}
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         self       = <webdriver.client.UserPrompt object at 0x0000029BBA1EBD10>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO -         session    = <Session f1724437-bb8e-47ad-ace1-ccdf8e16a8ff>
[task 2025-04-05T14:10:01.011Z] 14:10:01     INFO - tests\web-platform\tests\tools\webdriver\webdriver\client.py:423: in text
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -     return self.session.send_session_command("GET", "alert/text")
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         self       = <webdriver.client.UserPrompt object at 0x0000029BBA1EBD10>
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - tests\web-platform\tests\tools\webdriver\webdriver\client.py:603: in send_session_command
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -     return self.send_command(method, url, body, timeout)
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         body       = None
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         method     = 'GET'
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         self       = <Session f1724437-bb8e-47ad-ace1-ccdf8e16a8ff>
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         timeout    = None
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         uri        = 'alert/text'
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         url        = 'session/f1724437-bb8e-47ad-ace1-ccdf8e16a8ff/alert/text'
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - self = <Session f1724437-bb8e-47ad-ace1-ccdf8e16a8ff>, method = 'GET'
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - url = 'session/f1724437-bb8e-47ad-ace1-ccdf8e16a8ff/alert/text', body = None
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - timeout = None
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -     def send_command(self, method, url, body=None, timeout=None):
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         """
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         Send a command to the remote end and validate its success.
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         :param method: HTTP method to use in request.
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -         :param uri: "Command part" of the HTTP request URL,
[task 2025-04-05T14:10:01.012Z] 14:10:01     INFO -             e.g. `window/rect`.
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         :param body: Optional body of the HTTP request.
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         :return: `None` if the HTTP response body was empty, otherwise
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             the `value` field returned after parsing the response
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             body as JSON.
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         :raises error.WebDriverException: If the remote end returns
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             an error.
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         :raises ValueError: If the response body does not contain a
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             `value` key.
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         """
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         response = self.transport.send(
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             method, url, body,
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             encoder=protocol.Encoder, decoder=protocol.Decoder,
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -             session=self, timeout=timeout)
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.013Z] 14:10:01     INFO -         if response.status != 200:
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO -             err = error.from_response(response)
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO -             if isinstance(err, error.InvalidSessionIdException):
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO -                 # The driver could have already been deleted the session.
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO -                 self.session_id = None
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO -     
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO - >           raise err
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO - E           webdriver.error.NoSuchWindowException: no such window (404): Browsing context has been discarded
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO - E           
[task 2025-04-05T14:10:01.014Z] 14:10:01     INFO - E           Remote-end stacktrace:
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:199:5
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           NoSuchWindowError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:747:5
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           assert.that/<@chrome://remote/content/shared/webdriver/Assert.sys.mjs:559:13
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           assert.open@chrome://remote/content/shared/webdriver/Assert.sys.mjs:147:4
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           GeckoDriver.prototype.getTextFromDialog@chrome://remote/content/marionette/driver.sys.mjs:3013:15
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           despatch@chrome://remote/content/marionette/server.sys.mjs:318:40
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           execute@chrome://remote/content/marionette/server.sys.mjs:289:16
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           onPacket/<@chrome://remote/content/marionette/server.sys.mjs:262:20
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           onPacket@chrome://remote/content/marionette/server.sys.mjs:263:9
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - E           _onJSONObjectReady/<@chrome://remote/content/marionette/transport.sys.mjs:494:20
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - body       = None
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - err        = <NoSuchWindowException http_status=404>
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - method     = 'GET'
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - response   = <Response status=404 error=<NoSuchWindowException http_status=404>>
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - self       = <Session f1724437-bb8e-47ad-ace1-ccdf8e16a8ff>
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - timeout    = None
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - url        = 'session/f1724437-bb8e-47ad-ace1-ccdf8e16a8ff/alert/text'
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - 
[task 2025-04-05T14:10:01.015Z] 14:10:01     INFO - tests\web-platform\tests\tools\webdriver\webdriver\client.py:567: NoSuchWindowException
[task 2025-04-05T14:10:01.017Z] 14:10:01     INFO - ..
[task 2025-04-05T14:10:01.017Z] 14:10:01     INFO - TEST-OK | /webdriver/tests/classic/get_element_rect/user_prompts.py | took 21990ms

This happened because of a content process crash that geckodriver didn't detect. This requires bug 1943038.

Depends on: 1943038
Summary: Intermittent /webdriver/tests/classic/get_element_rect/user_prompts.py | test_default[alert-None] - webdriver.error.NoSuchWindowException: no such window (404): Browsing context has been discarded → Intermittent /webdriver/tests/classic/get_element_rect/user_prompts.py | test_default[alert-None] - webdriver.error.NoSuchWindowException: no such window (404): Browsing context has been discarded [content process crash]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.