-
-
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
v7.24.1 is Breaking database #7029
Comments
seeing this too. {"level":40,"time":"2024-09-26T22:41:46.309Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-09-26T22:41:46.309Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
{"level":40,"time":"2024-09-26T22:41:46.379Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-09-26T22:41:46.380Z","msg":"MainSQL: Database startup error: SqliteError: file is not a database\n at Database.pragma ([REDACTED]/node_modules/@signalapp/better-sqlite3/lib/methods/pragma.js:11:31)\n at getUserVersion ([REDACTED]/ts/sql/util.js:132:13)\n at migrateSchemaVersion ([REDACTED]/ts/sql/Server.js:387:54)\n at openAndMigrateDatabase ([REDACTED]/ts/sql/Server.js:419:5)\n at openAndSetUpSQLCipher ([REDACTED]/ts/sql/Server.js:441:14)\n at initialize ([REDACTED]/ts/sql/Server.js:479:10)\n at MessagePort.<anonymous> ([REDACTED]/ts/sql/mainWorker.js:89:41)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)"} |
Hi there, @ampeditile. First, you reference the user in #7025 - their issue is true database corruption, because of log lines like this:
From your log, it looks more like your decryption key is wrong. What can you say about the history of Signal Desktop on your computer? I see that |
@toppk What do you see in your |
I had gnome_libsecret, I put the following into the flathub issue for other people hitting this. So I was able to recover/downgrade and seem to be back up and running. I hope signal pulls this release since there's more people that are going to hit this without any backups.i will give my recovery instructions. First, my recovery involves having backup, sorry if that excludes you. I don't think my backup was too recent, so take a look. Second there's a bit about database schema in here, that was something that you'll have to be aware of if you're lucky enough to fix the encryption issue. When you downgrade signal to and older version which is prudent until signal.org gives much better clarity how to avoid this issue, you may overshoot and install a version of signal that is incompatible with the database. But you'll see this after you get past the encryption hurdle if it is relevant. I think it's safe to just go back to a early version well before the scary 7.24.2 times, this is because there's a schema check in the code, that you'll see how to deal with in step 6. I won't recommend a version, because i don't understand much about the schema update process, but I went back to a month or so ago version.
current(BAD) "encryptedKey": "not_this_time_NSA",
"safeStorageBackend": "gnome_libsecret" backup(GOOD) "key": "not_this_time_NSA",
Hopefully this works for you, I am totally shocked that signal and/or flathub hasn't pulled this release, or explained it, because I didn't need to go through this scare. Please warn your friends not to update their flatpak and take an immediately backup of their ~/.var/app/org.signal.Signal directory. credits to @brettk-git @frans-fuerst for adding useful bits of info in other issues that made me feel like a full recovery was possible. |
tl;dr for anyone experiencing this -> if you don't have a recent backup of your Signal folder your data is permanently lost. |
I managed to fix it by first doing what @toppk said about reverting the key.
So after updating I used Flatseal to remove the "org.freedesktop.secrets" permission and now Signal works on 7.24.1. |
I have added some simplified recovery instructions here: https://community.signalusers.org/t/warning-do-not-update-from-flathub-database-error/63222 |
And gnome_libsecret does not work. Close it and database is broken again. At leas with flatpak, but the flatpak itself looks correct. other tools using gnome_libsecret work fine. |
For the Flathub version, it will use Keep the discussion here to the official Signal version. If your issue is related to Flathub, please move the discussion to https://github.com/flathub/org.signal.Signal/issues . |
I'm also using the Flathub version but, adding |
The dialog is flathub's. See the issue/mr downstream for its rationale. |
Depends which dialog you mean. In flatpak, it can't "just switch to 'gnome-libsecret'" automatically because it can't find which backend is available. You can see the result of this in this thread: broken databases. Flathub will show you in info when the Then, there are other dialogues which could come from Signal: it detects that it previously used gnome-libsecret to encrypt the key but the current setting is different (e.g. |
Moin,
A bit strange is, that 7.24.1 is fine on an other device (both flatpaks) |
I don't think you're up-to-date. |
Both devices have the flatpak with 7.24.1 installed. |
I am also seeing this error. I am also on version flatpak run org.signal.Signal --password-store=gnome-libsecret
Debug: Using password store: basic
Debug: Will run signal with the following arguments: --password-store=basic
Debug: Additionally, user gave: --password-store=gnome-libsecret
Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /app/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME phobos
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/monolith/.var/app/org.signal.Signal/config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 15:44:08.130: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:44:08.130: Failed to load module "pk-gtk-module"
Gtk-Message: 15:44:08.131: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:44:08.131: Failed to load module "pk-gtk-module"
{"level":30,"time":"2024-09-30T19:44:08.262Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-09-30T19:44:08.263Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-09-30T19:44:08.263Z","msg":"app.ready: preferred system locales: en-US, en"}
{"level":30,"time":"2024-09-30T19:44:08.263Z","msg":"locale: Supported locales: af-ZA, ar, az-AZ, bg-BG, bn-BD, bs-BA, ca, cs, da, de, el, en, es, et-EE, eu, fa-IR, fi, fr, ga-IE, gl-ES, gu-IN, he, hi-IN, hr-HR, hu, id, it, ja, ka-GE, kk-KZ, km-KH, kn-IN, ko, ky-KG, lt-LT, lv-LV, mk-MK, ml-IN, mr-IN, ms, my, nb, nl, pa-IN, pl, pt-BR, pt-PT, ro-RO, ru, sk-SK, sl-SI, sq-AL, sr, sv, sw, ta-IN, te-IN, th, tl-PH, tr, ug, uk-UA, ur, vi, yue, zh-CN, zh-HK, zh-Hant"}
{"level":30,"time":"2024-09-30T19:44:08.263Z","msg":"locale: Preferred locales: en-US, en"}
{"level":30,"time":"2024-09-30T19:44:08.263Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-09-30T19:44:08.264Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-09-30T19:44:08.284Z","msg":"intl.onWarn [@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution"}
{"level":30,"time":"2024-09-30T19:44:08.285Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-09-30T19:44:08.285Z","msg":"getSQLKey: decrypting key"}
{"level":30,"time":"2024-09-30T19:44:08.285Z","msg":"getSystemTraySetting got value DoNotUseSystemTray"}
{"level":30,"time":"2024-09-30T19:44:08.285Z","msg":"getSystemTraySetting returning DoNotUseSystemTray"}
{"level":30,"time":"2024-09-30T19:44:08.286Z","msg":"app ready"}
{"level":30,"time":"2024-09-30T19:44:08.286Z","msg":"starting version 7.24.1"}
{"level":30,"time":"2024-09-30T19:44:08.286Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-09-30T19:44:08.288Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-30T19:44:08.297Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-30T19:44:08.298Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2024-09-30T19:44:08.298Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":960,\"height\":1095,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":true,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"enableBlinkFeatures\":\"CSSPseudoDir,CSSLogical\",\"enablePreferredSizeMode\":true,\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":0,\"y\":69}"}
{"level":30,"time":"2024-09-30T19:44:08.335Z","msg":"spellcheck: user locales: [\"en-US\",\"en\"]"}
{"level":30,"time":"2024-09-30T19:44:08.335Z","msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"}
{"level":30,"time":"2024-09-30T19:44:08.335Z","msg":"spellcheck: setting languages to: [\"en-US\",\"en\"]"}
2024-09-30 15:44:08.484: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2024-09-30 15:44:08.484: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2024-09-30 15:44:08.484: ERROR CORE sqlcipher_codec_ctx_set_error 1
{"level":40,"time":"2024-09-30T19:44:08.484Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-09-30T19:44:08.484Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
2024-09-30 15:44:08.510: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2024-09-30 15:44:08.510: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2024-09-30 15:44:08.510: ERROR CORE sqlcipher_codec_ctx_set_error 1
{"level":40,"time":"2024-09-30T19:44:08.510Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-09-30T19:44:08.511Z","msg":"MainSQL: Database startup error: SqliteError: file is not a database\n at Database.pragma ([REDACTED]/node_modules/@signalapp/better-sqlite3/lib/methods/pragma.js:11:31)\n at getUserVersion ([REDACTED]/ts/sql/util.js:132:13)\n at migrateSchemaVersion ([REDACTED]/ts/sql/Server.js:404:54)\n at openAndMigrateDatabase ([REDACTED]/ts/sql/Server.js:436:5)\n at openAndSetUpSQLCipher ([REDACTED]/ts/sql/Server.js:458:14)\n at initialize ([REDACTED]/ts/sql/Server.js:496:10)\n at MessagePort.<anonymous> ([REDACTED]/ts/sql/mainWorker.js:69:41)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)"}
{"level":50,"time":"2024-09-30T19:44:08.511Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-30T19:44:08.716Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-09-30T19:44:10.236Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-09-30T19:44:10.236Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-09-30T19:44:10.236Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}
{"level":50,"time":"2024-09-30T19:44:12.938Z","msg":"onDatabaseError: Quitting application"}
{"level":30,"time":"2024-09-30T19:44:12.939Z","msg":"main window closed event"}
{"level":30,"time":"2024-09-30T19:44:12.939Z","msg":"quit event {\"hasEventBeenPrevented\":false,\"windowCount\":0,\"mainWindowExists\":false}"}
{"level":50,"time":"2024-09-30T19:44:12.941Z","msg":"Error occurred in handler for 'sql-channel:read': {\"name\":\"SqliteError\"}"} Using flatseal to change the envvar from Additionally the "Copy and Quit" option only quits, I haven't gotten it to actually copy. |
I stepped through each version of signal desktop reported by flathub. None of them work. flatpak remote-info --log flathub org.signal.Signal This is a brutal update. |
There's troubleshooting help here: https://community.signalusers.org/t/database-error/63214 |
Exactly, I can't use the desktop (flatpak) app anymore when using |
gnome-libsecret is broken for the moment on flatpak. Basic has been the default setting for years, using it for a few more days won't hurt anything. The WIP workaround is here: flathub/org.signal.Signal#756 |
Ahh thank you for pointing me in the correct direction! 👍 Was missing this due to all the ongoing discussions. The test branch with @bbhtt pr flathub/org.signal.Signal#756 is working for me throughout subsequent app restarts. |
I restored the database. From an old backup I recovered the OS: Pop_OS 22.04 Yes, you read that right, I changed from flatpak to deb. During the restore, I moved the Signal folder from |
All the previous updates can't magically recover a lost key. There might be workarounds but your current best option is to start with an empty database. |
I might've submitted this to the wrong place thinking it's a flatpak issue, but see flathub/org.signal.Signal#774 |
Using a supported version?
Overall summary
After updating to 7.24.1 first close of Signal breaking database.
app.log:
main.log:
I see new file
config.json
In same time after first closure ~1h DB is broken. What goings on? Also another user have same experience: #7025 Is anybody here got same?
For example I DON'T HAVE SAVED PHONE NUMBER COZ IT BEEN TEMPORALLY PHONE NUMBER. I DON'T USE SIGNAL ON PHONE TOO TO RECOVER IT.
Steps to reproduce
Expected result
Signal must open DB
Actual result
DB is broken
Screenshots
No response
Signal version
7.24.1
Operating system
Ubuntu 24.04
Version of Signal on your phone
No response
Link to debug log
No response
The text was updated successfully, but these errors were encountered: