Implement "browsingContext.navigationFailed" event
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox130 fixed)
| Tracking | Status | |
|---|---|---|
| firefox130 | --- | fixed |
People
(Reporter: whimboo, Assigned: Sasha)
References
(Blocks 3 open bugs, )
Details
(Whiteboard: [webdriver:m12][wptsync upstream][webdriver:relnote])
Attachments
(8 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
This bug covers the implementation of the browsingContext.navigationFailed event.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 1•2 years ago
|
||
https://github.com/puppeteer/puppeteer/pull/11836 caused P2 Puppeteer tests to break because they are now awaiting events like this one. Via https://github.com/puppeteer/puppeteer/issues/11913 it will be reverted for now but we probably should consider to also implement this event for M10/M11. Lets discuss.
Comment 2•2 years ago
|
||
We are going to add a workaround by using at least readiness interactive for now!
| Reporter | ||
Comment 3•2 years ago
|
||
As discussed we should take a look at this issue in the next milestone. We should figure out in general under which conditions this event needs to be emitted. Some more examples would be good. Alex, it sounds like that Chrome has it already implemented. Did you consider adding wdspec tests?
Also we should check if this event needs to be emitted when we end-up on internal error pages like the site being blocked by safebrowsing for malware or phishing. What does Chrome do in such cases?
Comment 4•2 years ago
|
||
I will need to check if we actually have it implemented. It looks like Chrome might not be returning early and always returning the error via navigation. sadym@ do you know the latest status here?
Comment 5•2 years ago
|
||
FYI, jrandolf summarized when the navigationFailed event should be triggered over at https://github.com/w3c/webdriver-bidi/issues/662
| Reporter | ||
Comment 6•2 years ago
|
||
I'll take a look what's needed. Thanks for the link Julian.
Comment 7•1 year ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:whimboo, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
| Reporter | ||
Comment 8•1 year ago
|
||
As talked with Sasha, she will take a look.
| Assignee | ||
Comment 9•1 year ago
|
||
Ok, so I've checked in which cases WebDriver BiDi navigation failed steps are called in the html spec, and from what I've understood it happens when:
unloadis happening (see here step 8);beforeunloadcancels the navigation (see here step 20);- the navigation is not committed into history and another navigation starts (i.e. the latest navigation always takes precedent unless the current navigation is already committed into history.) (see here step 16);
- the navigation was not committed into history, because of (see here step 4):
-- a navigation response to a navigation request is blocked by Content Security Policy;
-- a navigation response's adherence is blocked by its embedder policy
-- a navigation response's adherence is blocked byX-Frame-Options
| Assignee | ||
Comment 10•1 year ago
|
||
Alex, as far as I understood, browsingContext.navigationFailed event doesn't block any tests at the moment, could you confirm (or object) this?
Comment 11•1 year ago
|
||
I think it currently does not block any tests but it makes it impossible to use browsingContext.navigate with browsingContext.ReadinessState = "none" as there is no way to receive the failures (we attempted to use it this way to simplify the client implementation but reverted)
| Reporter | ||
Comment 12•1 year ago
|
||
Alex, would it be fine with you when we are going to work on this event in the next milestone (M12)? I'm asking because it may take a bit more work than just emitting the event at the right places.
| Reporter | ||
Comment 14•1 year ago
|
||
Thanks. Moving over already.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
| Assignee | ||
Comment 17•1 year ago
|
||
| Assignee | ||
Comment 18•1 year ago
|
||
| Assignee | ||
Comment 19•1 year ago
|
||
| Assignee | ||
Comment 20•1 year ago
|
||
| Assignee | ||
Comment 21•1 year ago
|
||
| Assignee | ||
Comment 22•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 23•1 year ago
|
||
Comment 25•1 year ago
|
||
Backed out for causing wd failures on navigate/error.py.
[task 2024-07-26T20:06:52.038Z] 20:06:52 INFO - PID 4458 | 1722024412038 webdriver::server DEBUG <- 200 OK {"value":null}
[task 2024-07-26T20:06:52.040Z] 20:06:52 INFO - PID 4458 | 1722024412039 webdriver::server DEBUG -> DELETE /session/190af4af-d4b6-4d6a-b9d8-e31d0253d02a
[task 2024-07-26T20:06:52.342Z] 20:06:52 INFO - PID 4458 | 1722024412340 webdriver::server DEBUG Teardown session
[task 2024-07-26T20:06:52.342Z] 20:06:52 INFO - PID 4458 | 1722024412341 geckodriver::android DEBUG Force stopping the Android package: org.mozilla.geckoview.test_runner
[task 2024-07-26T20:06:52.343Z] 20:06:52 INFO - PID 4458 | 1722024412341 mozdevice DEBUG Force stopping Android package: org.mozilla.geckoview.test_runner
[task 2024-07-26T20:06:52.343Z] 20:06:52 INFO - PID 4458 | 1722024412341 mozdevice TRACE execute_host_command: >> "host:transport:emulator-5554"
[task 2024-07-26T20:06:52.343Z] 20:06:52 INFO - PID 4458 | 1722024412341 mozdevice TRACE execute_host_command: << []
[task 2024-07-26T20:06:52.344Z] 20:06:52 INFO - PID 4458 | 1722024412341 mozdevice TRACE execute_host_command: >> "shell:am force-stop org.mozilla.geckoview.test_runner"
[task 2024-07-26T20:06:52.544Z] 20:06:52 INFO - PID 4458 | 1722024412543 mozdevice TRACE execute_host_command: << ""
[task 2024-07-26T20:06:52.545Z] 20:06:52 INFO - PID 4458 | 1722024412543 mozdevice TRACE execute_host_command: >> "host:transport:emulator-5554"
[task 2024-07-26T20:06:52.546Z] 20:06:52 INFO - PID 4458 | 1722024412543 mozdevice TRACE execute_host_command: << []
[task 2024-07-26T20:06:52.546Z] 20:06:52 INFO - PID 4458 | 1722024412543 mozdevice TRACE execute_host_command: >> "shell:am clear-debug-app org.mozilla.geckoview.test_runner"
[task 2024-07-26T20:06:52.744Z] 20:06:52 INFO - PID 4458 | 1722024412743 mozdevice TRACE execute_host_command: << ""
[task 2024-07-26T20:06:52.746Z] 20:06:52 INFO - PID 4458 | 1722024412743 geckodriver::android DEBUG Disabled reading from configuration file
[task 2024-07-26T20:06:52.746Z] 20:06:52 INFO - PID 4458 | 1722024412743 mozdevice DEBUG Deleting /data/local/tmp/org.mozilla.geckoview.test_runner-geckoview-config.yaml
[task 2024-07-26T20:06:52.747Z] 20:06:52 INFO - PID 4458 | 1722024412744 mozdevice TRACE execute_host_command: >> "host:transport:emulator-5554"
[task 2024-07-26T20:06:52.747Z] 20:06:52 INFO - PID 4458 | 1722024412744 mozdevice TRACE execute_host_command: << []
[task 2024-07-26T20:06:52.747Z] 20:06:52 INFO - PID 4458 | 1722024412744 mozdevice TRACE execute_host_command: >> "shell:rm -rf /data/local/tmp/org.mozilla.geckoview.test_runner-geckoview-config.yaml"
[task 2024-07-26T20:06:52.753Z] 20:06:52 INFO - PID 4458 | 1722024412752 mozdevice TRACE execute_host_command: << ""
[task 2024-07-26T20:06:52.753Z] 20:06:52 INFO - PID 4458 | 1722024412752 geckodriver::android DEBUG Deleted GeckoView configuration file
[task 2024-07-26T20:06:52.755Z] 20:06:52 INFO - PID 4458 | 1722024412752 mozdevice DEBUG Deleting /sdcard/Android/data/org.mozilla.geckoview.test_runner/files/test_root
[task 2024-07-26T20:06:52.755Z] 20:06:52 INFO - PID 4458 | 1722024412752 mozdevice TRACE execute_host_command: >> "host:transport:emulator-5554"
[task 2024-07-26T20:06:52.755Z] 20:06:52 INFO - PID 4458 | 1722024412752 mozdevice TRACE execute_host_command: << []
[task 2024-07-26T20:06:52.755Z] 20:06:52 INFO - PID 4458 | 1722024412752 mozdevice TRACE execute_host_command: >> "shell:rm -rf /sdcard/Android/data/org.mozilla.geckoview.test_runner/files/test_root"
[task 2024-07-26T20:06:52.855Z] 20:06:52 INFO - PID 4458 | 1722024412853 mozdevice TRACE execute_host_command: << ""
[task 2024-07-26T20:06:52.855Z] 20:06:52 INFO - PID 4458 | 1722024412853 geckodriver::android DEBUG Deleted test root folder: /sdcard/Android/data/org.mozilla.geckoview.test_runner/files/test_root
[task 2024-07-26T20:06:52.856Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: >> "host:transport:emulator-5554"
[task 2024-07-26T20:06:52.856Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: << []
[task 2024-07-26T20:06:52.859Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: >> "host-serial:emulator-5554:killforward:tcp:42238"
[task 2024-07-26T20:06:52.859Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: << ""
[task 2024-07-26T20:06:52.859Z] 20:06:52 INFO - PID 4458 | 1722024412854 geckodriver::android DEBUG Marionette port forward (42238 -> 2829) stopped
[task 2024-07-26T20:06:52.859Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: >> "host:transport:emulator-5554"
[task 2024-07-26T20:06:52.859Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: << []
[task 2024-07-26T20:06:52.860Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: >> "host-serial:emulator-5554:killforward:tcp:9222"
[task 2024-07-26T20:06:52.860Z] 20:06:52 INFO - PID 4458 | 1722024412854 mozdevice TRACE execute_host_command: << ""
[task 2024-07-26T20:06:52.860Z] 20:06:52 INFO - PID 4458 | 1722024412854 geckodriver::android DEBUG WebSocket port forward (9222 -> 9222) stopped
[task 2024-07-26T20:06:52.860Z] 20:06:52 INFO - PID 4458 | 1722024412854 webdriver::server DEBUG <- 200 OK {"value":null}
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO -
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - TEST-UNEXPECTED-ERROR | /_mozilla/webdriver/bidi/browsing_context/navigate/error.py | test_insecure_certificate - teardown error: webdriver.error.UnknownErrorException: unknown error (500): Failed to decode response from marionette
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - def finalizer() -> None:
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - """Yield again, to finalize."""
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO -
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - async def async_finalizer() -> None:
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - try:
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - await gen_obj.__anext__()
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - except StopAsyncIteration:
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - pass
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - else:
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - msg = "Async generator fixture didn't stop."
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - msg += "Yield only once."
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - raise ValueError(msg)
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO -
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - > event_loop.run_until_complete(async_finalizer())
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO -
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - async_finalizer = <function _wrap_asyncgen.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer.<locals>.async_finalizer at 0x7fcd1610f1f0>
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - event_loop = <_UnixSelectorEventLoop running=False closed=True debug=False>
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - gen_obj = <async_generator object geckodriver at 0x7fcd1610ff70>
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO -
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - tests/web-platform/tests/tools/third_party/pytest-asyncio/pytest_asyncio/plugin.py:291:
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - /usr/lib/python3.8/asyncio/base_events.py:608: in run_until_complete
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - return future.result()
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - future = <Task finished name='Task-7' coro=<_wrap_asyncgen.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer.<locals>.async_finalizer() done, defined at /builds/worker/workspace/build/tests/web-platform/tests/tools/third_party/pytest-asyncio/pytest_asyncio/plugin.py:281> exception=<UnknownErrorException http_status=500>>
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - new_task = True
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - self = <_UnixSelectorEventLoop running=False closed=True debug=False>
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - tests/web-platform/tests/tools/third_party/pytest-asyncio/pytest_asyncio/plugin.py:283: in async_finalizer
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - await gen_obj.__anext__()
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - gen_obj = <async_generator object geckodriver at 0x7fcd1610ff70>
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - tests/web-platform/mozilla/tests/webdriver/support/fixtures.py:133: in geckodriver
[task 2024-07-26T20:06:52.866Z] 20:06:52 INFO - await driver.stop()
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - _geckodriver = <function geckodriver.<locals>._geckodriver at 0x7fcd1610f700>
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - configuration = {'browser': {'args': ['--profile', '/tmp/tmpgfzlgnag.mozrunner'],
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'binary': None,
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'env': {'MOZ_CRASHREPORTER': '1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'MOZ_CRASHREPORTER_SHUTDOWN': '1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'MOZ_DISABLE_NONLOCAL_CONNECTIONS': '1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'RUST_BACKTRACE': '1'}},
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'capabilities': {'moz:firefoxOptions': {'androidDeviceSerial': 'emulator-5554',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'androidPackage': 'org.mozilla.geckoview.test_runner',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'args': ['--profile',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - '/tmp/tmpgfzlgnag.mozrunner'],
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'env': {'MOZ_CRASHREPORTER': '1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'MOZ_CRASHREPORTER_SHUTDOWN': '1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'MOZ_DISABLE_NONLOCAL_CONNECTIONS': '1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'RUST_BACKTRACE': '1'}}},
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'host': '127.0.0.1',
[task 2024-07-26T20:06:52.868Z] 20:06:52 INFO - 'port': 43136,
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - 'target_platform': 'android',
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - 'timeout_multiplier': 4,
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - 'webdriver': {'args': ['-vv'], 'binary': '/builds/worker/fetches/geckodriver'}}
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - driver = <support.helpers.Geckodriver object at 0x7fcd16178970>
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - tests/web-platform/mozilla/tests/webdriver/support/helpers.py:214: in stop
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - await self.delete_session()
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - self = <support.helpers.Geckodriver object at 0x7fcd16178970>
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - tests/web-platform/mozilla/tests/webdriver/support/helpers.py:228: in delete_session
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - self.session.end()
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - self = <support.helpers.Geckodriver object at 0x7fcd16178970>
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:529: in end
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - self.send_command("DELETE", "session/%s" % self.session_id)
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - self = <Session (disconnected)>
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2024-07-26T20:06:52.869Z] 20:06:52 INFO -
<...>
| Assignee | ||
Comment 27•1 year ago
|
||
The patches are updated, so should be good to try landing again.
Comment 28•1 year ago
|
||
Comment 29•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b34817c48018
https://hg.mozilla.org/mozilla-central/rev/a1952d3d6367
https://hg.mozilla.org/mozilla-central/rev/b05f209a3d13
https://hg.mozilla.org/mozilla-central/rev/b636ab9be4f5
https://hg.mozilla.org/mozilla-central/rev/ca5cc6007935
https://hg.mozilla.org/mozilla-central/rev/9609c517db6e
https://hg.mozilla.org/mozilla-central/rev/1b8501b09463
https://hg.mozilla.org/mozilla-central/rev/9e71df83ded9
| Reporter | ||
Updated•1 year ago
|
Description
•