Bug: webRequest API doesn't report ping requests after latest Beta update
Describe the bug As of the latest Edge Beta update, chrome.webRequest doesn't notify of ping requests. This breaks extension functionality for detecting tracking via the Beacon API.
Last known working version: Microsoft Edge 131.0.2903.51 beta First known failing version: Microsoft Edge 132.0.2957.11 beta
To Reproduce
- I created a mock extension that simply logs all webRequests: Mock-Extension.zip
- The background script:
chrome.webRequest.onBeforeRequest.addListener( function(details) { console.log("webRequest onBeforeRequest:", details); console.log(`Request made to: ${details.url}`); }, {urls: ["<all_urls>"]}, ["requestBody"] ); - Upload the unpacked mock extension to Edge Beta
- Inspect the mock extension's background page to see the webRequest console logs
- Visit https://efforg.github.io/privacybadger-test-fixtures/html/beacon.html and refresh the page
- The background page console does not have any logs for the ping request to https://privacybadger-tests.eff.org/ (sent via navigator.sendBeacon)
Expected behavior
- Repeat above steps on Edge to see the correct behavior: the background page console should contain logs for "Request made to: https://privacybadger-tests.eff.org/"
@ManikanthMSFT Could you look into this please?
Hi @lenacohen, @ghostwords, thank you for reporting this. We are looking into this and will let you know as soon as we have an update.
@ManikanthMSFT I can confirm this is still an issue. Are there any updates?
Hi @lenacohen @ghostwords
I am Rahul from the Microsoft Edge Extensions Developer Support team.
Apologies for the delayed response. Could you please try updating your Edge Beta browser to the latest version and check if the issue still persists? If you're still encountering the problem, kindly confirm so I can assist you further with a resolution. Otherwise, I’ll go ahead and close this issue, as I’ve tested it on the latest beta version and was unable to reproduce the problem on my end.
We will check and let you know sometime next week.
I can say now that our relevant automated test is still (x)failing on Microsoft Edge Beta version 139.0.3405.64.
Hi @ghostwords
Thank you for confirming.
I was able to successfully log the message "Request made to: https://efforg.github.io/privacybadger-test-fixtures/html/beacon.html" in the background page console after following the reproduction steps outlined in the issue. I’ve also attached a screenshot of the response for reference.
My current Edge Beta version is 139.0.3405.73 (Official build) beta (64-bit).
Could you please check again using the latest Beta version? If the issue still persists, I kindly request you to share the relevant screenshot along with the exact steps you followed to reproduce the issue. This will help me assist you more effectively with the resolution.
Thank you for your patience and understanding.
Hi @Rahul-Bauri ,
Thanks for working on this! I confirmed that the issue persists with the mock extension. The issue is that the webRequest API isn't reporting ping requests sent via navigator.sendBeacon. The screenshot you shared shows a request being made to https://efforg.github.io/privacybadger-test-fixtures/html/beacon.html (the first-party site), but not https://privacybadger-tests.eff.org/ (the third-party ping request sent via navigator.sendBeacon). You'll need to re-load the page to trigger this ping request. The issue description includes the exact steps you can take to reproduce the issue. Let me know if you need clarification about any steps.
I made an MV3 version of the same mock extension (Mock-Extension-MV3.zip) to confirm that this issue occurs on Edge but not Chrome. Here is the extension's service worker's console when I follow the same reproduction steps described in the issue description (visiting AND reloading the page):
Edge:
Chrome:
Hi @lenacohen
Thanks for sharing the screenshots of the issue. I was able to reproduce the issue on my end as well—it occurs in both Edge and Edge Beta. I’ve reported this to the internal team and will keep you posted as soon as I receive any updates.