desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: 6.0.0 fails to show window on Ubuntu 24.04 when Wayland is enabled on a VM (or other system without a GPU)

Open jnsgruk opened this issue 2 months ago • 9 comments

Checks before filing an issue

  • [x] This issue doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
  • [x] I have checked the issue tracker and have not found an issue that matches the one I'm filing. This should include closed issues.
  • [x] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
  • [x] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.com/suggestions/.
  • [x] This issue reproduces on the most recent stable version, or the most recent prerelease version of the Mattermost Desktop App.
  • [x] I have read the contribution guidelines.

Mattermost Desktop Version

6.0.0

Operating System

Ubuntu 24.04 LTS

Mattermost Server Version

No response

Steps to reproduce

  • Install 6.0.0 release using the deb
  • Try to launch mattermost

Expected behavior

Mattermost window should appear

Observed behavior

App appears to start, and tray icon is visible, but no window appears

Log Output

ubuntu@noble-desktop-vm:~$ mattermost-desktop
11:00:47.167 › Logger Log level set to: { level: 'info' }
[macos-notification-state] failed to load 'notificationstate' addon Error: Module did not self-register: '/opt/Mattermost/resources/app.asar.unpacked/node_modules/macos-notification-state/build/Release/notificationstate.node'.
    at process.func [as dlopen] (node:electron/js2c/node_init:2:2617)
    at Module._extensions..node (node:internal/modules/cjs/loader:1874:18)
    at Object.func [as .node] (node:electron/js2c/node_init:2:2844)
    at Module.load (node:internal/modules/cjs/loader:1448:32)
    at Module._load (node:internal/modules/cjs/loader:1270:12)
    at c._load (node:electron/js2c/node_init:2:17993)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
    at Module.require (node:internal/modules/cjs/loader:1470:12)
    at require (node:internal/modules/helpers:147:16) {
  code: 'ERR_DLOPEN_FAILED'
}
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
11:00:47.229 › [App.Initialize] Current working directory is /home/ubuntu, changing into /opt/Mattermost
11:00:47.271 › [App.Config] config.autostart has been configured: { autostart: true }
11:00:47.298 › [SecureStorage] Secure storage initialized - encryption available
11:00:47.306 › [SecureStorage] Initialized secure storage cache
11:00:47.325 › [ServerDropdownView] init
11:00:47.334 › [App.Initialize] Autoupgrade disabled: false
[23266:1114/110047.337820:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization
11:00:47.346 › [i18nManager] Failed to set new language { locale: 'en-US' }
11:00:47.346 › [i18nManager] Failed to set new language { locale: 'US' }
[23358:1114/110047.444602:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization
11:00:47.560 › [ModalView] [welcomeScreen] preloading with /opt/Mattermost/resources/app.asar/internalAPI.js
11:00:47.643 › [WebContentsEventM...] [renderer] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'sidebarBg')
11:00:53.065 › [BaseWindow] window closed

Additional Information

Seems to work fine on Ubuntu 25.10

jnsgruk avatar Nov 14 '25 11:11 jnsgruk

I think it's related to this: [23266:1114/110047.337820:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization

I had this on my local Ubuntu test instance but I was under the impression that it was just my machine, since other Linux boxes works. Will investigate further, likely an Electron issue.

Created a ticket: https://mattermost.atlassian.net/browse/MM-66656

devinbinnie avatar Nov 14 '25 14:11 devinbinnie

Hey! I'm not sure that's actually the issue - since I see that log line on versions that do work, too - it's probably worth investigating but I don't think it's the actual root cause here.

The main difference between this an other (working revisions) is:

11:00:47.643 › [WebContentsEventM...] [renderer] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'sidebarBg')

But I'm certainly not expert enough in the codebase to know if that's the root cause here.

jnsgruk avatar Nov 14 '25 14:11 jnsgruk

@jnsgruk It's an Electron issue: https://github.com/electron/electron/issues/48321

It appears to affects users of VMs (like myself) running without a real GPU. The current workaround is to disable GPU acceleration, which normally you can do through the application, but since it won't boot, you will need to edit the config.json file manually.

Here's a quick command to do this: sed -i 's/"enableHardwareAcceleration": true/"enableHardwareAcceleration": false/' ~/.config/Mattermost/config.json

I'll keep an eye on the above issue and patch Electron as soon as I see that it is fixed.

EDIT: FWIW - the build app from the .deb actually runs fine for me on my VM with GPU acceleration turned on

devinbinnie avatar Nov 14 '25 15:11 devinbinnie

Ah thanks for the heads up. Just for your info, I've patched the snap package to try and detect situations where hw acceleration is not available, and preemptively update the config to disable it and give the app the best chance of launching.

I'll remove once this issue is resolved :-)

https://github.com/snapcrafters/mattermost-desktop/commit/f4fc4ec748b0a080781efc9b67497811d54c1cf3

jnsgruk avatar Nov 14 '25 17:11 jnsgruk

Hello there

I have a similar problem after upgrading to 6.0.0 via snap :


#LANG=C mattermost-desktop 

