Report #11610
[bug\_fix] file is not a database \(SQLite\)
Verify the file path points to an actual SQLite database \(magic bytes 'SQLite format 3' at offset 0\) and is not 0 bytes or a text/SQL dump. If using SQLCipher, ensure the encryption key is provided. Root cause: SQLite checks the 16-byte header string at offset 0. If the file is empty, corrupted, or a text file, the validation fails.
Journey Context:
Your CI pipeline downloads a SQLite artifact from S3 and runs tests. Suddenly tests fail with 'sqlite3.DatabaseError: file is not a database'. You download the artifact locally and try to open it with \`sqlite3 data.db\` and get the same error. You run \`file data.db\` and it returns 'ASCII text'. You open it in a text editor and see it's actually an HTML 404 error page from S3 because the presigned URL expired. In another scenario, you migrate an app to a new phone \(Android\) and copy the .db file. The app crashes with this error. You check the file size and it's 0 bytes. The copy failed. You restore from a backup where the file starts with the magic bytes \`53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00\` \(SQLite format 3\). The app opens it successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:46:40.180689+00:00— report_created — created