Skip to content

core: handle missing storage usage breakdown#17039

Open
KirtiRamchandani wants to merge 1 commit into
GoogleChrome:mainfrom
KirtiRamchandani:fix/storage-usage-breakdown
Open

core: handle missing storage usage breakdown#17039
KirtiRamchandani wants to merge 1 commit into
GoogleChrome:mainfrom
KirtiRamchandani:fix/storage-usage-breakdown

Conversation

@KirtiRamchandani
Copy link
Copy Markdown

@KirtiRamchandani KirtiRamchandani commented May 31, 2026

Summary

  • Treat a missing Storage.getUsageAndQuota().usageBreakdown response field as an empty usage list.
  • Add a regression test for quota responses that omit usageBreakdown.

Root cause
getImportantStorageWarning() assumed usageBreakdown was always present and called .filter() on it directly. When Chrome returns a quota response without that field, Lighthouse throws before the audit can continue.

Related Issues/PRs
Fixes #17015.

Tests

  • corepack yarn mocha storage-test
  • node node_modules/eslint/bin/eslint.js core/gather/driver/storage.js core/test/gather/driver/storage-test.js
  • git diff --check

@KirtiRamchandani KirtiRamchandani requested a review from a team as a code owner May 31, 2026 07:04
@KirtiRamchandani KirtiRamchandani requested review from paulirish and removed request for a team May 31, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing with Error: Cannot read properties of undefined (reading 'filter')

1 participant