Skip to content

fix(mob): stop the local database from becoming unreadable - #167

Merged
mrsumanbiswas merged 1 commit into
CommandLineCoding:v0.3.5from
mrsumanbiswas:159-bug-local-database-unreadable-after-force-stop
Nov 7, 2026
Merged

mrsumanbiswas merged 1 commit into
CommandLineCoding:v0.3.5from
mrsumanbiswas:159-bug-local-database-unreadable-after-force-stop

Conversation

@mrsumanbiswas

Copy link
Copy Markdown
Member

Concurrent first calls to DatabaseHelper.database each ran _initDB, so two random encryption keys could be generated and the stored one no longer matched the file. Share one initialisation future, and if an existing database still can't be opened, recreate it (Signal keys are regenerated and republished on sign-in) instead of failing forever.

The inbox now shows a load error with a retry action instead of an empty "No conversations yet" state.

Closes #159

Concurrent first calls to DatabaseHelper.database each ran _initDB, so
two random encryption keys could be generated and the stored one no
longer matched the file. Share one initialisation future, and if an
existing database still can't be opened, recreate it (Signal keys are
regenerated and republished on sign-in) instead of failing forever.

The inbox now shows a load error with a retry action instead of an
empty "No conversations yet" state.

Closes CommandLineCoding#159
@mrsumanbiswas
mrsumanbiswas merged commit dc8d535 into CommandLineCoding:v0.3.5 Nov 7, 2026
1 check passed
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.

[BUG]: Local database becomes unreadable after a force stop

1 participant