I only have a local page for the STR now, and it's quite convoluted, but, similarly to Bug 1886790, the report POST request is not showing in the regular toolbox netmonitor, only in the Browser Toolbox netmonitor. This is where we return `false` https://searchfox.org/firefox-main/rev/a771bf78b90de89e0ea9d17caaa64ffa240ecd7e/devtools/shared/network-observer/NetworkUtils.sys.mjs#541,608-609 ```js function matchRequest(channel, filters) { ... const win = lazy.NetworkHelper.getWindowForRequest(channel); return windows.includes(win); ``` because in https://searchfox.org/firefox-main/rev/a771bf78b90de89e0ea9d17caaa64ffa240ecd7e/devtools/shared/network-observer/NetworkHelper.sys.mjs#254-264 ```js getWindowForRequest(request) { try { return this.getRequestLoadContext(request).associatedWindow; } catch (ex) { // On some request notificationCallbacks and loadGroup are both null, // so that we can't retrieve any nsILoadContext interface. // Fallback on nsILoadInfo to try to retrieve the request's window. // (this is covered by test_network_get.html and its CSS request) return request.loadInfo.loadingDocument?.defaultView; } }, ``` `this.getRequestLoadContext(request).associatedWindow` throws with `Uncaught NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsILoadContext.associatedWindow]` so we enter the catch block, and `request.loadInfo.loadingDocument` is null, so we end up returning `undefined`
Bug 2013043 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
STR: 1. Go to about:config 2. Set `dom.reporting.enabled` and `dom.reporting.header.enabled` to true 3. Open DevTools, select the Netmonitor 4. Click the trigger report button (Note that the STR seem finicky, the report might only be sent once, when opening the URL in a new tab. After reloading (even hard), it doesn't show up reliably) Similarly to Bug 1886790, the report POST request is not showing in the regular toolbox netmonitor, only in the Browser Toolbox netmonitor. This is where we return `false` https://searchfox.org/firefox-main/rev/a771bf78b90de89e0ea9d17caaa64ffa240ecd7e/devtools/shared/network-observer/NetworkUtils.sys.mjs#541,608-609 ```js function matchRequest(channel, filters) { ... const win = lazy.NetworkHelper.getWindowForRequest(channel); return windows.includes(win); ``` because in https://searchfox.org/firefox-main/rev/a771bf78b90de89e0ea9d17caaa64ffa240ecd7e/devtools/shared/network-observer/NetworkHelper.sys.mjs#254-264 ```js getWindowForRequest(request) { try { return this.getRequestLoadContext(request).associatedWindow; } catch (ex) { // On some request notificationCallbacks and loadGroup are both null, // so that we can't retrieve any nsILoadContext interface. // Fallback on nsILoadInfo to try to retrieve the request's window. // (this is covered by test_network_get.html and its CSS request) return request.loadInfo.loadingDocument?.defaultView; } }, ``` `this.getRequestLoadContext(request).associatedWindow` throws with `Uncaught NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsILoadContext.associatedWindow]` so we enter the catch block, and `request.loadInfo.loadingDocument` is null, so we end up returning `undefined`
STR: 1. Go to about:config 2. Set `dom.reporting.enabled` and `dom.reporting.header.enabled` to true 3. Navigate to https://nchevobbe--019c088c009977e6946581840457796c.web.val.run/ 4. Open DevTools, select the Netmonitor 5. Click the trigger report button (Note that the STR seem finicky, the report might only be sent once, when opening the URL in a new tab. After reloading (even hard), it doesn't show up reliably) Similarly to Bug 1886790, the report POST request is not showing in the regular toolbox netmonitor, only in the Browser Toolbox netmonitor. This is where we return `false` https://searchfox.org/firefox-main/rev/a771bf78b90de89e0ea9d17caaa64ffa240ecd7e/devtools/shared/network-observer/NetworkUtils.sys.mjs#541,608-609 ```js function matchRequest(channel, filters) { ... const win = lazy.NetworkHelper.getWindowForRequest(channel); return windows.includes(win); ``` because in https://searchfox.org/firefox-main/rev/a771bf78b90de89e0ea9d17caaa64ffa240ecd7e/devtools/shared/network-observer/NetworkHelper.sys.mjs#254-264 ```js getWindowForRequest(request) { try { return this.getRequestLoadContext(request).associatedWindow; } catch (ex) { // On some request notificationCallbacks and loadGroup are both null, // so that we can't retrieve any nsILoadContext interface. // Fallback on nsILoadInfo to try to retrieve the request's window. // (this is covered by test_network_get.html and its CSS request) return request.loadInfo.loadingDocument?.defaultView; } }, ``` `this.getRequestLoadContext(request).associatedWindow` throws with `Uncaught NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsILoadContext.associatedWindow]` so we enter the catch block, and `request.loadInfo.loadingDocument` is null, so we end up returning `undefined`