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

Issue 703128 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

onHeadersReceived is not called for cross-origin iframes.

Reported by rglee...@londontrustmedia.com, Mar 20 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36

Steps to reproduce the problem:
1. add onHeadersReceived callback that listens on all URLs.
2. visit a page that loads an iframe with a cross-origin URL.
3. observe that onHeadersReceived is not fired for the iframe URL.

What is the expected behavior?
The expected behaviour is that when a page loads a cross-origin URL the onHeadersReceived callback is fired for that URL.

What went wrong?
onHeadersReceived callback is not fired for cross-origin iframe's.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 57.0.2987.98  Channel: n/a
OS Version: OS X 10.12.3
Flash Version:

 
Components: Blink
Labels: Needs-Feedback
rgleeson@ do you have a reproduction URI or some type of example we can try?
Hi dtapu...@chromium.org,
Attached is an extension that reproduces the issue.
Here are the reproduction steps:
1) Load extension
2) Double check the extension can access file:/// URLs (for the next step).
2) Visit file:///<path to unzipped directory>/iframepage.html
3) Afterwards, inspect the background page's console. If it worked, you should see the URL in the iframe (https://www.aerlingius.ie). If it didn't work, you will see nothing. I see nothing.

The source might also be useful to you - i don't know the best way to provide a reproduction case for this.
bug703128.zip
12.3 KB Download
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 20 2017

Cc: dtapu...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dtapuska@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
Sorry, I had a mistake in the last zip. Corrected version is attached.
bug703128.zip
12.4 KB Download
Components: -Blink Platform>Extensions
Over to platform>extensions.

I believe this is the lifecycle of the request. The onHeadersReceived is called in the context of the new iframe and your extension likely hasn't been instantiated yet.
Sorry, I don't think my reproduction case was very good.
I see that onHeadersReceived is never called with the real extension I am working on.
I know it is not called because I set a cookie, and in my content script on that iframe it is always unset. As well as that, manual console.log() debugging shows that it is never called.
Labels: Needs-Triage-M57
Labels: Needs-Feedback
rgleeson@: Thanks for the update, please let us know if there is a reproducible steps if its a real issue to further investigate it, else let us know if we can close it.
Hi,
It's still an issue for me, but I haven't reproduced a smaller testcase yet.
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 22 2017

Cc: durga.behera@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "durga.behera@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
Labels: Needs-Feedback
Thanks for the update, please update the thread once its ready to further investigate it.
Labels: -Hotlist-Interop
Hi.

It's not an issue, really. The problem is just that without third party cookies enabled, `document.cookie` is absent of a value in an iframe.

Actually, the problem I wanted to solve was to have a method to ask for settings from background page without being forced to being asynchronous, because my content script is available at "document_start", and going async lets other code run, when I really have to read the settings before letting this happen.

It's a very specific case.
Should I open a new issue for this?



Project Member

Comment 15 by sheriffbot@chromium.org, Sep 6 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "durga.behera@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
Project Member

Comment 16 by sheriffbot@chromium.org, Sep 7

Status: Archived (was: Unconfirmed)
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