Closed Bug 1913551 Opened 2 months ago Closed 2 months ago

webRequest API does not monitor serviceWorker.register requests

Categories

(WebExtensions :: Untriaged, defect)

Firefox 129
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: thomas.benhamou, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

  1. Created a web extension that logs requests using the webRequest.onBeforeRequest API.
  2. Registered a service worker in a web page with the command serviceWorker.register("/sw.js").
  3. Observed the extension's logs for requests.

Actual results:

  • The request to register the service worker (serviceWorker.register("/sw.js")) was not logged by the extension.

Expected results:

  • The request generated by serviceWorker.register("/sw.js") should have been logged by the extension, just like other network requests.

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → WebExtensions

Hello,

Would you be able to attach a minimal test extension showcasing the behavior in the report? Thank you !

Flags: needinfo?(thomas.benhamou)

We have a couple of automated tests explicitly covering this behavior (e.g. https://searchfox.org/mozilla-central/source/dom/workers/test/xpcshell/test_ext_redirects_sw_scripts.js). While working on attaching a minimal test extension showing the issue you are hitting, make sure it has the right permissions (you may take a look to the test case linked about to double-check what permissions the test extension is using).

Clonsing as incomplete in the meantime, but we will reopen it if a minimal test extension that shows there is an issue being hit is attached to this bug.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.