Implement "network.fetchError" event
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox123 fixed)
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: whimboo, Assigned: jdescottes, NeedInfo)
References
(Blocks 3 open bugs, )
Details
(Whiteboard: [webdriver:m10][wptsync upstream][webdriver:relnote])
Attachments
(3 files, 1 obsolete file)
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Adding as tentative bug for our M6 milestone.
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Note that the errorText
field of the event payload is not in the specs yet:
TODO: Set the errorText field of params.
Assignee | ||
Comment 3•1 year ago
|
||
I filed https://github.com/w3c/webdriver-bidi/issues/631 about the missing errorText definition.
Assignee | ||
Comment 4•11 months ago
|
||
Hi Valentin,
I'm trying to use the "stop" and "error" events on the ChannelWrapper in order to know if a request succeeded or failed. In most situations this works fine, but I have an issue on Android where redirects emit both "error" and then "stop". On Firefox Desktop, only "stop" is emitted in the same scenarios.
This seems to happen for any redirect, but for instance this shows up in the following test: https://searchfox.org/mozilla-central/rev/24ea2579c4a94d5da8db4bb529cbefe5e5e3c2d3/testing/web-platform/tests/webdriver/tests/bidi/network/response_completed/response_completed.py#308-370
I can work around that by ignoring channels which are failing with the error "NS_BINDING_REDIRECTED", but that leads to another problem. If I am redirecting to a URL that should result in a fetch error, on Android the error will still be "NS_BINDING_REDIRECTED", whereas on desktop I will have the correct error (eg NS_ERROR_UNKNOWN_HOST).
Do you know if there are issues/limitations with redirected requests on Android, or should I file a dedicated bug for that?
Assignee | ||
Comment 5•11 months ago
|
||
Also pinging Olivia for the question above, since I only tested with the testrunner on Android. Could it be something that also needs to be fixed in the android testrunner?
Assignee | ||
Comment 6•11 months ago
|
||
Updated•11 months ago
|
Assignee | ||
Comment 7•11 months ago
|
||
Depends on D197586
Assignee | ||
Comment 8•11 months ago
|
||
Depends on D197587
Assignee | ||
Comment 9•11 months ago
|
||
Depends on D197588
On Windows CI, the fetchError takes significantly longer to be emitted than on other platforms so I had to increase all the timeouts.
Another option would be to mark those as fail and investigate why Windows needs more time to error channels
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 10•11 months ago
|
||
Added as a block for network.failRequest
because the fetchError
event is needed in order to write proper tests for failRequest
Updated•11 months ago
|
Assignee | ||
Comment 11•11 months ago
|
||
Clearing the needinfos for now, as the current stack no longer has the issue I mentioned. Will push to try with an older version of the patch to help with the investigation.
Assignee | ||
Comment 12•11 months ago
|
||
Here's a try push you can use to reproduce the issue: https://treeherder.mozilla.org/jobs?repo=try&revision=7d14de289b76f7d2d3e859bb7fda8145f9c24f15
You can pull the patches, build for Android and run the test testing/web-platform/tests/webdriver/tests/bidi/network/response_completed/response_completed.py
. There are some additional logs as well, but for android, the redirected request will lead to 2 "error" events emitted on the ChannelWrapper. Instead on desktop, we get 2 "stop" events for the same test.
I need to clarify something about my initial comment: when I said
on Android the error will still be "NS_BINDING_REDIRECTED"
I was referring to ChannelWrapper.errorString
. When retrieving the error name from the channel's status, we get NS_BINDING_REDIRECTED and NS_OK, as expected. So this whole thing might be a bug with ChannelWrapper
.
Comment 13•11 months ago
|
||
Comment 15•11 months ago
|
||
Backed out for causing windows wd failures on fetch_error.py.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=443003765&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/f5677037347b812cbf58927a01a6d1b1fb5f721a
Assignee | ||
Comment 17•11 months ago
|
||
Sorry about that, I did a typo in the in the test ini file Patch
instead of PATCH
.
Comment 18•11 months ago
|
||
Comment 19•11 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a4e026a249cc
https://hg.mozilla.org/mozilla-central/rev/8d2f317d47e6
https://hg.mozilla.org/mozilla-central/rev/cf5aaf41bb8e
Reporter | ||
Comment 21•10 months ago
|
||
Julian, should we maybe move the remaining issue from comment 12 to it's own bug?
Reporter | ||
Updated•10 months ago
|
Description
•