Closed Bug 1745242 Opened 3 years ago Closed 3 years ago

Cache not showing more than 50 items

Categories

(DevTools :: Storage Inspector, defect, P2)

Firefox 94
defect

Tracking

(firefox97 verified)

VERIFIED FIXED
97 Branch
Tracking Status
firefox97 --- verified

People

(Reporter: imre.secodi, Assigned: jdescottes)

References

Details

Attachments

(2 files)

Attached file Compressed minimal project (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

Cached a lots of files. Minimal nodejs project attached.

  1. npm i
  2. npm run generate
  3. npm run serve
  4. Open localhost:9090 - and open console, it should write the console, what is cached

Actual results:

  1. Open debugger, Storage -> Cache -> localhost -> myCache
  2. Only 50 element is showing

Expected results:

All the files are showing, or loading if I scroll to the bottom

The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Debugger
Product: Firefox → DevTools
Component: Debugger → Storage Inspector

The severity field is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)

Confirmed

Severity: -- → S3
Flags: needinfo?(odvarko) → needinfo?(jdescottes)
Priority: -- → P2

Quick pointers, the issue comes in part from the getObjectsSize method defined in the storage actor:

    getObjectsSize(host, names) {
      return names.length;
    },

https://searchfox.org/mozilla-central/rev/fac07284a9a996ddf968ea53adaf25c2a8b7c520/devtools/server/actors/storage.js#268-270

This is the default implementation used by all actor types except for indexeddb. And this method is used in getStoreObjects... to check the number of items that should be returned (possibly? the storage actor's logic is hard to follow).

https://searchfox.org/mozilla-central/rev/fac07284a9a996ddf968ea53adaf25c2a8b7c520/devtools/server/actors/storage.js#416-442

I think the if (names) branch is only relevant for indexedDB and cache storages. However getObjectsSize doesn't really work in the same way for indexedDb and for cache. I think that we should only call getObjectsSize for indexedDB

This is purely a storage actor bug, so I will unblock the datatable meta.

No longer blocks: 1667980
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jdescottes)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37e53671309f [devtools] Cache not showing more than 50 items r=Honza
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Regressions: 1748281
QA Whiteboard: [qa-97b-p2]

I was able to reproduce this bug using an affected Nightly build (97.0a1, 20211209155024), following the STR from comment 0.

The issue is verified as fixed on 97.0, under macOS 11 and Win 10 x64.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: