The Network tab does not display requests from Web Workers blocked by CSP
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: roman.deev06, Unassigned, NeedInfo)
References
Details
Attachments
(1 file)
|
67.05 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0
Steps to reproduce:
- Open https://www.openstreetmap.org/#layers=V
- Open Network tab in DevTools
- Open Split console
- Click on the button labeled Top in the text input line in the Console
- Switch to the Web Worker context (there must be an item with a uuid)
- Execute
await fetch("https://goolge.com")
Actual results:
Nothing happens on the Network tab
In the global browser console (cmd + option + shift + I) also nothing
Expected results:
The blocked request should be displayed on the Network tab
| Reporter | ||
Updated•9 months ago
|
Comment 1•9 months ago
|
||
The severity field is not set for this bug.
:bomsy, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•9 months ago
|
||
Will check if a channel is created here and if we miss showing it for some reason.
Comment 3•9 months ago
|
||
CSP errors are handled in https://searchfox.org/firefox-main/source/devtools/server/actors/resources/network-events-content.js
We setup notification observers in all processes but only in the main thread.
I suspect that requests blocked by CSP originating from a worker thread are not creating observer notifications in the main thread. Valentin, does that make sense?
Comment 4•9 months ago
|
||
I suspect that requests blocked by CSP originating from a worker thread are not creating observer notifications in the main thread. Valentin, does that make sense?
Yes, I think that's correct.
Web-Workers and Service workers would use FetchChild implementation - instead of HttpChannelChild.
On the parent side the channel will use the main thread (nsHttpChannel) via FetchService::Fetch
We may be able to send a notification to the main thread in mozilla::dom::FetchChild::DoFetchOp, and use that to correlate requests in devtools if that helps?
Updated•9 months ago
|
Updated•9 months ago
|
Description
•