14:24:44.655 › Logger Log level set to: { level: 'info' }
[macos-notification-state] failed to load 'notificationstate' addon Error: Module did not self-register: '/snap/mattermost-desktop/814/opt/Mattermost/resources/app.asar.unpacked/node_modules/macos-notification-state/build/Release/notificationstate.node'.
    at process.func [as dlopen] (node:electron/js2c/node_init:2:2617)
    at Module._extensions..node (node:internal/modules/cjs/loader:1874:18)
    at Object.func [as .node] (node:electron/js2c/node_init:2:2844)
    at Module.load (node:internal/modules/cjs/loader:1448:32)
    at Module._load (node:internal/modules/cjs/loader:1270:12)
    at c._load (node:electron/js2c/node_init:2:17993)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
    at Module.require (node:internal/modules/cjs/loader:1470:12)
    at require (node:internal/modules/helpers:147:16) {
  code: 'ERR_DLOPEN_FAILED'
}
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
14:24:44.755 › [App.Initialize] Current working directory is /home/user/.config/Mattermost, changing into /snap/mattermost-desktop/814/opt/Mattermost
Error org.freedesktop.DBus.Error.Failed: cannot set "default-url-scheme-handler" subproperty "mattermost" setting to invalid value "Mattermost.Desktop"
Gtk-Message: 14:24:44.791: Failed to load module "appmenu-gtk-module"
Gtk-Message: 14:24:44.792: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(mattermost-desktop:101209): Gtk-WARNING **: 14:24:44.841: Theme parsing error: gtk.css:1:21: Failed to import: Error opening file /home/user/snap/mattermost-desktop/814/.config/gtk-3.0/colors.css: No such file or directory
Gtk-Message: 14:24:44.877: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:24:44.877: Failed to load module "window-decorations-gtk-module"
[101209:1118/142444.926613:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101349: Permission denied (13)
14:24:44.927 › [App.Config] config.autostart has been configured: { autostart: true }
[101209:1118/142444.944633:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.Secret.Service.ReadAlias: object_path= /org/freedesktop/secrets: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.452" (uid=1000 pid=101209 comm="/snap/mattermost-desktop/814/opt/Mattermost/matter" label="snap.mattermost-desktop.mattermost-desktop (enforce)") interface="org.freedesktop.Secret.Service" member="ReadAlias" error name="(unset)" requested_reply="0" destination="org.freedesktop.secrets" (uid=1000 pid=3271 comm="/usr/bin/gnome-keyring-daemon --foreground --compo" label="unconfined")
14:24:44.953 › [SecureStorage] Secure storage is not available on this system. Secrets will be stored in plain text. Consider installing keyring services for better security.
14:24:44.954 › [SecureStorage] Secure storage initialized - encryption unavailable
[101209:1118/142444.960968:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.login1.Manager.Inhibit: object_path= /org/freedesktop/login1: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.724" (uid=1000 pid=101209 comm="/snap/mattermost-desktop/814/opt/Mattermost/matter" label="snap.mattermost-desktop.mattermost-desktop (enforce)") interface="org.freedesktop.login1.Manager" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=1902 comm="/usr/lib/systemd/systemd-logind" label="unconfined")
14:24:44.961 › [SecureStorage] Initialized secure storage cache
[101209:1118/142444.998894:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101406: Permission denied (13)
[101209:1118/142445.001708:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101410: Permission denied (13)
14:24:45.003 › [ServerDropdownView] init
[101209:1118/142445.003637:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101419: Permission denied (13)
[101209:1118/142445.007106:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101427: Permission denied (13)
[101209:1118/142445.013145:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101442: Permission denied (13)
[101209:1118/142445.016789:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101452: Permission denied (13)
[101209:1118/142445.024072:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 101465: Permission denied (13)
14:24:45.033 › [App.Initialize] Autoupgrade disabled: false
14:24:45.069 › [i18nManager] Set new language { locale: 'fr' }
14:24:45.270 › [WebContentsEventM...] [5ebc6bbe-9886-4da...] [0f796023-e33e-4b6...] [renderer] Error with Permissions-Policy header: Parse of permissions policy failed because of errors reported by structured header parser.

I'm unable to display the main window. taskbar icon is working fine. I've disabled enableHardwareAcceleration in .config file

Regards Cédric

Rico29 avatar Nov 18 '25 13:11 Rico29

Hello Problem still present with 6.0.1 updated this morning

Rico29 avatar Nov 24 '25 08:11 Rico29

problem is the same when 6.0.1 is installed via snap or via .deb from https://github.com/mattermost/desktop/releases

Rico29 avatar Nov 24 '25 09:11 Rico29

For me, this bug only gets relevant when using the tray icon. When I select minimized start, I cannot open the main window at all. When I start MM normally, I cannot re-open after minimizing to tray. Maybe that detail helps somehow?

milux avatar Nov 24 '25 09:11 milux

Oh boy... they assume a GNOME issue for Electron >= v. 38, even with HW acceleration disabled: https://github.com/electron/electron/issues/48321#issuecomment-3487848963

milux avatar Nov 24 '25 16:11 milux