webNavigation API does not work properly for blob "requests", parentFrameId not available
Reported by
d...@adblockplus.org,
Mar 22 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce the problem: 1. Create an extension which listens for all webNavigation and webRequest events, logging them if details.url starts with "blob:". If it helps here's a gist https://gist.github.com/kzar/01ea05e4758f5edbeebf9d09766ce456 . 2. Add a second chrome.webNavigation.onCommitted listener that looks like this: chrome.webNavigation.onCommitted.addListener(details => { if (details.url.startsWith("blob:")) { chrome.webNavigation.getFrame( {frameId: details.frameId, tabId: details.tabId}, frame => { console.log("Result of getFrame", frame, "(frameId:", details.frameId, "tabId:", details.tabId, ")"); } ); } }); 3. Install the extension, open a new tab, open the console and paste this code to create a blob request: let frame = document.createElement("iframe"); frame.src = URL.createObjectURL(new Blob([""])); document.body.appendChild(frame) What is the expected behavior? Many of the webNavigation events, maybe even some of the webRequest events should fire for the blob request. The chrome.webNavigation.onCommitted listener should successfully query for the frame using chrome.webNavigation.getFrame. From there it should have access to the frame's parent frame ID. At the minimum the parentFrameId should be provided for onCommitted events like these! What went wrong? Only the chrome.webNavigation.onCommitted event is fired for the blob request. The event does not provide the parentFrameId. chrome.webNavigation.getFrame returns null for the blob request's frame, meaning that the extension cannot know that frame's parent frame ID. The test function listed above logs something like this: > Result of getFrame null (frameId: 469 tabId: 576 ) Did this work before? N/A Does this work in other browsers? N/A Chrome version: 56.0.2924.87 Channel: stable OS Version: Debian Flash Version: N/A This is a problem for Adblock Plus since websites use blob requests as a method of circumvention. We need to know the parent frame ID for blob requests in order to know what should be blocked. See https://issues.adblockplus.org/ticket/4891 for the related issue there.
,
Mar 27 2017
,
Mar 31 2017
dave@ could you please provide a sample Html/js file to triage the issue from TE end. Thanks..
,
Mar 31 2017
You don't need an example HTML/JS file. Open a new tab in Chrome, for that open the developer console, then paste the three lines of JavaScript given by step 3. That will create a blob request.
,
Mar 31 2017
Thank you for providing more feedback. Adding requester "sureshkumari@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 3 2017
Unable to reproduce the issue on Ubuntu 14.04, Windows 7 Mac 10.12.4 using chrome reported version-56.0.2924.87,stable-57.0.2987.133 & latest Canary-59.0.3060.0 as per comment#4.Please find the attached screenshot & screencast for reference & let us know if we miss any steps to reproduce the issue. Thank you!!
,
Apr 3 2017
So this bug is relating to the extension API. When extension developers who are creating Chrome extensions use the provided API to block requests it does not work properly for these blob ones. An example is Adblock Plus which needs the API to work properly for those requests in order to block adverts effectively. The code you've pasted in the tab created one of those blob requests, but you made no attempt to use the Chrome extension API to intercept it. If you are not familiar with Chrome extensions or the API perhaps there is someone else who could help triage this issue instead?
,
Apr 3 2017
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 6 2017
Could anyone from API dev team please look into this issue. Thanks in advance!!
,
Apr 6 2018
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dtapu...@chromium.org
, Mar 22 2017