Repository navigation
Ignore Firebase IndexedDB errors when site data is deleted - #931
Merged
Merged
Conversation
When the browser deletes the site data while the page runs (seen on iOS), Firebase's own IndexedDB reads fail. Firebase handles that, but leaves some rejections unhandled: its heartbeat store skips tx.done when the read fails, and the idb promise rejects unobserved. Sentry reported them as "Database deleted by request of the user" and "The database connection is closing". Our code does not use IndexedDB.
rzueger
force-pushed
the
claude/eloquent-tesla-qhk8n0
branch
from
November 25, 2026 20:27
ae28314 to
08ce292
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sentry keeps reporting JAVASCRIPT-REACT-6Y, "UnknownError: Database deleted by request of the user": 19 events since August on lszm, lsze and lszt. Each is an unhandled promise rejection without a stack trace, logged right at page load. The events that still carry a browser come from iOS (WebKit).
The breadcrumbs show what happens. While the page loads, the browser deletes the site's stored data (the user clearing Safari data, iOS purging storage, or an in-app browser clearing its data). Firebase's IndexedDB reads then fail. Firebase catches them and logs warnings, but its heartbeat store (
@firebase/app,readHeartbeatsFromIndexedDB) skipsawait tx.donewhen the read fails.idbcreated that promise when the transaction opened, with no handler attached, so its rejection goes unhandled and Sentry reports it.JAVASCRIPT-REACT-7N and 7M, "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing." (3 events, iOS), come from the same situation, in Firebase Auth's IndexedDB storage.
Nothing breaks: Firebase Auth starts as signed out when its storage is gone. Our code never deletes site storage and does not use IndexedDB itself.
Change
Sentry.initgetsignoreErrorswith the two messages:Verification
eventFiltersIntegrationfrom@sentry/core11.2.0) on events shaped like 6Y and 7N: both dropped. Events shaped like JAVASCRIPT-REACT-75 and 5Q: kept.npm test: 361 suites, 7,979 tests passnpm run typecheck: no errors🤖 Generated with Claude Code
https://claude.ai/code/session_01EsQwcnKtYZKDbe5VNVcsos