fix: database connection error causing navigation redirect on iOS/Android #220

Merged
trentlarson merged 1 commits from fix-sqlite-connection-error-mobile into master 2025-11-06 14:52:32 +00:00
Owner
ClickUp: https://app.clickup.com/t/86b7c60jy
jose added 1 commit 2025-11-06 13:39:34 +00:00
Handle "Connection already exists" error when initializing SQLite database
on Capacitor platforms. The native connection can persist across app
restarts while the JavaScript connection Map is empty, causing a mismatch.

When createConnection fails with "already exists":
- Check if connection exists in JavaScript Map and retrieve it if present
- If not in Map, close the native connection and recreate to sync both sides
- Handle "already open" errors gracefully when opening existing connections

This fixes the issue where clicking "Backup Identifier Seed" would redirect
to StartView instead of SeedBackupView due to database initialization
failures in the router navigation guard.

Fixes navigation issue on both iOS and Android platforms.
trentlarson merged commit ebaf2dedf0 into master 2025-11-06 14:52:32 +00:00
trentlarson deleted branch fix-sqlite-connection-error-mobile 2025-11-06 14:52:32 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: trent_larson/crowd-funder-for-time-pwa#220