Skip to content
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

Database Error prevents Signal-Desktop to start #6970

Open
2 tasks done
ronidee opened this issue Aug 9, 2024 · 63 comments
Open
2 tasks done

Database Error prevents Signal-Desktop to start #6970

ronidee opened this issue Aug 9, 2024 · 63 comments

Comments

@ronidee
Copy link

ronidee commented Aug 9, 2024

Using a supported version?

  • I have searched searched open and closed issues for duplicates.
  • I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

Overall summary

Seemingly out of the blue Signal always shows a database error popup whenever I attempt to start the application. It prompts me to quit or to delete all data, i.e. I can't use Signal without deleting my data (which I'm trying to avoid).

Steps to reproduce

Expected result

Actual result

Screenshots

I receive this error when trying to start Signal:
image

When I click "Copy error and quit", sometimes this second error message appears:
Screenshot from 2024-08-08 12-02-56

Signal version

7.19.0

Operating system

Ubuntu 23.10

Version of Signal on your phone

7.12.3

Link to debug log

https://pastebin.com/cnikkkFs

@jenkniss
Copy link

jenkniss commented Aug 9, 2024

Thank you for logging this @ronidee

  • We are having this same issue across my office's signal users with v7.19.0. We are all unable to use Signal Desktop at the moment.
  • We have tried the Delete Data and Restart option which does not fix the issue.

@ronidee
Copy link
Author

ronidee commented Aug 10, 2024

We are all unable to use Signal Desktop at the moment.

You won't have all your history, but you can try using signal-desktop-beta for the time being. Version 7.20.0~beta.1 works fine for me.

@Firebug24k
Copy link

This is affecting me too (Arch linux). I tried downgrading to an older version but they also fail.

{"level":40,"time":"2024-08-10T14:27:40.269Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""} {"level":30,"time":"2024-08-10T14:27:40.269Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"} {"level":40,"time":"2024-08-10T14:27:40.269Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"} {"level":50,"time":"2024-08-10T14:27:40.269Z","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:383:54)\n at openAndMigrateDatabase ([REDACTED]/ts/sql/Server.js:414:3)\n at openAndSetUpSQLCipher ([REDACTED]/ts/sql/Server.js:429:14)\n at Object.initialize ([REDACTED]/ts/sql/Server.js:465:16)\n at MessagePort.<anonymous> ([REDACTED]/ts/sql/mainWorker.js:84:35)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)\n at exports.emitMessage (node:internal/per_context/messageport:23:28)"} {"

@scottnonnenberg-signal
Copy link
Contributor

@ronidee Thanks for providing your debug log. Based on these log lines, Signal Desktop successfully (as far as it understood) decrypted your database key via Electron's safeStorage APIs, but that key was incorrect. That then resulted in the 'file is not a database'/'code=26' error.

{"level":30,"time":"2024-08-09T11:32:48.316Z","msg":"getSQLKey: decrypting key"}
<no other database-related logging>
{"level":40,"time":"2024-08-09T11:32:48.536Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}

My questions to all are:

  • How did you install Signal Desktop?
  • What desktop environment are you in, and has that changed recently? If you switch desktop environments, Signal Desktop won't have access to its previous privileged storage location.
  • Is there anything else that has changed recently on your system that might affect Signal Desktop's access to your privileged storage location?

@ronidee
Copy link
Author

ronidee commented Aug 12, 2024

Hello, thank you for your reply!

  • I installed it via the "Linux (Debian-based) Install Instructions" presented on https://signal.org/de/download/#.

  • I'm using Gnome 45.2, it has not recently changed. Using it for years, only the version changes (obviously).

  • I can't think of anything. The password stayed the same.

  • I had booted to my Windows 11 partition intermediately. After returning to my GNU/Linux OS the next day it stopped working. I think this could indecate that a) some package update caused the error (I think I ran apt upgarde while Signal was still working) or b) that Windows messed something up. Or perhaps it's just coincidental.

  • Also I (nearly?) ran out of disk space for a few seconds while downloading a file and Signal was active during that. Could that be the cause too?

What should I do next?

Kind regards

ronidee

@scottnonnenberg-signal
Copy link
Contributor

@ronidee If you could give us your logs from ~/.config/Signal/logs that would give us more historical context. Maybe you would be willing to provide those here or to [email protected]?

@jenkniss
Copy link

jenkniss commented Aug 13, 2024

Following up on our experience:

I was able to resolve this for myself and team with the following, which may or may not help others.

We are all running Rocky 9.4 and Gnome 40.10

NOTE: Some of us did have at least partial restore of messages and others did not, but all of us have had Signal Desktop running normally again since.

Obviously, use caution here if you are tying to retain all of your current messages this worked for what we need but may not end up being the optimal solution for you!

  1. Verified that we had installed Signal via snap: which signal-desktop
  2. Removed Signal Desktop with snap purge option: sudo snap remove --purge signal-desktop
  3. Installed Flatpak: sudo dnf install flatpak
  4. Added repo: flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  5. Re-installed Signal Desktop: flatpak install flathub org.signal.Signal

@scottnonnenberg-signal
Copy link
Contributor

@jenkniss Moving from snap to flatpack worked for you - do you have any idea why? Perhaps it has something to do with how each of those systems mediates access to privileged storage locations used by Electron's safeStorage API?

@jenkniss
Copy link

jenkniss commented Aug 14, 2024

Hmm... well this wont necessarily explain why snap has the issue vs flatpak that I can see but it definitely feels like something is up with the keys/db. Something is preventing the db from initializing (as we see in the error presented). I did notice this comment at line 1687 from commit e449702 which seems to fit the the error some of us are getting when I looked at sql.sqlCall's defined errors:

```// This should be the first awaited call in this function, otherwise
// `sql.sqlCall` will throw an uninitialized error instead of waiting for
// init to finish.```

There is a new await prior to that in the function.

I have not dug much deeper than that.

@scottnonnenberg-signal
Copy link
Contributor

scottnonnenberg-signal commented Aug 15, 2024

@jenkniss Please let us know if you find anything else interesting, especially differences between those two packages or details of your system.

I took a look at the code you pointed out, and in the latest version of main.ts you can see that it's the first await in that codepath - the function has returned by that point if that other await was hit:

Signal-Desktop/app/main.ts

