simplex-chat / simplex-chat/simplex-chat

[Bug]: SQLite3 simplex_v1_chat.db initialization error

Open
#5,288 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
Haskell
Stars
19.5k
Forks
1.4k
Avg merge
1d 20h
Merged PRs (30d)
71

Description

Is there an existing issue for this?
  • I have searched the existing issues
Platform

Linux

OS version

Arch Linux

App version

v6.1.1

Current Behavior

During execution of the AppImage for simplex-desktop-x86_64.AppImage the SQLite3 database stored in ~/.local/share/simplex/ has a disk I/O exec error causing an issue with database initialization during startup including first installation for the first time.

Same issue happens when installing the application via yay or directly compiling the simplex-chat from source.

Expected Behavior

The application should initialize the database successfully and allow the user to create a new profile

Steps To Reproduce

1: yay -Rns simplex-desktop-AppImage
2: rm -rf ~/.local/share/simplex/
3: yay -S simplex-desktop-AppImage
4: execute simplex-chat directly

Relevant log output
D: useDatabaseKey true
D: Unable to migrate successfully: ErrorSQL(dbFile=/home/nully/.local/share/simplex/simplex_v1_chat.db, migrationSQLError=SQLite3 returned ErrorIO while attempting to perform step: disk I/O error)
D: Incomplete initialized databases were removed for the first time, repeating migration
D: useDatabaseKey true
D: Unable to migrate successfully: ErrorSQL(dbFile=/home/nully/.local/share/simplex/simplex_v1_chat.db, migrationSQLError=SQLite3 returned ErrorIO while attempting to perform exec "\n          PRAGMA busy_timeout = 100;\n          PRAGMA foreign_keys = ON;\n          -- PRAGMA trusted_schema = OFF;\n          PRAGMA secure_delete = ON;\n          PRAGMA auto_vacuum = FULL;\n        ": disk I/O error)
D: Incomplete initialized databases were removed but after repeated migration only one database exists again, not trying to remove again

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the startup failure using the listed yay, data-directory removal, and direct-execution steps, then trace the database migration for ~/.local/share/simplex/simplex_v1_chat.db. Use the logged PRAGMA and repeated-migration errors to identify the initialization failure; done means a fresh installation initializes the database and allows creation of a new profile.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, sqlite
Domain
database, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.