webNavigation: mixed content error causes incorrect sequence of events
Reported by
ch...@chrisn.me.uk,
Aug 2 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 Steps to reproduce the problem: 1. Install the demo extension (files attached), which prints webNavigation events to the console. 2. Open the extension's background page. 3. Visit the MWE at https://www.doc.ic.ac.uk/~cnovakov/chromium/webnavigation_mixed_content/ - this page contains an iframe served over HTTPS that attempts to redirect to a HTTP URL, resulting in a mixed content error. 4. Note the order of the events shown in the extension's background page console when the redirection occurs: webNavigation.onBeforeNavigate: {"0":{"frameId":14,"parentFrameId":0,"processId":-1,"tabId":7,"timeStamp":1470169125161.2,"url":"http://www.doc.ic.ac.uk/~cnovakov/chromium/webnavigation_mixed_content/new.html"}} webNavigation.onErrorOccurred: {"0":{"error":"net::ERR_ABORTED","frameId":14,"processId":-1,"tabId":7,"timeStamp":1470169125162.502,"url":"http://www.doc.ic.ac.uk/~cnovakov/chromium/webnavigation_mixed_content/new.html"}} webNavigation.onCommitted: {"0":{"frameId":14,"processId":18,"tabId":7,"timeStamp":1470169125163.972,"transitionQualifiers":[],"transitionType":"manual_subframe","url":"about:blank"}} webNavigation.onDOMContentLoaded: {"0":{"frameId":14,"processId":18,"tabId":7,"timeStamp":1470169125164.267,"url":"about:blank"}} webNavigation.onCompleted: {"0":{"frameId":14,"processId":18,"tabId":7,"timeStamp":1470169125164.5068,"url":"about:blank"}} What is the expected behavior? Chrome's webNavigation API says about event ordering [1]: "For a navigation that is successfully completed, events are fired in the following order: onBeforeNavigate -> onCommitted -> onDOMContentLoaded -> onCompleted Any error that occurs during the process results in an onErrorOccurred event. For a specific navigation, there are no further events fired after onErrorOccurred." Given that the HTTP iframe navigation fails due to the mixed content error and the subsequent pseudo-navigation to about:blank succeeds, I would therefore expect to see a webNavigation event cycle similar to the following: [URL: iframe over HTTP] onBeforeNavigate -> onErrorOccurred -> [URL: about:blank] onBeforeNavigate -> onCommitted -> onDOMContentLoaded -> onCompleted What went wrong? I see a sequence of webNavigation events that I believe violates the guarantee given by the documentation: [URL: iframe over HTTP] onBeforeNavigate -> onErrorOccurred -> [URL: about:blank] onCommitted -> onDOMContentLoaded -> onCompleted Did this work before? N/A Chrome version: 52.0.2743.82 Channel: stable OS Version: Flash Version: Shockwave Flash 22.0 r0 It would also be really nice to know that Chrome is navigating the frame to about:blank because of a prior mixed content error, e.g. with "mixed_content_error" in the transitionQualifiers array for all of the about:blank events. [1] https://developer.chrome.com/extensions/webNavigation#event_order
,
Aug 2 2016
,
Aug 3 2017
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
,
Aug 3 2017
This is still a problem in the latest Chromium.
,
Aug 3 2017
Thanks for confirming. Re-opening.
,
Aug 6
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 6
This is still a problem in the latest Chromium. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mattm@chromium.org
, Aug 2 2016