Random duplicated requests when multiple script tags fail to load
Reported by
xi...@uci.edu,
May 2 2017
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 Steps to reproduce the problem: 1. Open the attached index.html which has 10 different <script> tags that all returns 404. 2. Open the dev tools What is the expected behavior? Expect to see 10 network errors. What went wrong? Refresh the page and it randomly shows between 10 to 19 network errors. Put a console.log on the "onerror" shows that the duplicated request happens after the onerror hook. Put a function on the "onerror" to the script from DOM does not prevent the duplicated request. Did this work before? N/A Chrome version: 58.0.3029.81 Channel: stable OS Version: OS X 10.12.4 Flash Version: Similar problem happens in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1361348
,
May 2 2017
Also, file has to be served through http:// or https:// to reproduce the problem.
,
May 3 2017
Unable to reproduce the issue on windows 7, Mac 10.12.4 using chrome version 58.0.3029.81 with the below steps 1.Opened the attached html file on chrome 2.Open dev tool console 3.Observed only 10 errors logged. 4.Refresh the page 5.Still observed 10 errors in console and network tab also Please find the attached screen cast and confirm if anything missed here. Request you once try the issue by upgrading chrome to latest stable and update the thread if the issue still persists. Thanks,
,
May 3 2017
I have already made it clear in comment#2 that you have to load this page through `http://` or `https://`. `file://` does not reproduce this issue.
,
May 3 2017
Thank you for providing more feedback. Adding requester "kavvaru@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
,
May 3 2017
And here is a screencast.
,
May 3 2017
Re-upload as .mp4 so it can be viewed directly.
,
May 3 2017
,
May 4 2017
,
May 5 2017
,
May 9 2017
Confirmed on 60.0.3094.0 canary on Windows 7. Investigating...
,
May 9 2017
Also confirmed on Linux, quite flakily though (once per ~20 reloads). This also occur when DevTools is not opened. This looks like preloading doesn't work with non-image 4xx/5xx responses. On ToT: - ResourceLoader::DidReceiveResponse() cancels the loading explicitly when the HTTP status >= 400 and Resource::ShouldIgnoreHTTPStatusCodeErrors() returns false. (This is the case for all resources except for ImageResource and RawResource) - Canceling the loading causes evicting the response from preloads_ in ResourceFetcher::HandleLoaderError(). Therefore, in the following case: 1. the 404 response for the preloading request is received, and then 2. <script> tag is processed and the main request is started, the preloaded resource is evicted from preloads_ in Step 1 and a new network request is started in Step 2. I haven't investigated how the things work before yhirano@'s recent changes on preloading and MemoryCache. Assigning to yhirano@ who is changing the preloading mechanism.
,
May 10 2017
My change didn't change the behavior. Before my change, preloaded resources were stored MemoryCache, and cancelled resources have been removed from the memory cache in Resource::FinishAsError.
,
May 10 2018
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
,
May 24 2018
This is a sort of duplicate of issue 634221 . As we closed that issue as WONTFIX, we should have the same conclusion. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by xi...@uci.edu
, May 2 2017