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

Issue 739705 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Network.responseReceived reports params.response.fromDiskCache as false even though request is cached

Reported by tomi.mic...@gmail.com, Jul 6 2017

Issue description

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

Steps to reproduce the problem:
1. in extension, chrome.debugger.onEvent.addListener(onNetworkEvent);
2. run extension and debug it
3. see values of Network.responseReceived event / params.response.fromDiskCache

What is the expected behavior?
If request is cached, fromDiskCache should say true. Or then add fromMemCache field or whatever to detect cache use.

What went wrong?
chrome.debugger.onEvent.addListener(onNetworkEvent);

On onNetworkEvent callback, the Network.responseReceived event sometimes reports params.response.fromDiskCache as false even though request is cached. Must use event Network.requestServedFromCache to really see the status of cache.

See sources of my chrome extension https://github.com/tomimick/chrome-ext-page-size

WebStore page: https://chrome.google.com/webstore/detail/oepnndnpjiahgkljgbohnnccmokgcoln

Did this work before? N/A 

Chrome version: 59.0.3071.115  Channel: stable
OS Version: OS X 10.12.5
Flash Version:
 
Labels: Needs-Feedback
Tested the issue using #59.0.3071.115 on Mac 10.12.5 as per the steps mentioned in comment #0 and was unable to reproduce the issue.

@tomi: Could you please find the attached screen cast and let us know if we missed any steps form our end. If possible please add a expected screen cast for better understanding of the issue.

Thanks!!
Jul 11 2017 12-24 PM.webm
7.0 MB View Download
Labels: Needs-Milestone
Sorry for being slow to respond - holidays...

Maybe best to demonstrate is this:
- install my official extension https://chrome.google.com/webstore/detail/oepnndnpjiahgkljgbohnnccmokgcoln
- download extension sources from github https://github.com/tomimick/chrome-ext-page-size
- open zip to a folder
- in sources, comment out my last fix for this, line bg.js:334 like this:
  //cachedList[params.requestId] = 1;
- the change above means: ignore Network.requestServedFromCache and just rely on resp.fromDiskCache (which is broken)
- activate it as a local extension via "Load unpacked extension"
- compare the numbers for both extensions, for example with page https://yle.fi/uutiset/3-9758920
- cached numbers differ, my fixed extension reports something like 8 requests whereas the broken modified extension reports around 12, there are atleast few images that don't seem to be cached even though they are

- the images are served via cloudinary and HTTP2, does it affect?
- I think the differences used to be larger before Chrome 60, not quite sure

Project Member

Comment 4 by sheriffbot@chromium.org, Aug 4 2017

Cc: sandeepkumars@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sandeepkumars@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
Cc: kkaluri@chromium.org
Labels: Needs-Feedback
Tested this Mac 10.12.6 with chrome #59.0.3071.115 and faced an issue with extension downloaded from "https://github.com/tomimick/chrome-ext-page-size" url

As mentioned in comment #3, i have edited the bg.js file and loaded the extension from "Load unpacked extension" then i clicked on the extension icon and observed an empty popup.

Attaching a screen-cast for reference.

tomi.mickelsson@ Could you please look into it and let us know your observations.
739705.mp4
2.3 MB View Download
Ah sorry, the sources from Github require a build step first!

Here are the built sources with the fix removed. Try this and the official one and see the difference in figures.


inspector-sources-without-fix-after-build.zip
31.3 KB Download
Project Member

Comment 7 by sheriffbot@chromium.org, Aug 9 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kkaluri@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
Tested this issue on Mac 10.12.6 with chrome #59.0.3071.115 with the provided extension in comment #6.

Observations:
1. For WebStore extension, observed the values as transferred/cached = 60/96
2. For Unpacked extension, observed the values as transferred/cached = 115/7

Observed that for unpacked extension cached value is very low when compared to Webstore extension.

Attaching the screen-cast for reference.

tomi.mickelsson@ Could you please confirm this is the issue you are experiencing ?

Thank You...

739705-WebStore.mp4
1.4 MB View Download
739705-UnPacked.mp4
1.5 MB View Download
Well the numbers seems to vary a bit. My numbers for an incognito tab are:

- fixed released extension 17/107
- buggy version 101/23

The ratio of wrong cache data is clear anyway.


fixed.png
102 KB View Download
without-fix.png
77.2 KB View Download
Project Member

Comment 10 by sheriffbot@chromium.org, Aug 24 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kkaluri@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
Cc: pnangunoori@chromium.org
Labels: Needs-Feedback
@tomi.mickelsson-- Thanks for providing reply, we have noticed different values in different versions and for web-store and unpacked versions on Chrome reported #59.0.3071.115 and latest #60.0.3112.113. Could you please help us in identifying the ideal values to be considered and take them as benchmark values. This would help us in further triaging the issue.

Values observed:

Chrome Version: 59.0.3071.115

Unpacked Extensions: 57/88, 22/99
Downloaded from Webstore: 30/101, 18/101, 18/49

Chrome Version: 60.0.3112.113

Unpacked Extensions: 18/99, 19/101, 22/100
Downloaded from Webstore: 21/96, 18/104

Attached the screencast for reference in the link provided. https://drive.google.com/drive/folders/0B91MtOa4hcAbNVMzN1JCX2tTQlU?usp=sharing

Thanks in advance.

Status: WontFix (was: Unconfirmed)
Marking the issue as WontFix, as there is no update from the reporter for more than 1 month.
@tomi.mickelsson -- Please feel free to raise a new issue if able to reproduce the issue using latest chrome builds.
Please use the following link to download latest chrome builds  
https://www.chromium.org/getting-involved/dev-channel

Thanks!

Sign in to add a comment