wayland: SQL connection sometimes broken
- [X] I have searched open and closed issues for duplicates
- [ ] I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.
(I use the official Arch Linux package. I find it much more likely that this issue is not specific to Arch, so reporting here.)
Bug Description
On native Wayland (--ozone-platform-hint=auto), the SQL connection seems to be broken unless window decorations are enabled (--enable-features=WaylandWindowDecorations). This is on GNOME which does not have server-side decorations.
Steps to Reproduce
- Run
signal-desktop --ozone-platform-hint=auto - Select "Note to Self"
- Type a message and try to send it by pressing Enter.
Actual Result:
Most of the invocations of Signal (but not all!) started with --ozone-platform-hint=auto behave as follows:
- Pressing Enter does nothing.
- (Also, sent reactions are not received (I get an error toast) and messages are not received.)
- I see this in the log whenever I try one of the actions described above:
Error occurred in handler for 'sql-channel': {}"}
Let me stress that some invocations of Signal work even with --ozone-platform-hint=auto. This seems random.
But only when add --enable-features=WaylandWindowDecorations to the command line, every invocation of Signal works. Also, when I drop --ozone-platform-hint=auto (and use XWayland), every invocation Signal always works. I haven't observed a single invocation that didn't work with either of these modifications to the command line.
Some guesswork
I'm not entirely sure if this is really related to window decorations (perhaps Signal has a hiccup when trying to display the count of unread threads in the window title bar), or if the underlying issue is some race condition, and different command line options simply lead to different timings.
I installed 6.21.0 already a few days ago, but this issue appeared only yesterday out of nowhere.
Platform Info
Signal Version:
6.21.0
Operating System:
Arch Linux
Linked Device Version:
Link to Debug Log
signal-desktop --ozone-platform-hint=auto
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /usr/lib/signal-desktop/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/tim/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
{"level":30,"time":"2023-06-19T10:44:42.188Z","msg":"app.ready: preferred system locales: en-DK, en, en-US"}
{"level":30,"time":"2023-06-19T10:44:42.188Z","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":"2023-06-19T10:44:42.189Z","msg":"locale: Preferred locales: en-DK, en, en-US"}
{"level":30,"time":"2023-06-19T10:44:42.190Z","msg":"locale: Matched locale: en"}
{"level":30,"time":"2023-06-19T10:44:42.211Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2023-06-19T10:44:42.212Z","msg":"app ready"}
{"level":30,"time":"2023-06-19T10:44:42.212Z","msg":"starting version 6.21.0"}
{"level":30,"time":"2023-06-19T10:44:42.212Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2023-06-19T10:44:42.212Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-06-19T10:44:42.214Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-06-19T10:44:42.214Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-06-19T10:44:42.215Z","msg":"getSystemTraySetting had no flags and did no DB lookups. Returning DoNotUseSystemTray"}
{"level":30,"time":"2023-06-19T10:44:42.215Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":1920,\"height\":1052,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"titleBarOverlay\":false,\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"enableBlinkFeatures\":\"CSSPseudoDir,CSSLogical\",\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"enablePreferredSizeMode\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":0,\"y\":0}"}
{"level":30,"time":"2023-06-19T10:44:42.224Z","msg":"spellcheck: user locales: [\"en-DK\",\"en\",\"en-US\"]"}
{"level":30,"time":"2023-06-19T10:44:42.224Z","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":"2023-06-19T10:44:42.224Z","msg":"spellcheck: setting languages to: [\"en\",\"en\",\"en-US\"]"}
{"level":30,"time":"2023-06-19T10:44:42.231Z","msg":"MainSQL: updateSchema:\n Current user_version: 83;\n Most recent db schema: 83;\n SQLite version: 3.39.4;\n SQLCipher version: 4.5.3 community;\n (deprecated) schema_version: 315;\n"}
{"level":30,"time":"2023-06-19T10:44:42.465Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-06-19T10:44:42.906Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-06-19T10:44:42.908Z","msg":"System tray service: created"}
{"level":30,"time":"2023-06-19T10:44:42.909Z","msg":"System tray service: updating main window. Previously, there was not a window, and now there is"}
{"level":30,"time":"2023-06-19T10:44:42.909Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-06-19T10:44:42.909Z","msg":"Begin ensuring permissions"}
{"level":30,"time":"2023-06-19T10:44:42.910Z","msg":"Ensuring file permissions for 4 files"}
{"level":30,"time":"2023-06-19T10:44:42.910Z","msg":"Finish ensuring permissions in 1ms"}
{"level":30,"time":"2023-06-19T10:44:42.925Z","msg":"main window is ready-to-show"}
{"level":30,"time":"2023-06-19T10:44:42.925Z","msg":"showing main window"}
{"level":30,"time":"2023-06-19T10:44:42.926Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-06-19T10:44:43.498Z","msg":"MainSQL: slow query getAllStories duration=365ms"}
{"level":30,"time":"2023-06-19T10:44:43.591Z","msg":"Prevent display sleep service: allowing display sleep"}
{"level":30,"time":"2023-06-19T10:44:43.592Z","msg":"Background throttling enabled because no call is active"}
{"level":30,"time":"2023-06-19T10:44:43.724Z","msg":"updater/start: Updates disabled - not starting new version checks"}
{"level":30,"time":"2023-06-19T10:44:43.725Z","msg":"System tray service: setting unread count to 6"}
{"level":30,"time":"2023-06-19T10:44:43.725Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-06-19T10:44:43.725Z","msg":"App loaded - time: 1514"}
{"level":30,"time":"2023-06-19T10:44:43.726Z","msg":"SQL init - time: 20"}
{"level":30,"time":"2023-06-19T10:44:43.726Z","msg":"Preload - time: 394"}
{"level":30,"time":"2023-06-19T10:44:43.726Z","msg":"WebSocket connect - time: 592"}
{"level":30,"time":"2023-06-19T10:44:43.726Z","msg":"Processed count: 0"}
{"level":30,"time":"2023-06-19T10:44:43.726Z","msg":"Messages per second: 0"}
{"level":50,"time":"2023-06-19T10:44:44.740Z","msg":"Error occurred in handler for 'sql-channel': {}"}
{"level":50,"time":"2023-06-19T10:44:45.656Z","msg":"Error occurred in handler for 'sql-channel': {}"}
{"level":50,"time":"2023-06-19T10:44:46.792Z","msg":"Error occurred in handler for 'sql-channel': {}"}
{"level":50,"time":"2023-06-19T10:44:54.905Z","msg":"Error occurred in handler for 'sql-channel': {}"}
{"level":30,"time":"2023-06-19T10:45:08.048Z","msg":"before-quit event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2023-06-19T10:45:08.048Z","msg":"System tray service: markShouldQuit"}
{"level":30,"time":"2023-06-19T10:45:08.049Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":true}"}
{"level":30,"time":"2023-06-19T10:45:08.050Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-06-19T10:45:08.050Z","msg":"requestShutdown: Requesting close of mainWindow..."}
{"level":30,"time":"2023-06-19T10:45:08.667Z","msg":"MainSQL: slow query close duration=602ms"}
{"level":30,"time":"2023-06-19T10:45:08.668Z","msg":"requestShutdown: Response received"}
{"level":30,"time":"2023-06-19T10:45:08.673Z","msg":"before-quit event {\"readyForShutdown\":true,\"shouldQuit\":true}"}
{"level":30,"time":"2023-06-19T10:45:08.673Z","msg":"System tray service: markShouldQuit"}
{"level":30,"time":"2023-06-19T10:45:08.673Z","msg":"close event {\"readyForShutdown\":true,\"shouldQuit\":true}"}
{"level":30,"time":"2023-06-19T10:45:08.674Z","msg":"System tray service: updating main window. Previously, there was a window, and now there is not"}
{"level":30,"time":"2023-06-19T10:45:08.674Z","msg":"System tray service: rendering no tray"}
I'm also experiencing this. I use sway, but have seen the same thing in hyprland. I came here mostly because of the non-functional enter key. In fact I have not been able to send a message using the wayland ozone platform.
Unfortunately for me using signal-desktop --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations produces no window at all. So I suspect there are several issues with wayland support.
stdout/stderr from an example where the program launched but no window is drawn (click to expand)
] > signal-desktop --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /usr/lib/signal-desktop/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/mranderson17/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
[324130:0625/163806.081901:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[324130:0625/163806.081929:ERROR:select_file_dialog_linux_portal.cc(274)] Failed to read portal version property
{"level":30,"time":"2023-06-25T22:38:06.117Z","msg":"app.ready: preferred system locales: en-US, en"}
{"level":30,"time":"2023-06-25T22:38:06.117Z","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":"2023-06-25T22:38:06.117Z","msg":"locale: Preferred locales: en-US, en"}
{"level":30,"time":"2023-06-25T22:38:06.118Z","msg":"locale: Matched locale: en"}
{"level":30,"time":"2023-06-25T22:38:06.135Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2023-06-25T22:38:06.136Z","msg":"app ready"}
{"level":30,"time":"2023-06-25T22:38:06.136Z","msg":"starting version 6.22.0"}
{"level":30,"time":"2023-06-25T22:38:06.136Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2023-06-25T22:38:06.137Z","msg":"got fast theme-setting value dark"}
{"level":30,"time":"2023-06-25T22:38:06.139Z","msg":"got fast theme-setting value dark"}
{"level":30,"time":"2023-06-25T22:38:06.139Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-06-25T22:38:06.140Z","msg":"getSystemTraySetting had no flags and did no DB lookups. Returning DoNotUseSystemTray"}
{"level":30,"time":"2023-06-25T22:38:06.140Z","msg":"Location reset needed"}
{"level":30,"time":"2023-06-25T22:38:06.140Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":1438,\"height\":892,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"titleBarOverlay\":false,\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"enableBlinkFeatures\":\"CSSPseudoDir,CSSLogical\",\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"enablePreferredSizeMode\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\"}"}
{"level":30,"time":"2023-06-25T22:38:06.147Z","msg":"spellcheck: user locales: [\"en-US\",\"en\"]"}
{"level":30,"time":"2023-06-25T22:38:06.147Z","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":"2023-06-25T22:38:06.147Z","msg":"spellcheck: setting languages to: [\"en-US\",\"en\"]"}
{"level":30,"time":"2023-06-25T22:38:06.151Z","msg":"MainSQL: updateSchema:\n Current user_version: 83;\n Most recent db schema: 83;\n SQLite version: 3.39.4;\n SQLCipher version: 4.5.3 community;\n (deprecated) schema_version: 364;\n"}
{"level":30,"time":"2023-06-25T22:38:06.348Z","msg":"got fast theme-setting value dark"}
{"level":30,"time":"2023-06-25T22:38:06.730Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-06-25T22:38:06.734Z","msg":"System tray service: created"}
{"level":30,"time":"2023-06-25T22:38:06.734Z","msg":"System tray service: updating main window. Previously, there was not a window, and now there is"}
{"level":30,"time":"2023-06-25T22:38:06.734Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-06-25T22:38:06.734Z","msg":"Begin ensuring permissions"}
{"level":30,"time":"2023-06-25T22:38:06.735Z","msg":"Ensuring file permissions for 4 files"}
{"level":30,"time":"2023-06-25T22:38:06.735Z","msg":"Finish ensuring permissions in 1ms"}
{"level":30,"time":"2023-06-25T22:38:07.193Z","msg":"MainSQL: slow query getAllStories duration=368ms"}
{"level":30,"time":"2023-06-25T22:38:07.251Z","msg":"Prevent display sleep service: allowing display sleep"}
{"level":30,"time":"2023-06-25T22:38:07.251Z","msg":"Background throttling enabled because no call is active"}
{"level":30,"time":"2023-06-25T22:38:07.347Z","msg":"updater/start: Updates disabled - not starting new version checks"}
{"level":30,"time":"2023-06-25T22:38:07.349Z","msg":"App loaded - time: 1213"}
{"level":30,"time":"2023-06-25T22:38:07.349Z","msg":"SQL init - time: 16"}
{"level":30,"time":"2023-06-25T22:38:07.349Z","msg":"Preload - time: 376"}
{"level":30,"time":"2023-06-25T22:38:07.349Z","msg":"WebSocket connect - time: 305"}
{"level":30,"time":"2023-06-25T22:38:07.349Z","msg":"Processed count: 0"}
{"level":30,"time":"2023-06-25T22:38:07.349Z","msg":"Messages per second: 0"}
^C{"level":30,"time":"2023-06-25T22:38:16.151Z","msg":"before-quit event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2023-06-25T22:38:16.151Z","msg":"System tray service: markShouldQuit"}
{"level":30,"time":"2023-06-25T22:38:16.151Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":true}"}
{"level":30,"time":"2023-06-25T22:38:16.151Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-06-25T22:38:16.151Z","msg":"requestShutdown: Requesting close of mainWindow..."}
{"level":30,"time":"2023-06-25T22:38:16.877Z","msg":"MainSQL: slow query close duration=718ms"}
{"level":30,"time":"2023-06-25T22:38:16.877Z","msg":"requestShutdown: Response received"}
{"level":30,"time":"2023-06-25T22:38:16.879Z","msg":"before-quit event {\"readyForShutdown\":true,\"shouldQuit\":true}"}
{"level":30,"time":"2023-06-25T22:38:16.879Z","msg":"System tray service: markShouldQuit"}
{"level":30,"time":"2023-06-25T22:38:16.879Z","msg":"close event {\"readyForShutdown\":true,\"shouldQuit\":true}"}
{"level":30,"time":"2023-06-25T22:38:16.880Z","msg":"System tray service: updating main window. Previously, there was a window, and now there is not"}
{"level":30,"time":"2023-06-25T22:38:16.880Z","msg":"System tray service: rendering no tray"}
Using --ozone-platform=wayland results in a crash about 80% of the time and works the other 20% however I still can't use the enter key or successfully send a message.
Yeah, I'm starting to think that the window decorations are a red herring.
Unfortunately for me using signal-desktop --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations produces no window at all. So I suspect there are several issues with wayland support.
I was having similar issues (with the window not displaying at all) under both gnome and what ever crostini (linux on ChromeOS). A surprising work around I found was to (manually) edit ephemeral config file (~/.config/Signal/ephemeral.json), changing the "maximized": false, line to be "maximized": true.
(I found this, while reading through the code that creates the main window, and noticed it had a slightly different execution flow - that had a call to mainWindow.maximize(), which I believe also triggers a show).
I am also on Arch using the signal-desktop package and using Hyprland. I created a custom .desktop file to try and get Signal to launch with Wayland every time.
I was having similar issues (with the window not displaying at all) under both gnome and what ever crostini (linux on ChromeOS). A surprising work around I found was to (manually) edit ephemeral config file (
~/.config/Signal/ephemeral.json), changing the"maximized": false,line to be"maximized": true.
Thank you for sharing this! I can confirm that adding this at least gets my Signal window to appear on every launch.
Otherwise, I can confirm that I am also seeing the same behavior with some launches encountering the same issue of being unable to react (with toast pop-up) or send messages. At least now that the window appears every time, I can just keep relaunching Signal until whatever race condition lets it begin working.
Hi. I can confirm this is still a thing with Signal 7.3.1 running under Wayfire 0.8.0 on Ubuntu Noble i.e. the main window does not display under Wayland until "maximized" is set to true in ephemeral.json.
I have also noticed that if you start Signal in a terminal window, the line "main window is ready-to-show" is missing from the log output. If you start a second instance of signal in another terminal window, the 2nd instance terminates but it somehow triggers the main window displaying in the first instance and you see the following lines appended to the log of the first instance: {"level":30,"time":"2024-05-20T12:16:12.331Z","msg":"System tray service: rendering no tray"} {"level":30,"time":"2024-05-20T12:16:12.414Z","msg":"main window is ready-to-show"} {"level":30,"time":"2024-05-20T12:16:12.415Z","msg":"showing main window"} {"level":30,"time":"2024-05-20T12:16:12.416Z","msg":"System tray service: rendering no tray"}
This is consistently reproducible for me.
My signal script starts signal-desktop with "--ozone-platform=wayland". Signal 7.3.1 was downloaded from "https://updates.signal.org/desktop/apt/pool/s/signal-desktop/".
Thanks