network.getData can timeout for redirects
Categories
(Remote Protocol :: WebDriver BiDi, defect, P2)
Tracking
(firefox151 fixed)
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
()
Details
(Whiteboard: [webdriver:m20], [wptsync upstream][webdriver:relnote])
Attachments
(2 files)
Found this issue while investigating https://github.com/firefox-devtools/bidi-har-export/issues/43
The network.getData command is likely to time out for redirected responses if the command is received by the browser before the responseStarted trigger for the redirect has been handled.
The sequence of events for redirects looks as follows:
- beforeRequestSent for original
- responseStarted for original -> creates the collectedData map entry for request id
- responseCompleted for original
- beforeRequestSent for redirect
- responseStarted for redirect -> overrides the collectedData map entry for the same request id
- responseCompleted for redirect
Since both requests share the same request id, we don't attempt to collect the network body for the original response. However we should not blindly override the existing map entry when we receive the events for the redirected response, because existing getData commands might already by waiting on those.
We should check for the existence of the entry in https://searchfox.org/firefox-main/rev/6ece603789f6751c37c48b23f39dbbb16b290592/remote/webdriver-bidi/modules/root/network.sys.mjs#1922,1947-1951,1953,1977-1981
#cloneNetworkRequestBody(request) {
...
this.#collectedNetworkData.set(
`${request.requestId}-${DataType.Request}`,
collectedData
);
}
...
#cloneNetworkResponseBody(request) {
...
this.#collectedNetworkData.set(
`${request.requestId}-${DataType.Response}`,
collectedData
);
}
| Assignee | ||
Comment 1•4 months ago
|
||
Let's wait for next milestone in case we have other items for network to work on during m20.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
Updated•2 months ago
|
| Assignee | ||
Comment 3•2 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/19679034eae9
https://hg.mozilla.org/mozilla-central/rev/ef38c2ccd4fe
Upstream PR merged by moz-wptsync-bot
Updated•26 days ago
|
Description
•