When navigating from an internal page, events of webRequest.filterResponseData() do not fire for main_frame responses.
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(Not tracked)
People
(Reporter: nines, Unassigned, NeedInfo)
References
Details
Attachments
(1 file)
|
717 bytes,
application/x-zip-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0
Steps to reproduce:
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0
Build ID: 20250813091044
- Load the attached extension via "about:debugging#/runtime/this-firefox".
- Click “Inspect” and open the console.
- Visit "https://www.google.com/" and verify that an ArrayBuffer is logged.
- Visit "about:preferences".
- Visit "https://www.google.com/" again.
Actual results:
Only the URL is logged.
Expected results:
The URL, an ArrayBuffer, and the string "closed" are logged.
Comment 1•10 months ago
•
|
||
The events do not fire because internally the request is considered redirected for some reason.
If you modify the test case and add filter.onerror = e => console.error(filter.error);
... then the displayed error is (confusingly) "Invalid request ID"
This error is confusing due to bug 1683862.
I tried out the STR with about:addons, about:config, about:preferences, about:logo can can confirm the observations.
On the other hand, on about:newtab, about:privatebrowsing, https://addons.mozilla.org/ the issue does not happen.
Based on this, I think that the actual issue is happening when a navigation is triggered from a tab in a non-remote process to a remote process.
To test this hypothesis, I set extensions.webextensions.remote to false in about:config, restarted Firefox, opened the manifest.json link of the extension, and indeed, the issue also reproduced there.
Next step here is to investigate what is happening and triage further.
Comment 2•10 months ago
|
||
This bug also reminds me of bug 1806476, but that was about navigating from about:newtab or about:home to someplace else, and in the above comment I confirmed that this specific issue does not happen with about:newtab.
I'll investigate this a bit more.
Updated•7 months ago
|
I encountered this issue in UltimaDark WebExt and documented a workaround here:
https://github.com/ThomazPom/Moz-Ext-UltimaDark/issues/171#issuecomment-3563934115
Other Bugzilla reports where I’m confident it’s the same issue:
https://bugzilla.mozilla.org/show_bug.cgi?id=1561604
https://bugzilla.mozilla.org/show_bug.cgi?id=1806476
To isolate the problem, I tested every relevant about: page to determine which ones trigger the filter failure.
Here is the detailed overview:
| initialUrl | hasIssue | hasIssueBool |
|---|---|---|
| about:blank | No filter issue | false |
| about:welcome | No filter issue | false |
| about:studies | No filter issue | false |
| about:protections | No filter issue | false |
| about:privatebrowsing | No filter issue | false |
| about:newtab | No filter issue | false |
| about:loginsimportreport | No filter issue | false |
| about:logins | No filter issue | false |
| about:home | No filter issue | false |
| about:compat | No filter issue | false |
| about:certificate | No filter issue | false |
| about:about | Has filter issue | true |
| about:windows-messages | Has filter issue | true |
| about:webrtc | Has filter issue | true |
| about:url-classifier | Has filter issue | true |
| about:unloads | Has filter issue | true |
| about:third-party | Has filter issue | true |
| about:telemetry | Has filter issue | true |
| about:sync-log | Has filter issue | true |
| about:support | Has filter issue | true |
| about:serviceworkers | Has filter issue | true |
| about:robots | Has filter issue | true |
| about:profiling | Has filter issue | true |
| about:profiles | Has filter issue | true |
| about:processes | Has filter issue | true |
| about:preferences | Has filter issue | true |
| about:policies | Has filter issue | true |
| about:networking | Has filter issue | true |
| about:mozilla | Has filter issue | true |
| about:memory | Has filter issue | true |
| about:logo | Has filter issue | true |
| about:logging | Has filter issue | true |
| about:license | Has filter issue | true |
| about:downloads | Has filter issue | true |
| about:debugging#/setup | Has filter issue | true |
| about:crashes | Has filter issue | true |
| about:config | Has filter issue | true |
| about:checkerboard | Has filter issue | true |
| about:cache | Has filter issue | true |
| about:buildconfig | Has filter issue | true |
| about:addons | Has filter issue | true |
Description
•