Lines 1723 to 1763 in 00e6071

async function initializeSQL(
userDataPath: string
): Promise<{ ok: true; error: undefined } | { ok: false; error: Error }> {
sqlInitTimeStart = Date.now();
let key: string;
try {
key = getSQLKey();
} catch (error) {
try {
// Initialize with *some* key to setup paths
await sql.initialize({
appVersion: app.getVersion(),
configDir: userDataPath,
key: 'abcd',
logger: getLogger(),
});
} catch {
// Do nothing, we fail right below anyway.
}
if (error instanceof Error) {
return { ok: false, error };
}
return {
ok: false,
error: new Error(`initializeSQL: Caught a non-error '${error}'`),
};
}
try {
// This should be the first awaited call in this function, otherwise
// `sql.sqlRead` will throw an uninitialized error instead of waiting for
// init to finish.
await sql.initialize({
appVersion: app.getVersion(),
configDir: userDataPath,
key,
logger: getLogger(),
});

@waynongithub
Copy link

waynongithub commented Aug 15, 2024

Same here. I migrated from linux mint 20.2 MATE to 21.3 MATE and Signal gives the same database error. I haven't tried linking to my phone because I'm afraid that would ruin any chance of keeping my chat history.

I did not have this issue migrating from linux mint 18.3 to 19.3 to 20.2.
I also had no problems transferring Signal Desktop from one laptop to another (both running linux mint 20.3).

I installed Signal Desktop with the install instructions from https://signal.org/download
Both installations run Signal 7.19.1

@ddeberhar
Copy link

ddeberhar commented Aug 15, 2024

Is there a way to back-up the key from the (Electron) safeStorage and restore it - say - after migrating e.g. to a different desktop, different distro/OS, or a new installation after a crash - along with the Signal folder (i.e. the desktop's history)?

In my main.log I have on one system:

{"level":30,"time":"2024-08-14T10:27:51.326Z","msg":"getSQLKey: decrypting key"}
...
{"level":30,"time":"2024-08-14T10:27:51.609Z","msg":"MainSQL: updateSchema:\n  Current user_version: 1120;\n  Most recent db schema: 1120;\n  SQLite version: 3.42.0;\n  SQLCipher version: 4.5.5 community;\n  (deprecated) schema_version: 486;\n"}

but on the other:

{"level":30,"time":"2024-08-14T10:36:00.929Z","msg":"getSQLKey: decrypting key"}
...
{"level":40,"time":"2024-08-14T10:36:02.033Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}

(I used to mount the one Signal folder from a Veracrypt container on an external USB to the desktop or laptop, whichever I was just on - now I learned that the signal-dektop will start with it's history only on that single system which holds the key in the safeStorage; so I'm curious again how to do a backup and restore - similiar to what I can have Signal doing on Android with local backups.)

Many thanks,
Dirk

@vegantostada
Copy link

See my comment on another thread #6944 (comment)

@Firebug24k
Copy link

I'm pretty sure vegantostada is on to something. Signal works fine if I delete my entire old DB and recreate it (but I've now sadly lost my entire 3 years of message history), the issue is something with the way the latest version is storing keys.

@ddeberhar
Copy link

ddeberhar commented Aug 16, 2024

My point is that I'd very much desire a supported and maintained solution over a temporary. From the various reports I got the impression that the safeStorage use may fail to decrypt the key correctly after any (Linux/Windows?) system upgrade - and definitely after a re-installation and plain restore of the "Signal/" folder. I'm not the only one who'd be unhappy losing all the history on the desktop.

Since things are evolving further, this workaround to temporarily store the key unencrypted before starting the Signal-desktop again with the folder placed to the new desired location, may work just until the next step in the developement.

And if I read the script right which vegantostada provided, it is for Windows - I'm not sure, to what it would resolve app.getpath('appdata') on linux - perhaps Signal-desktop just decided to use .config/Signal/ while it's e.g. .mozilla/firefox/ for the browser ("~" stands for /home/[username]/ and names starting with a dot are normally hidden).

@waynongithub
Copy link

For what it's worth, I restored access to the Signal database by replacing the keyring directory on my linux mint 21.3 installation with that of my linux mint 20.3.

@sailbird
Copy link

Similar to:

#6750

@fracasula
Copy link

fracasula commented Aug 28, 2024

Same here, fresh installation on OpenSuse Leap 15.6.

Installed via snap: https://snapcraft.io/signal-desktop

I installed it for the first time with no prior installation. I get the same error also when starting it from the command-line:

Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /snap/signal-desktop/692/opt/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME nebuchadnezzar
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/francesco/snap/signal-desktop/692/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/francesco/snap/signal-desktop/common/.cache/gio-modules/libgiolibproxy.so
/usr/share/libdrm/amdgpu.ids: No such file or directory
/usr/share/libdrm/amdgpu.ids: No such file or directory
{"level":30,"time":"2024-08-28T07:26:54.966Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-08-28T07:26:54.967Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-08-28T07:26:54.967Z","msg":"app.ready: preferred system locales: en-GB, en"}
{"level":30,"time":"2024-08-28T07:26:54.967Z","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-08-28T07:26:54.967Z","msg":"locale: Preferred locales: en-GB, en"}
{"level":30,"time":"2024-08-28T07:26:54.967Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-08-28T07:26:54.968Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-08-28T07:26:54.984Z","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"}
/usr/share/libdrm/amdgpu.ids: No such file or directory
{"level":30,"time":"2024-08-28T07:26:54.984Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-08-28T07:26:54.984Z","msg":"getSQLKey: decrypting key"}
{"level":30,"time":"2024-08-28T07:26:54.985Z","msg":"getSystemTraySetting got value DoNotUseSystemTray"}
{"level":30,"time":"2024-08-28T07:26:54.985Z","msg":"getSystemTraySetting returning DoNotUseSystemTray"}
{"level":30,"time":"2024-08-28T07:26:54.985Z","msg":"app ready"}
{"level":30,"time":"2024-08-28T07:26:54.986Z","msg":"starting version 7.21.0"}
{"level":30,"time":"2024-08-28T07:26:54.986Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-08-28T07:26:54.987Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-08-28T07:26:54.988Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-08-28T07:26:54.988Z","msg":"got fast spellcheck setting true"}
{"level":50,"time":"2024-08-28T07:26:54.988Z","msg":"visibleOnAnyScreen: windowOptions didn't have valid bounds fields"}
{"level":30,"time":"2024-08-28T07:26:54.988Z","msg":"Location reset needed"}
{"level":30,"time":"2024-08-28T07:26:54.988Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":800,\"height\":610,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"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\"}"}
{"level":30,"time":"2024-08-28T07:26:55.015Z","msg":"spellcheck: user locales: [\"en-GB\",\"en\"]"}
{"level":30,"time":"2024-08-28T07:26:55.015Z","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-08-28T07:26:55.015Z","msg":"spellcheck: setting languages to: [\"en-GB\",\"en\"]"}
{"level":40,"time":"2024-08-28T07:26:55.129Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-08-28T07:26:55.129Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
{"level":40,"time":"2024-08-28T07:26:55.151Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-08-28T07:26:55.152Z","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:393:54)\n    at openAndMigrateDatabase ([REDACTED]/ts/sql/Server.js:425:5)\n    at openAndSetUpSQLCipher ([REDACTED]/ts/sql/Server.js:447:14)\n    at initialize ([REDACTED]/ts/sql/Server.js:485: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-08-28T07:26:55.152Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-08-28T07:26:55.351Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-08-28T07:26:55.636Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-08-28T07:26:55.637Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-08-28T07:26:55.637Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}
{"level":50,"time":"2024-08-28T07:26:57.180Z","msg":"onDatabaseError: Quitting application"}
{"level":30,"time":"2024-08-28T07:26:57.180Z","msg":"main window closed event"}
{"level":30,"time":"2024-08-28T07:26:57.181Z","msg":"quit event {\"hasEventBeenPrevented\":false,\"windowCount\":0,\"mainWindowExists\":false}"}
{"level":50,"time":"2024-08-28T07:26:57.181Z","msg":"Error occurred in handler for 'sql-channel:read': {\"name\":\"SqliteError\"}"}

@fracasula
Copy link

Even if I delete everything under /home/francesco/snap/signal-desktop/692/.config/Signal and start from scratch, the moment I close the app and open it again, I get the error.

@silvermar
Copy link

Same problem here with snap version 7.21 in Fedora 40. The flatpak works fine but I'd prefer to use the snap install instead.

@tuxcrafter
Copy link

$ signal-desktop Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' } NODE_ENV production NODE_CONFIG_DIR /opt/Signal/resources/app.asar/config NODE_CONFIG {} ALLOW_CONFIG_MUTATIONS undefined HOSTNAME workstation04.bothends.lan NODE_APP_INSTANCE undefined SUPPRESS_NO_CONFIG_WARNING undefined SIGNAL_ENABLE_HTTP undefined userData: /home/j.doe/.config/Signal config/get: Successfully read user config file config/get: Successfully read ephemeral config file making app single instance {"level":30,"time":"2024-08-29T08:36:34.473Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.488Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.488Z","msg":"initializing localeOverride setting null"} {"level":30,"time":"2024-08-29T08:36:34.489Z","msg":"app.ready: hour cycle preference: UnknownPreference"} {"level":30,"time":"2024-08-29T08:36:34.489Z","msg":"app.ready: preferred system locales: en-US, en"} {"level":30,"time":"2024-08-29T08:36:34.489Z","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-08-29T08:36:34.489Z","msg":"locale: Preferred locales: en-US, en"} {"level":30,"time":"2024-08-29T08:36:34.489Z","msg":"locale: Locale Override: null"} {"level":30,"time":"2024-08-29T08:36:34.493Z","msg":"locale: Matched locale: en"} {"level":40,"time":"2024-08-29T08:36:34.538Z","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-08-29T08:36:34.538Z","msg":"locale: Text info direction for en: ltr"} {"level":30,"time":"2024-08-29T08:36:34.539Z","msg":"getSQLKey: using legacy key"} {"level":30,"time":"2024-08-29T08:36:34.540Z","msg":"getSystemTraySetting got no value, returning Uninitialized"} {"level":30,"time":"2024-08-29T08:36:34.540Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.550Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.551Z","msg":"app.ready: setting system-tray-setting to DoNotUseSystemTray"} {"level":30,"time":"2024-08-29T08:36:34.551Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.557Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.561Z","msg":"app ready"} {"level":30,"time":"2024-08-29T08:36:34.562Z","msg":"starting version 7.22.0"} {"level":30,"time":"2024-08-29T08:36:34.562Z","msg":"media access status [object Undefined] [object Undefined]"} {"level":30,"time":"2024-08-29T08:36:34.595Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.602Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.602Z","msg":"saving theme-setting value system"} {"level":30,"time":"2024-08-29T08:36:34.602Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.609Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2024-08-29T08:36:34.609Z","msg":"initializing spellcheck setting true"} {"level":30,"time":"2024-08-29T08:36:34.611Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":800,\"height\":610,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#3a76f0\",\"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\":563,\"y\":228}"} {"level":30,"time":"2024-08-29T08:36:34.692Z","msg":"spellcheck: user locales: [\"en-US\",\"en\"]"} {"level":30,"time":"2024-08-29T08:36:34.692Z","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-08-29T08:36:34.693Z","msg":"spellcheck: setting languages to: [\"en-US\",\"en\"]"} {"level":30,"time":"2024-08-29T08:36:34.695Z","msg":"spellcheck: dictionary initialized: en"} {"level":30,"time":"2024-08-29T08:36:34.699Z","msg":"spellcheck: dictionary initialized: en-US"} {"level":30,"time":"2024-08-29T08:36:34.752Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"} {"level":50,"time":"2024-08-29T08:36:34.754Z","msg":"MainSQL: Database startup error: Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.29' not found (required by [REDACTED].unpacked/node_modules/@signalapp/better-sqlite3/build/Release/better_sqlite3.node)\n at process.func [as dlopen] (node:electron/js2c/node_init:2:2559)\n at Module._extensions..node (node:internal/modules/cjs/loader:1470:18)\n at Object.func [as .node] (node:electron/js2c/node_init:2:2786)\n at Module.load (node:internal/modules/cjs/loader:1215:32)\n at Module._load (node:internal/modules/cjs/loader:1031:12)\n at c._load (node:electron/js2c/node_init:2:17025)\n at Module.require (node:internal/modules/cjs/loader:1240:19)\n at require (node:internal/modules/helpers:179:18)\n at bindings ([REDACTED]/node_modules/bindings/bindings.js:112:48)\n at new Database ([REDACTED]/node_modules/@signalapp/better-sqlite3/lib/database.js:48:64)"}
{"level":50,"time":"2024-08-29T08:36:34.755Z","msg":"Failed to get zoom factor {"name":"Error"}"}
{"level":30,"time":"2024-08-29T08:36:35.313Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-08-29T08:36:36.214Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-08-29T08:36:36.216Z","msg":"close event {"readyForShutdown":false,"shouldQuit":false}"}
{"level":30,"time":"2024-08-29T08:36:36.216Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}
{"level":50,"time":"2024-08-29T08:36:45.510Z","msg":"onDatabaseError: Quitting application"}
{"level":30,"time":"2024-08-29T08:36:45.513Z","msg":"main window closed event"}
{"level":30,"time":"2024-08-29T08:36:45.514Z","msg":"quit event {"hasEventBeenPrevented":false,"windowCount":0,"mainWindowExists":false}"}
{"level":50,"time":"2024-08-29T08:36:45.518Z","msg":"Error occurred in handler for 'sql-channel:read': {"name":"Error"}"}
`

running on "Linux Mint 20 Ulyana" downgrading to 7.21.0 fixes the issue for me, looks like the new version was compiled against a newer EBI/API version of libstdc++ please release a new compatible version.

# apt-get install signal-desktop=7.21.0 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be DOWNGRADED: signal-desktop 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. Need to get 0 B/122 MB of archives. After this operation, 56,3 kB disk space will be freed. Do you want to continue? [Y/n] y dpkg: warning: downgrading signal-desktop from 7.22.0 to 7.21.0 (Reading database ... 436870 files and directories currently installed.) Preparing to unpack .../signal-desktop_7.21.0_amd64.deb ... Unpacking signal-desktop (7.21.0) over (7.22.0) ... Setting up signal-desktop (7.21.0) ... update-alternatives is /usr/bin/update-alternatives Error in file "/usr/share/applications/org.kde.kdeconnect_open.desktop": "*/*" is an invalid MIME type ("*" is an unregistered media type) Could not parse file "/usr/share/applications/screensavers/glitchpeg.desktop": Key file contains line ?several times a second. After a while, finds a new image to corrupt. Written by Jamie Zawinski; 2018.? which is not a key-value pair, group, or comment Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for desktop-file-utils (0.24+linuxmint1) ...

@fracasula
Copy link

Solved with flatpak install flathub org.signal.Signal on OpenSuse Leap 15.6, thanks @silvermar.

@corsac-s
Copy link

I started experiencing the issue just recently. I'm using Debian sid using the Debian package provided by Signal.org.

One notable thing is that I'm running signal-desktop through Firejail. When not doing that it seems to work fine. I think Snap/Flatpak variants might add some kind of sandboxing as well, so if it's indeed the same issue, maybe there's something to look at?

Maybe the new API requires an update of the Firejail/Snap/Flatpak sandboxing profiles?

@corsac-s
Copy link

corsac-s commented Sep 8, 2024

Still the same error with version 7.23.0.

@scottnonnenberg-signal
Copy link
Contributor

@corsac-s If Signal Desktop cannot access a consistently-available form of protected storage (or basic, if the system doesn't support it), it will save it database password somewhere which it cannot later access. That will cause the errors you are seeing, since the database can't be decrypted.

But maybe there's something else going on in your configuration? Can you provide debug logs (~/config/Signal/logs/*.log), and a little bit more information about the history of your Signal Desktop usage? Can you think of a way that Signal Desktop would have put your encrypted database password into a protected storage location that it can no longer access?

@xvado00
Copy link

xvado00 commented Sep 9, 2024

I can confirm this issue (code=26: file is not a database) on Arch. Mobile app reports last activity on 23.8.2024 corresponding to the version 7.19.1 of signal-desktop. This is a device paired since 2020.
Of the package-listed dependences, none have been upgraded that that day. However both nodejs (22.6.0-1 -> 22.7.0-1) and electron (1:31-1 -> 1:32-1) together with signal-desktop (7.19.1-1 -> 7.21.0-1) were upgraded. Going back to those versions does not solve the issue, nor did any upgrade so far.

Recently, I noticed, I was being asked by kwallet to allow Signal access. And indeed it is set in Signal config as:
"safeStorageBackend": "kwallet6"
I may have allowed it access on one devices and denied on the other... I cannot seem to find any associated password in the wallet, though. And on the device with allowed access, I can start signal-desktop.

And allowing access on the other device and reloggin fixes the issue.
Can Signal's password be masking as "Chromium Keys/Chromium Safe Storage"?

@corsac-s
Copy link

corsac-s commented Sep 9, 2024

@corsac-s If Signal Desktop cannot access a consistently-available form of protected storage (or basic, if the system doesn't support it), it will save it database password somewhere which it cannot later access. That will cause the errors you are seeing, since the database can't be decrypted.

But maybe there's something else going on in your configuration? Can you provide debug logs (~/config/Signal/logs/*.log), and a little bit more information about the history of your Signal Desktop usage? Can you think of a way that Signal Desktop would have put your encrypted database password into a protected storage location that it can no longer access?

It's possible I've run signal both under and outside Firejail, so maybe at one point (outside of Firejail) it identified a way to save the password, then can't access it under Firejail. Following the comment by @xvado00 I checked the configuration and I have:

"safeStorageBackend": "gnome_libsecret"

(I'm running Debian sid with Xfce desktop environment, but I do have gnome keyring available somewhere).

The debug logs are attached.
app.log
main.log

I can't really see issues there but on the terminal output I get:

[18:0909/203736.429726:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/firejail/mnt/dbus/system: Permission denied

I guess it might be linked because I assume gnome_libsecret might try to access gnome keyring with DBus. It was working previously but maybe the password was saved somewhere else?

Also, when looking in seahorse I can't see a password for Signal so I'm not sure about all of the above.

@scottnonnenberg-signal
Copy link
Contributor

@corsac-s Going back and reading your original report, it seems that the answer is simply that you cannot run Signal Desktop in Firejail. Firejail somehow prevents access to the secure storage location it normally has access to.

Note that you might be able to start your Desktop installation over from scratch and run it only within Firejail, giving Desktop the consistent access it needs. My theory is that you ran the first version that upgraded its database key storage outside of Firejail, so that's where the database key was saved.

@frans-fuerst
Copy link

Strangely on another Fedora 40 machine with no obvious differences in packages related to sqlite Signal works fine. I've eybealled the diffs of startup-logs and also compared the output of strace -ff --trace openat to see which different files are being touched, but couldn't find a hint..

@kr428
Copy link

kr428 commented Sep 27, 2024

So far I didn't manage to find any version of Fedora, locally, for which it isn't broken like that. Also, that approach of replacing existing key with the key from the backup doesn't reliably work. It did, once, yesterday, which caused Signal to catch up with messages from the smartphone. As of today however, this doesn't work anymore. Messages sent on the (old) profile on the computer aren't seen on the smartphone but apparently delivered, and new messages received appear only on the smartphone but not on the desktop. Started out with a clean config on the desktop which is thoroughly annoying. 🙁

@gunchleoc
Copy link

Same problem here on Linux Mint 21.3m Kernel 6..8.0-45-generic x86_64, MATE 1.26.0

Signal version 7.24.1 installed from Flatpack.

signal_error

When I hit the "Copy error and quit" button, what is supposed to happen? Is there any information that I can get to you from there? It doesn't write anything to the clipboard.

Today's /media/cuideigin/BeanLin/uidheam/dotfiles/.var/app/org.signal.Signal/main.log:

{"level":30,"time":"2024-09-27T03:15:24.364Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-09-27T03:15:24.365Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-09-27T03:15:24.365Z","msg":"app.ready: preferred system locales: gd-GB, gd"}
{"level":30,"time":"2024-09-27T03:15:24.365Z","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-27T03:15:24.365Z","msg":"locale: Preferred locales: gd-GB, gd"}
{"level":30,"time":"2024-09-27T03:15:24.365Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-09-27T03:15:24.366Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-09-27T03:15:24.390Z","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-27T03:15:24.390Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-09-27T03:15:24.390Z","msg":"getSQLKey: decrypting key"}
{"level":30,"time":"2024-09-27T03:15:24.392Z","msg":"getSystemTraySetting got value MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-27T03:15:24.392Z","msg":"getSystemTraySetting returning MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-27T03:15:24.393Z","msg":"app ready"}
{"level":30,"time":"2024-09-27T03:15:24.393Z","msg":"starting version 7.24.1"}
{"level":30,"time":"2024-09-27T03:15:24.393Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-09-27T03:15:24.395Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-27T03:15:24.404Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-27T03:15:24.404Z","msg":"got fast spellcheck setting false"}
{"level":30,"time":"2024-09-27T03:15:24.405Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":2554,\"height\":1529,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":false,\"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\":0}"}
{"level":30,"time":"2024-09-27T03:15:24.450Z","msg":"spellcheck: user locales: [\"gd-GB\",\"gd\"]"}
{"level":30,"time":"2024-09-27T03:15:24.450Z","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-27T03:15:24.450Z","msg":"spellcheck: setting languages to: [\"en\"]"}
{"level":40,"time":"2024-09-27T03:15:24.451Z","msg":"MainSQL: Database log code=283: recovered 335 frames from WAL file [REDACTED]/sql/db.sqlite-wal"}
{"level":40,"time":"2024-09-27T03:15:24.526Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-09-27T03:15:24.530Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
{"level":40,"time":"2024-09-27T03:15:24.558Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-09-27T03:15:24.558Z","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-27T03:15:24.559Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-27T03:15:24.919Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-09-27T03:15:25.364Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-09-27T03:15:25.364Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-09-27T03:15:25.365Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}
{"level":50,"time":"2024-09-27T04:08:09.028Z","msg":"onDatabaseError: Quitting application"}
{"level":30,"time":"2024-09-27T04:08:09.031Z","msg":"main window closed event"}
{"level":30,"time":"2024-09-27T04:08:09.031Z","msg":"quit event {\"hasEventBeenPrevented\":false,\"windowCount\":0,\"mainWindowExists\":false}"}
{"level":50,"time":"2024-09-27T04:08:09.032Z","msg":"maybeRequestCloseConfirmation: Response never received; continuing with close."}
{"level":50,"time":"2024-09-27T04:08:09.032Z","msg":"MainSQL close, failed: 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":30,"time":"2024-09-27T04:08:09.032Z","msg":"updater/start: Updates disabled - not starting new version checks"}
{"level":50,"time":"2024-09-27T04:08:09.034Z","msg":"Error occurred in handler for 'sql-channel:read': {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-27T09:24:02.158Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-09-27T09:24:02.159Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-09-27T09:24:02.159Z","msg":"app.ready: preferred system locales: gd-GB, gd"}
{"level":30,"time":"2024-09-27T09:24:02.159Z","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-27T09:24:02.159Z","msg":"locale: Preferred locales: gd-GB, gd"}
{"level":30,"time":"2024-09-27T09:24:02.159Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-09-27T09:24:02.160Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-09-27T09:24:02.183Z","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-27T09:24:02.184Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-09-27T09:24:02.184Z","msg":"getSQLKey: decrypting key"}
{"level":30,"time":"2024-09-27T09:24:02.185Z","msg":"getSystemTraySetting got value MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-27T09:24:02.185Z","msg":"getSystemTraySetting returning MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-27T09:24:02.185Z","msg":"app ready"}
{"level":30,"time":"2024-09-27T09:24:02.185Z","msg":"starting version 7.24.1"}
{"level":30,"time":"2024-09-27T09:24:02.185Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-09-27T09:24:02.187Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-27T09:24:02.194Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-27T09:24:02.194Z","msg":"got fast spellcheck setting false"}
{"level":30,"time":"2024-09-27T09:24:02.194Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":2554,\"height\":1529,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":false,\"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\":0}"}
{"level":30,"time":"2024-09-27T09:24:02.237Z","msg":"spellcheck: user locales: [\"gd-GB\",\"gd\"]"}
{"level":30,"time":"2024-09-27T09:24:02.237Z","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-27T09:24:02.237Z","msg":"spellcheck: setting languages to: [\"en\"]"}
{"level":40,"time":"2024-09-27T09:24:02.329Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-09-27T09:24:02.329Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
{"level":40,"time":"2024-09-27T09:24:02.357Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-09-27T09:24:02.358Z","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-27T09:24:02.358Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-27T09:24:02.715Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-09-27T09:24:03.145Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-09-27T09:24:03.145Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-09-27T09:24:03.145Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}
{"level":50,"time":"2024-09-27T09:27:39.363Z","msg":"onDatabaseError: Quitting application"}
{"level":30,"time":"2024-09-27T09:27:39.365Z","msg":"main window closed event"}
{"level":30,"time":"2024-09-27T09:27:39.366Z","msg":"quit event {\"hasEventBeenPrevented\":false,\"windowCount\":0,\"mainWindowExists\":false}"}
{"level":50,"time":"2024-09-27T09:27:39.366Z","msg":"maybeRequestCloseConfirmation: Response never received; continuing with close."}
{"level":50,"time":"2024-09-27T09:27:39.367Z","msg":"MainSQL close, failed: 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-27T09:27:39.368Z","msg":"Error occurred in handler for 'sql-channel:read': {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-27T09:27:55.659Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-09-27T09:27:55.660Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-09-27T09:27:55.660Z","msg":"app.ready: preferred system locales: gd-GB, gd"}
{"level":30,"time":"2024-09-27T09:27:55.660Z","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-27T09:27:55.660Z","msg":"locale: Preferred locales: gd-GB, gd"}
{"level":30,"time":"2024-09-27T09:27:55.660Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-09-27T09:27:55.662Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-09-27T09:27:55.681Z","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-27T09:27:55.681Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-09-27T09:27:55.682Z","msg":"getSQLKey: decrypting key"}
{"level":30,"time":"2024-09-27T09:27:55.682Z","msg":"getSystemTraySetting got value MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-27T09:27:55.682Z","msg":"getSystemTraySetting returning MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-27T09:27:55.683Z","msg":"app ready"}
{"level":30,"time":"2024-09-27T09:27:55.683Z","msg":"starting version 7.24.1"}
{"level":30,"time":"2024-09-27T09:27:55.683Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-09-27T09:27:55.684Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-27T09:27:55.691Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-27T09:27:55.691Z","msg":"got fast spellcheck setting false"}
{"level":30,"time":"2024-09-27T09:27:55.692Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":2554,\"height\":1529,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":false,\"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\":0}"}
{"level":30,"time":"2024-09-27T09:27:55.724Z","msg":"spellcheck: user locales: [\"gd-GB\",\"gd\"]"}
{"level":30,"time":"2024-09-27T09:27:55.725Z","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-27T09:27:55.725Z","msg":"spellcheck: setting languages to: [\"en\"]"}
{"level":40,"time":"2024-09-27T09:27:55.853Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-09-27T09:27:55.853Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
{"level":40,"time":"2024-09-27T09:27:55.880Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-09-27T09:27:55.880Z","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-27T09:27:55.880Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-27T09:27:56.122Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-09-27T09:27:56.434Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-09-27T09:27:56.434Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-09-27T09:27:56.435Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}

And today's /media/cuideigin/BeanLin/uidheam/dotfiles/.var/app/org.signal.Signal/app.log:

{"level":30,"time":"2024-09-27T03:15:25.185Z","msg":"Profile Service initialized"}
{"level":30,"time":"2024-09-27T03:15:25.309Z","msg":"libsignal net environment resolved to [Production]"}
{"level":30,"time":"2024-09-27T03:15:25.328Z","msg":"preload complete"}
{"level":30,"time":"2024-09-27T03:15:25.329Z","msg":"@signalapp/libsignal-client Initializing libsignal version:0.55.1 signal_node::logging rust/bridge/node/src/logging.rs:206"}
{"level":30,"time":"2024-09-27T03:15:25.329Z","msg":"@signalapp/libsignal-client Initializing connection manager for Prod... libsignal_bridge_types::net rust/bridge/shared/types/src/net.rs:74"}
{"level":30,"time":"2024-09-27T03:15:25.364Z","msg":"NotificationService initialized"}
{"level":50,"time":"2024-09-27T03:15:25.369Z","msg":"Top-level unhandled promise rejection: TypeError: Cannot destructure property 'getIsInCall' of 'window.Events' as it is undefined.\n    at IpcRenderer.<anonymous> ([REDACTED]/resources/app.asar/preload.bundle.js:80:24766)\n    at IpcRenderer.emit (node:events:519:28)\n    at Object.onMessage (node:electron/js2c/renderer_init:2:8944)"}
{"level":50,"time":"2024-09-27T03:45:25.365Z","msg":"Error: SQL channel call (Read, getMaxMessageCounter) task did not complete in time.\n    at createTaskWithTimeout ([REDACTED]/resources/app.asar/preload.bundle.js:75:29086)\n    at ipcInvoke ([REDACTED]/resources/app.asar/preload.bundle.js:75:655858)\n    at [REDACTED]/resources/app.asar/preload.bundle.js:75:665659\n    at Proxy.<anonymous> ([REDACTED]/resources/app.asar/preload.bundle.js:75:665867)\n    at initializeMessageCounter ([REDACTED]/resources/app.asar/preload.bundle.js:75:656645)\n    at startApp ([REDACTED]/resources/app.asar/preload.bundle.js:164:7341)"}
{"level":30,"time":"2024-09-27T09:24:02.972Z","msg":"Profile Service initialized"}
{"level":30,"time":"2024-09-27T09:24:03.091Z","msg":"libsignal net environment resolved to [Production]"}
{"level":30,"time":"2024-09-27T09:24:03.109Z","msg":"preload complete"}
{"level":30,"time":"2024-09-27T09:24:03.110Z","msg":"@signalapp/libsignal-client Initializing libsignal version:0.55.1 signal_node::logging rust/bridge/node/src/logging.rs:206"}
{"level":30,"time":"2024-09-27T09:24:03.110Z","msg":"@signalapp/libsignal-client Initializing connection manager for Prod... libsignal_bridge_types::net rust/bridge/shared/types/src/net.rs:74"}
{"level":30,"time":"2024-09-27T09:24:03.145Z","msg":"NotificationService initialized"}
{"level":50,"time":"2024-09-27T09:24:03.150Z","msg":"Top-level unhandled promise rejection: TypeError: Cannot destructure property 'getIsInCall' of 'window.Events' as it is undefined.\n    at IpcRenderer.<anonymous> ([REDACTED]/resources/app.asar/preload.bundle.js:80:24766)\n    at IpcRenderer.emit (node:events:519:28)\n    at Object.onMessage (node:electron/js2c/renderer_init:2:8944)"}
{"level":30,"time":"2024-09-27T09:27:56.317Z","msg":"Profile Service initialized"}
{"level":30,"time":"2024-09-27T09:27:56.406Z","msg":"libsignal net environment resolved to [Production]"}
{"level":30,"time":"2024-09-27T09:27:56.414Z","msg":"preload complete"}
{"level":30,"time":"2024-09-27T09:27:56.414Z","msg":"@signalapp/libsignal-client Initializing libsignal version:0.55.1 signal_node::logging rust/bridge/node/src/logging.rs:206"}
{"level":30,"time":"2024-09-27T09:27:56.414Z","msg":"@signalapp/libsignal-client Initializing connection manager for Prod... libsignal_bridge_types::net rust/bridge/shared/types/src/net.rs:74"}
{"level":30,"time":"2024-09-27T09:27:56.434Z","msg":"NotificationService initialized"}
{"level":50,"time":"2024-09-27T09:27:56.438Z","msg":"Top-level unhandled promise rejection: TypeError: Cannot destructure property 'getIsInCall' of 'window.Events' as it is undefined.\n    at IpcRenderer.<anonymous> ([REDACTED]/resources/app.asar/preload.bundle.js:80:24766)\n    at IpcRenderer.emit (node:events:519:28)\n    at Object.onMessage (node:electron/js2c/renderer_init:2:8944)"}

@Zarkorix
Copy link

Zarkorix commented Sep 27, 2024

A flatpak update for Signal was pushed to my system today, but it's still listed as v7.24.1. Problem is not resolved, however the error message has changed:

Screenshot from 2024-09-27 13-59-12

I have not changed desktop environment at all - this is a fresh install of Fedora 40 (GNOME).

Upon launch, Signal is also first asking me:

Screenshot from 2024-09-27 14-00-21

@salim-b
Copy link

salim-b commented Sep 27, 2024

@Zarkorix Unfortunately, this is expected due to the recent merge of flathub/org.signal.Signal#741 to prevent further harm of the broken OS keystore implementation on Linux.

If you didn't proceed (i.e. aborted), you can try to continue using your encrypted profile data by setting

flatpak override org.signal.Signal --user --env=SIGNAL_PASSWORD_STORE=gnome-libsecret

(or kwallet/kwallet5/kwallet6, depending on your secret service implementation, see the documentation)

@kr428
Copy link

kr428 commented Sep 27, 2024

@Zarkorix Unfortunately, this is expected due to the recent merge of flathub/org.signal.Signal#741 to prevent further harm of the broken OS keystore implementation on Linux.

I'm on this boat too. Using the flatpak app only lacking an obvious (up-to-date, maintained, ...?) variant of Signal desktop for Fedora. Happy not to have to use flatpak or (even worse) snap for that.

@bermeitinger-b
Copy link

A flatpak update for Signal was pushed to my system today, but it's still listed as v7.24.1. Problem is not resolved, however the error message has changed:

Screenshot from 2024-09-27 13-59-12

I have not changed desktop environment at all - this is a fresh install of Fedora 40 (GNOME).

Upon launch, Signal is also first asking me:

Screenshot from 2024-09-27 14-00-21

You could update again. This was a mistake in the message dialog.

The Flathub version will now fallback to basic encryption (no encryption).

@posita
Copy link

posita commented Sep 27, 2024

I would like to propose that, due to what appears to be fairly widespread message history loss on desktop, feature requests like these deserve revisiting and possible elevation of priority.

@gunchleoc
Copy link

Thanks to @salim-b I'm now getting somewhere, but the database migration is failing:

$ /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=signal-desktop --file-forwarding --env=SIGNAL_PASSWORD_STORE=gnome-libsecret org.signal.Signal @@u %U @@
Debug: Using password store: gnome-libsecret
Debug: Will run signal with the following arguments: --password-store=gnome-libsecret
Debug: Additionally, user gave: %U
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 uidheam
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/cuideigin/.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: 10:48:53.029: Failed to load module "xapp-gtk3-module"
{"level":30,"time":"2024-09-28T09:48:53.201Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-09-28T09:48:53.201Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-09-28T09:48:53.202Z","msg":"app.ready: preferred system locales: gd-GB, gd"}
{"level":30,"time":"2024-09-28T09:48:53.202Z","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-28T09:48:53.202Z","msg":"locale: Preferred locales: gd-GB, gd"}
{"level":30,"time":"2024-09-28T09:48:53.202Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-09-28T09:48:53.203Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-09-28T09:48:53.227Z","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-28T09:48:53.228Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-09-28T09:48:53.229Z","msg":"getSQLKey: decrypting key"}
{"level":30,"time":"2024-09-28T09:48:53.230Z","msg":"getSystemTraySetting got value MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-28T09:48:53.230Z","msg":"getSystemTraySetting returning MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-09-28T09:48:53.231Z","msg":"app ready"}
{"level":30,"time":"2024-09-28T09:48:53.231Z","msg":"starting version 7.24.1"}
{"level":30,"time":"2024-09-28T09:48:53.231Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-09-28T09:48:53.233Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-28T09:48:53.238Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-09-28T09:48:53.238Z","msg":"got fast spellcheck setting false"}
{"level":30,"time":"2024-09-28T09:48:53.239Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":2554,\"height\":1529,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":false,\"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\":0}"}
{"level":30,"time":"2024-09-28T09:48:53.272Z","msg":"spellcheck: user locales: [\"gd-GB\",\"gd\"]"}
{"level":30,"time":"2024-09-28T09:48:53.272Z","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-28T09:48:53.272Z","msg":"spellcheck: setting languages to: [\"en\"]"}
2024-09-28 10:48:53.418: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2024-09-28 10:48:53.418: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2024-09-28 10:48:53.418: ERROR CORE sqlcipher_codec_ctx_set_error 1
{"level":40,"time":"2024-09-28T09:48:53.419Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-09-28T09:48:53.419Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
2024-09-28 10:48:53.447: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2024-09-28 10:48:53.447: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2024-09-28 10:48:53.447: ERROR CORE sqlcipher_codec_ctx_set_error 1
{"level":40,"time":"2024-09-28T09:48:53.447Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-09-28T09:48:53.447Z","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-28T09:48:53.448Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-09-28T09:48:53.679Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-09-28T09:48:54.027Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-09-28T09:48:54.027Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-09-28T09:48:54.027Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}

@wtogami
Copy link

wtogami commented Sep 28, 2024

Screenshot from 2024-09-28 20-54-07

Database startup error:

SafeStorageBackendChangeError: Detected change in safeStorage backend, can't decrypt DB key (previous: gnome_libsecret, current: basic_text)
    at getSQLKey ([REDACTED]/app/main.js:1256:11)
    at initializeSQL ([REDACTED]/app/main.js:1317:11)
    at App.<anonymous> ([REDACTED]/app/main.js:1538:20)

App Version: 7.24.1
OS: linux

Today I'm suddenly experiencing this on Fedora 40 GNOME with flatpak signal. I'm not aware of having changed anything.

@bermeitinger-b
Copy link

For user-installed flatpak: flatpak override --env=SIGNAL_PASSWORD_STORE=gnome-libsecret --user org.signal.Signal

@wtogami
Copy link

wtogami commented Sep 28, 2024

When I set SIGNAL_PASSWORD_STORE=gnome-libsecret the error message changed.

image

Database startup error:

Error: Error while decrypting the ciphertext provided to safeStorage.decryptString.
    at getSQLKey ([REDACTED]/app/main.js:1268:39)
    at initializeSQL ([REDACTED]/app/main.js:1317:11)
    at App.<anonymous> ([REDACTED]/app/main.js:1538:20)

App Version: 7.24.1
OS: linux

@salim-b
Copy link

salim-b commented Sep 28, 2024

@wtogami You likely suffer from the same bug many others have when the Signal Flatpak first started to expose the OS keystore to Signal. There are serious bugs in the keystore implementation of Electron and/or Signal under Linux. Hence the default of the Signal Flatpak was reverted to storing the key in plain-text (basic).

If you don't mind losing your data/message history on Signal Desktop, I recommend:

  1. Unset the SIGNAL_PASSWORD_STORE env var:

    flatpak override org.signal.Signal --user --unset-env=SIGNAL_PASSWORD_STORE
  2. Stop Signal.

  3. Delete your Signal profile/config folder:

    rm -r "$HOME/.var/app/org.signal.Signal"
  4. Start Signal.

@wtogami
Copy link

wtogami commented Sep 28, 2024

Is there really no way to restore my history? I don't want to lose years of chat.

@salim-b
Copy link

salim-b commented Sep 28, 2024

Is there really no way to restore my history? I don't want to lose years of chat.

See this comment. You will need to have a backup of your plain-text key to restore your history, though.

@wtogami
Copy link

wtogami commented Sep 28, 2024

See this comment. You will need to have a backup of your plain-text key to restore your history, though.

Because it encrypted the history with a key that was subsequently lost?

@salim-b
Copy link

salim-b commented Sep 28, 2024

Because it encrypted the history with a key that was subsequently lost?

Exactly, see my comment.

@w4krzw9N8aIvT8cdEFd
Copy link

w4krzw9N8aIvT8cdEFd commented Sep 29, 2024

If anybody is on NixOS unstable with home manager, I was able to resolve the error by merely:

  1. commenting out Signal pkg
  2. rebuild switch
  3. uncommenting
  4. rebuild switch
  5. I also disconnected my device (with the error) and was able to reattach without issue

my chats were untouched

@JulioQc
Copy link

JulioQc commented Sep 29, 2024

None of the proposed solutions here worked on PopOS 22.04 (6.9.3 kernel); each restart of signal reports a corrupted DB.
Switched to their official apt repos and everything working fine now.

How are flatpaks still a thing these days I wonder lol

@wiryonolau
Copy link

so this problem has nothing to do with snap version, I've been using and stay in 7.15.0 but as of today it show the version is expired and cannot send any message

@salim-b
Copy link

salim-b commented Oct 1, 2024

Moving from snap to flatpack worked for you - do you have any idea why? Perhaps it has something to do with how each of those systems mediates access to privileged storage locations used by Electron's safeStorage API?

@scottnonnenberg-signal As you probably noticed, this issue surfaced in the Flatpak version of Signal as well as soon as it started to grant permission to use the OS keystore. Meanwhile we've learned that the underlying problem is Chromium (bundled by Electron) using the libsecret API in a Flatpak/Snap-incompatible way. I've tried to file a bug report for this over at the Chromium bug tracker. Maybe you'd like to have a look and add from your perspective if necessary?

@digital-codes
Copy link

@scottnonnenberg-signal As you probably noticed, this issue surfaced in the Flatpak version of Signal as well as soon as it started to grant permission to use the OS keystore. Meanwhile we've learned that the underlying problem is Chromium (bundled by Electron) using the libsecret API in a Flatpak/Snap-incompatible way. I've tried to file a bug report for this over at the Chromium bug tracker. Maybe you'd like to have a look and add from your perspective if necessary?

... Would explain why signal runs when compiled locally. Tried yesterday with 7.26.0 on Fedora 39. Seems to work ...

@corsac-s
Copy link

corsac-s commented Oct 1, 2024

For people experiencing the issue under Firejail, adding dbus-user.talk org.freedesktop.secrets to /etc/firejail/signal-desktop.profile seems to help.

@corsac-s
Copy link

corsac-s commented Oct 1, 2024

Also see netblue30/firejail#6498 for the relevant profile

@ShyneTurtle
Copy link

Switching to --password-store=basic prevents me from launching signal, telling me that the auth method changed and i need to launch signal using the old password store (gnome-libsecret) but that means i still have the login issue.

@salim-b
Copy link

salim-b commented Oct 2, 2024

Switching to --password-store=basic prevents me from launching signal, telling me that the auth method changed

You need to delete Signal's data manually in order to be able to switch the auth method, either via flatpak uninstall --delete-data org.signal.Signal or via rm -r ~/.var/app/org.signal.Signal (supposed you're using the default user-config path).

launch signal using the old password store (gnome-libsecret) but that means i still have the login issue.

flathub/org.signal.Signal#756 will fix the issue with gnome-libsecret (at least for me and others). You could give it a try and report back in that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests