New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 805649 link

Starred by 6 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

chrome.webRequest.onHeadersReceived sometimes reports type of xmlhttprequest instead of main_frame

Reported by k...@kzar.co.uk, Jan 24 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. Create and install an extension with the following code in the background page:

chrome.webRequest.onHeadersReceived.addListener(
  details =>
  {
    console.log("onHeadersReceived", details);
  }, {urls: ["https://regex101.com/*", "https://reddit.com/*"]},
  ["blocking", "responseHeaders"]
);

2. Inspect the extension's background page. 
3. Browse to https://regex101.com/ in a new tab.
4. Browse to https://www.reddit.com/ in a new tab.
5. Look through the "onHeadersReceived ..." logs in the console for the extension's background page.

What is the expected behavior?
The first response for both reddit and regex101 should have the type of "main_frame". Both should have a tabId > -1.

What went wrong?
The response for regex101 is reported as having the type "xmlhttprequest" and a tabId of -1.

The response for reddit worked OK.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 63.0.3239.132  Channel: n/a
OS Version: 
Flash Version: 

This is relevant for extensions such as Adblock Plus and uBlock.
 
Labels: Needs-Triage-M63
Cc: susanjun...@techmahindra.com
Components: Platform>Extensions
Labels: Triaged-ET Needs-Feedback
kzar@ Thanks for the issue.

Can you please provide sample extension where this issue can be reproduced, which will help in further triaging.

Thanks..

Comment 3 by k...@kzar.co.uk, Jan 25 2018

Sure, I've made one and attached it.
805649-demo.zip
851 bytes Download
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 25 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "susanjunia.boorgula@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Might this be because of the request is sent by a ServiceWorker/SharedWorker? In that case this might be related to https://bugs.chromium.org/p/chromium/issues/detail?id=705931.
Cc: krajshree@chromium.org
Labels: Needs-Feedback
kzar@ - Could you please upgrade chrome to latest stable #67.0.3396.87 and please let us know if the issue still persists or not.

The latest chrome builds can be downloaded from the below URL:
https://www.chromium.org/getting-involved/dev-channel

Thanks...!!

Comment 7 by k...@kzar.co.uk, Jun 26 2018

Yes I can still reproduce this exactly as described with Chrome Version 67.0.3396.87 (Official Build) (64-bit) for Linux.
Project Member

Comment 8 by sheriffbot@chromium.org, Jun 26 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment