onHeadersReceived is not called for cross-origin iframes.
Reported by
rglee...@londontrustmedia.com,
Mar 20 2017
|
|||||||||||
Issue descriptionUserAgent: 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:
,
Mar 20 2017
rgleeson@ do you have a reproduction URI or some type of example we can try?
,
Mar 20 2017
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.
,
Mar 20 2017
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
,
Mar 20 2017
Sorry, I had a mistake in the last zip. Corrected version is attached.
,
Mar 20 2017
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.
,
Mar 20 2017
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.
,
Mar 21 2017
,
Mar 22 2017
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.
,
Mar 22 2017
Hi, It's still an issue for me, but I haven't reproduced a smaller testcase yet.
,
Mar 22 2017
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
,
Mar 23 2017
Thanks for the update, please update the thread once its ready to further investigate it.
,
Apr 5 2017
,
Sep 6 2017
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?
,
Sep 6 2017
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
,
Sep 7
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 erikc...@chromium.org
, Mar 20 2017