Inspector's view of cache-storage is out of sync with current state of cache
Reported by
matt.t.g...@gmail.com,
Nov 30 2016
|
||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2902.0 Safari/537.36 Steps to reproduce the problem: 1. Grab the 'sw-preaching' branch from https://github.com/googlechrome/sw-helpers/ 2. Start test server with 'node ./utils/dev-server.js' 3. Load: http://localhost:8080/packages/sw-precaching/test/browser-unit/?grep=sw-precaching%20Test%20Revisioned%20Caching%20should%20cache%20and%20fetch%20files What is the expected behavior? The cache storage for sw-precache-v1-http://locahost.... should have 4 entries. What went wrong? It's empty instead of having the four entries. You can check the entries with the adding the following to the console: caches.keys().then((cacheNames) => caches.open(cacheNames[0])).then((openCache) => openCache.keys()).then((keys) => console.log(keys)) Did this work before? N/A Chrome version: 56.0.2902.0 Channel: n/a OS Version: Flash Version: Shockwave Flash 24.0 r0
,
Nov 30 2016
,
Nov 30 2016
Is this bug about the cache itself not having the entries, or the display of the cache in devtools not showing the entries? (Sorry, not set up to repro at the moment.)
,
Nov 30 2016
It's devtools that doesn't have the entries.
,
Dec 1 2016
This looks like out of scope for TE, hence adding the respective label for it to triage further.
,
Dec 1 2016
,
Dec 1 2016
I don't suppose you have a more minimal repro? Do the cache entries appear if you refresh? Right click on Cache Storage > Refresh Caches.
,
Dec 6 2016
Can you provide a smaller repro? Or a spot where this is already set up? I suspect, especially if this is the first load, that the cache didn't have the resources when the devtools resources window was opened. The cache storage window doesn't actively listen to changes, it just takes a snapshot of the current state when that tab is selected. You can refresh the cache by right clicking, does that load them?
,
Dec 6 2016
Yes the cache does update after hitting refresh, although I'm currently seeing that creating and deleting caches does mean duplicate cache names appear in devtools when only one should be visible. Would it be worth rephrasing this bug to: Expectation: 1. When selecting the dropdown arrow next to 'Cache Storage' I expect the UI to be updated before showing me results. 2. When selecting a cache name I expect the results to be updated before showing me the cache contents. Actual: 1. Clicking on drop down shows me old state when the page or devtools was opened. 2. Clicking on a cache can show nothing if the cache was removed and recreated OR shows outdated results for the cache. If manual interaction is expected perhaps the UI could be tweaked to be more user friendly. Refreshing cache names behind a right click feels hidden.
,
Dec 13 2016
,
Dec 13 2016
Sounds like the code is behaving as intended by the authors (doesn't update), but users would like to see the UI update to reflect changes automatically. A prominent 'refresh' button somewhere in the existing UI might be an interim solution?
,
Dec 15 2016
dmurph could you help us out?
,
Dec 15 2016
ah yeah - you can update all of cache storage by right clicking on the 'cache storage' row on the left... This can definitely be better. I believe that this is a small-ish task (having it update when you click on the table or the cache name), but I don't remember the code super well. It might just be a call to 'refresh_()' on the model. I can take a look at this, but I can't guarantee anything done until mid-Q1 (finishing up some high priority projects right now). +jsbell
,
Dec 15 2016
+pfeldman, +seththompson We may want to look at auto-refreshing all storage views in devtools when the contents change, or e.g. indicating the view is dirty (a * or something, dunno). I'll add something to an (internal only, sorry) doc tracking possible devtools work on storage.
,
Dec 17 2016
,
Feb 13 2017
,
Mar 20 2017
,
Mar 20 2017
,
Mar 25 2017
Here's a tiny repro if you'd like to test the behavior. You can clone the repo and run a local server, it shouldn't require any dependencies. https://github.com/robdodson/tiny-service-worker-app I noticed if you refresh the page the dropdown arrow for caches disappears completely. I think this may be a bug. I wrote a code lab on the Application panel a while back and don't recall experiencing this behavior.
,
Mar 28 2017
Regarding the arrow disappearing completely, this has been causing issues for me and I can replicate this on 59.0.3054.0 (Official Build) canary (64-bit). Is this the same issue being described here? I am less concerned about the values in the table auto-refreshing, as long as there is a way to manually refresh. This isn't possible without the arrow. To reproduce either, have devtools open; 1. Have devtools open, visit a page where you expect the Cache Storage to be populated and note that the arrow never appears. 2. Even if the arrow appears next to Cache Storage, refresh the page and note the arrow disappears. To work-around this/verify, if you refresh devtools (focus and press alt/option+r), the arrow then does appear next to Cache Storage.
,
Mar 28 2017
Right clicking the cache should give you an option to refresh and then view the contents. I think I've raised a seperate issue to raise this UI to to an refresh icon rather than hidden behind a right click.
,
Mar 29 2017
RE #21 - Thanks. Do you have a link to this as I can't find it, and would like to star it.
,
Apr 18 2017
,
May 24 2017
,
Jun 1 2017
Not quite a dup (not live updating), but Kristi is adding a refresh button to the cache storage category view, which will update the cache list when clicked. https://bugs.chromium.org/p/chromium/issues/detail?id=727920
,
Aug 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7b37507e478439d6aa77930966357b7071081b8a commit 7b37507e478439d6aa77930966357b7071081b8a Author: Eugene Ostroukhov <eostroukhov@chromium.org> Date: Mon Aug 28 22:26:16 2017 [DevTools] Live update SW cache entries Bug: 669719 Change-Id: Ibe99c22fb6748250dbfa6c7135d0b8588df4168f Reviewed-on: https://chromium-review.googlesource.com/627716 Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Cr-Commit-Position: refs/heads/master@{#497901} [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/content/browser/devtools/protocol/storage_handler.cc [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-live-update-cache-content-expected.txt [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-live-update-cache-content.html [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js [modify] https://crrev.com/7b37507e478439d6aa77930966357b7071081b8a/third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js
,
Aug 28 2017
|
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by davidben@chromium.org
, Nov 30 2016