signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.63k stars 2.66k forks source link

after each update; db broken: Error: SQLITE_NOTADB: file is not a database" #5125

Closed friedrico closed 3 years ago

friedrico commented 3 years ago

I'm using arch signal-desktop package signal-desktop 1.40.1-1

I updated twice in the last two months and got the following error twice:

{"name":"log","hostname":"a","pid":50888,"level":30,"msg":"app ready","time":"2021-03-25T08:35:57.444Z","v":0}
{"name":"log","hostname":"a","pid":50888,"level":30,"msg":"starting version 1.40.1","time":"2021-03-25T08:35:57.445Z","v":0}
{"name":"log","hostname":"a","pid":50888,"level":30,"msg":"media access status undefined undefined","time":"2021-03-25T08:35:57.445Z","v":0}
{"name":"log","hostname":"a","pid":50888,"level":30,"msg":"migrateDatabase: Migration without cipher change failed","time":"2021-03-25T08:35:57.462Z","v":0}
{"name":"log","hostname":"a","pid":50888,"level":30,"msg":"Database startup error: Error: SQLITE_NOTADB: file is not a database","time":"2021-03-25T08:35:57.463Z","v":0}

why does that bug occur? how to fix the database. Its not an option not to update

I did not experience a powerloss or something. Even if, I HAS NOT to lead to a completely useless application

Nisc3d commented 3 years ago

Duplicate of #4513.

friedrico commented 3 years ago

so, whats the workaround to get the db at least working again?

hiqua commented 3 years ago

so, whats the workaround to get the db at least working again?

It's in the thread linked.

friedrico commented 3 years ago

so, whats the workaround to get the db at least working again?

It's in the thread linked.

no they only talk about deleting the db - not an option; pretty useless application if you have to basically reinstall after each update...

file ~/.config/Signal/sql/db.sqlite*
.../.config/Signal/sql/db.sqlite:      SQLite 3.x database, user version 23, last written using SQLite version 3034001
.../.config/Signal/sql/db.sqlite.bak:  data
.../.config/Signal/sql/db.sqlite.bak2: SQLite 3.x database, user version 23, last written using SQLite version 3034001

where bak2 is the most recent broken version, bak is the first broken version and sqlite the empty, newly created one.

Now - what to do in order to reuse bak2 or bak

matenestor commented 3 years ago

no they only talk about deleting the db - not an option; pretty useless application if you have to basically reinstall after each update...

Agree, reinstall or downgrade a package after each upgrade is not a solution. I have to downgrade gtk3 (currently warning: downgrading package gtk3 (1:3.24.28-1 => 1:3.24.27-3)) every time i upgrade my Arch in order to keep conversations -- though it damaged a picture of my group chat and i am also unable to send stickers. I can live with that, no problem, BUT when i look inside the database byte file the messages are not encrypted!

I don't know since when Signal doesn't encrypt messages on local device, or if it is because of this bug. There is an issue already for the not encrypted messages.

scottnonnenberg-signal commented 3 years ago

Duplicate #4513