signalapp / Signal-Desktop

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

Database startup error version >= 7.24.1 #7025

Closed rkarimov closed 1 month ago

rkarimov commented 1 month ago

Using a supported version?

Overall summary

The signal for the Desktop stopped working and is prompting with "Database startup error" after my computer shut down overnight due to power issues.

Steps to reproduce

  1. Launch signal desktop app (version 7.24.1) from Macbook Pro
  2. Error is shown, click "
  3. Restarted my macbook
  4. Upgraded to latest App Version: 7.25.0 (downloaded for signal's website and replaced existing package)
  5. Restarted device again
  6. still getting database error

Database error: "Database startup error:

SqliteError: database disk image is malformed at getMessagesBySentAt ([REDACTED]/ts/sql/Server.js:3308:34) at MessagePort. ([REDACTED]/ts/sql/mainWorker.js:123:22) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20) at MessagePort. (node:internal/per_context/messageport:23:28)

App Version: 7.25.0 OS: darwin"

Expected result

Signal desktop is launched w/o interruption

Actual result

Signal launches into a database error

Screenshots

No response

Signal version

7.24.1

Operating system

MacOS 12.7.6

Version of Signal on your phone

No response

Link to debug log

https://debuglogs.org/desktop/7.25.0/1aa497cab1f25496ade7d33712c7f47cc903ddee00750a1fe9759a5cd3c282dc.gz

indutny-signal commented 1 month ago

I'm sorry, but it does look like your database got corrupted in the process. If the error persists - the only way forward might be erasing the data and starting over. :sob:

toppk commented 1 month ago

I'm sorry, but it does look like your database got corrupted in the process. If the error persists - the only way forward might be erasing the data and starting over. 😭

what is "the process"? what does "starting over mean?" do you lose everything? What if you're logged in elsewhere?

scottnonnenberg-signal commented 1 month ago

@toppk Yes, you'll need to unlink that Desktop from your mobile device. If you have a backup of your desktop data, you can copy that into place while Signal Desktop is not running, then start up and re-link it to your mobile device. Otherwise, yes, you will need to start over from scratch, like you installed Signal Desktop afresh.

toppk commented 1 month ago

@toppk Yes, you'll need to unlink that Desktop from your mobile device. If you have a backup of your desktop data, you can copy that into place while Signal Desktop is not running, then start up and re-link it to your mobile device. Otherwise, yes, you will need to start over from scratch, like you installed Signal Desktop afresh.

As I mentioned in another issue I have recovered, and now I'm trying to figure out how to get to the latest version of signal. It seems like the best way forward isn't trying to make permanent the legacy way of unencrypted key in config.json, but figure out how to proceed with a conversion to encryptedKey that actually works. Is there any undestanding of why the key upgrade failed for me (and many others?) I cannot find that info. fwiw I think this is the PR that introduced the key upgrade.

https://github.com/signalapp/Signal-Desktop/pull/6849