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

Issue 717507 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Random duplicated requests when multiple script tags fail to load

Reported by xi...@uci.edu, May 2 2017

Issue description

UserAgent: 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
 
index.html
424 bytes View Download
Screen Shot 2017-05-02 at 5.41.25 AM.png
355 KB View Download

Comment 1 by xi...@uci.edu, May 2 2017

There was a mistype in the report:

Put a function on the "onerror" to **remove** the script from DOM does not prevent the duplicated request. 

Comment 2 by xi...@uci.edu, May 2 2017

Also, file has to be served through http:// or https:// to reproduce the problem.
Cc: kavvaru@chromium.org
Components: Platform>DevTools>Network
Labels: Needs-Feedback
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,
717507.mp4
960 KB View Download

Comment 4 by xi...@uci.edu, 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.
Project Member

Comment 5 by sheriffbot@chromium.org, May 3 2017

Labels: -Needs-Feedback
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

Comment 6 by xi...@uci.edu, May 3 2017

And here is a screencast.
screencast.m4v
5.0 MB Download

Comment 7 by xi...@uci.edu, May 3 2017

Re-upload as .mp4 so it can be viewed directly.
screencast.mp4
5.0 MB View Download
Owner: allada@chromium.org
Labels: TE-NeedsTriageHelp
Components: -Blink Blink>HTML>Script Blink>Loader
Status: Untriaged (was: Unconfirmed)
Confirmed on 60.0.3094.0 canary on Windows 7. Investigating...
Cc: hirosh...@chromium.org allada@chromium.org
Components: -Blink>HTML>Script -Platform>DevTools>Network
Labels: -OS-Mac OS-All
Owner: yhirano@chromium.org
Status: Assigned (was: Untriaged)
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.
Cc: yhirano@chromium.org
Owner: ----
Status: Available (was: Assigned)
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.


Project Member

Comment 14 by sheriffbot@chromium.org, May 10 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Status: WontFix (was: Untriaged)
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