Skip to content

Ignore Firebase IndexedDB errors when site data is deleted - #931

Merged
rzueger merged 1 commit into
developfrom
claude/eloquent-tesla-qhk8n0
Nov 25, 2026
Merged

rzueger merged 1 commit into
developfrom
claude/eloquent-tesla-qhk8n0

Conversation

@rzueger

@rzueger rzueger commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

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) skips await tx.done when the read fails. idb created 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.init gets ignoreErrors with the two messages:

ignoreErrors: [
  /Database deleted by request of the user/,
  /The database connection is closing/,
],

Verification

  • Ran Sentry's own event filter (eventFiltersIntegration from @sentry/core 11.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 pass
  • npm run typecheck: no errors

🤖 Generated with Claude Code

https://claude.ai/code/session_01EsQwcnKtYZKDbe5VNVcsos

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
rzueger force-pushed the claude/eloquent-tesla-qhk8n0 branch from ae28314 to 08ce292 Compare November 25, 2026 20:27
@rzueger
rzueger merged commit eaafc54 into develop Nov 25, 2026
2 checks passed
@rzueger
rzueger deleted the claude/eloquent-tesla-qhk8n0 branch November 25, 2026 20:38
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.

2 participants