-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signal Desktop Corrupted Database and won't accept previous backed up DB #5467
Comments
That might not be enough, usually people just backup the full directory and restore it, not specific files. You might have more luck asking there though: https://community.signalusers.org/c/support/desktop-support/12 |
Sorry, this probably wasn't clear. I changed the whole signal beta folder but wanted to point out how those two files disappeared. |
I just used sigtop to run an integrity check: https://github.com/tbvdm/sigtop And the database seems fine, no errors were sent. So this seems to be a bug with signal beta, but I'm not sure what I can do to pinpoint it or validate it. |
@ddshore sorry about that! What OS are you running Signal on? Do you happen to run it from snap? |
Hi, Running it on arch linux + KDE, installed through AUR. I think it might be some problem in the client, but not sure how to validate it. |
I've actually just used signaltop and managed to decrypt my database, it worked fine. I managed to browse it with SQLite. So this seems to be a bug in Signal. I updated to the newest beta release but I still get the same error. |
Could you try starting the app with the copied wal and shm files and share the console output of it or a debug log? |
Sure, uploaded. It's just a regular console output, let me know if you need something else. |
@ddshore thanks for the log. Unfortunately, I don't have much of an idea on why this happens at this point. Is |
It had a bug which I'm currently looking at, but initially yes: it can access and export my conversation history. It managed to unencrypt my database and now I can browse it directly. |
@indutny-signal do you know if there is a way to get back my database before my device unlinks? The database is readable, and my convo history is exportable. |
@ddshore I don't know any easy solution, but you try exporting the database into a new file with |
Thanks. Would you say that I should try to to encrypt the previously unencrypted database and adding it to the folder again? And just use the same key? |
This might work! Great idea. |
FYI, got the exact same issue (db corrupted for some reason). Since I do not care about msg backup, I simply renamed the previous folder and started the app. |
Facing this again with |
@captn3m0 sorry you ran into it 😭 Did it at least display the error message and offered you to erase the database? Could you paste the message here, please? |
Getting this locale error (haven't figured out why they keep changing): I also got the older Here's the log from the locale error launch:
|
Welp, sorry for this. It is still a corruption error I'm afraid, but the I'm afraid that at this point there are no known fixes for corrupted database other than erasing it as app should offer. Could you try restarting the app a few times until it'll offer you an option to erase the db? Sorry you ran into it 😭 |
I'm the original poster. Tried restarting the app and nothing happens. I'm on signal beta and again I lost all of my history on my signal beta app (I use both signal beta and regular signal so it's not such a big deal). Here's the error. Is this really unrecoverable even from backups? This seems like a huge huge problem, and I'm curious if this is only a beta issue or not, since I've never had it in the general release. |
I just got this error again and decided to investigate further. The SQLite database that was left over from this incident is in fact, not corrupt, as I can open it just fine with
I've tried this, but I don't know which key to use for the encryption. Is it the one in the |
@Tmpod thanks for all these details. The key is in |
Hey, thanks for the reply! I'm running Manjaro Linux (x86 64 bits) with kernel version 5.10. I installed the |
I see. Unfortunately this distribution is not officially supported. It sounds like at some point they shipped the app with sqlite3 instead of sqlcipher, and now they switched to sqlcipher. There's probably no other way forward, but to encrypt the database manually as you intended. Sorry! |
I'm the original creator of the ticket, I don't understand if you're saying that they shipped the app initially with sqlite3 but at as far as I know the version is gotten directly from github, I do not think that anyone would change the database, unless I misunderstood what you're saying. |
Sorry, but I don't understand how changing the database in an update would decrypt it. If I open an sqlcipher database with sqlite3, I get an error... Additionally, @ddshore was on the right track. This cannot be a problem, seeing as the package, under the hood, uses the And finally, this issue is not exclusive to this AUR package. A friend using Mint has also experienced the same issue, though I don't recall his system's details.
I've tried this, and as I've said, it did not work. I ran the following commands:
ATTACH DATABASE 'db.sqlite' AS encrypted KEY 'asdfzxcv'; -- using key from config.json
SELECT sqlcipher_export('encrypted'); -- takes a couple of seconds
DETACH DATABASE encrypted; Which goes from 129MB unencrypted to 123MB encrypted (is that normal?).1 Footnotes
|
I think it is very much normal. What you did is essentially equivalent to running |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to inactivity. |
I'm running signal desktop, and my computer shut off unexpectedly. That corrupted my database and I get an error saying file is not a database. Looking into it, it seems that this is a behavior that can happen sometimes (at least from reading the issues). I have a backup of my Signal folder that's about a week old, and I want to restore it. When I did the backup signal was working perfectly fine. I tried copying it to ~/.config/Signal Beta and replacing my old directory, however, I still get a corrupted database error.
I have three files in my backed up database (db.sqlite, db.sqlite-shm, and db.sqlite-wal). Whenever I move the backed up to my .config folder, two of the files are deleted (shm + wal).
If I try to open it in sqlcypher and sqlite I just get an error saying that the file is not a database (but I get the same error for a functioning database so I guess that's meaningless).
How could I restore the original database or my backed up database to my current installation? The device is already linked so I'm not linking a new device. Could this be an error with the latest beta version and not a database corruption?
ERROR:
The text was updated successfully, but these errors were encountered: