So I submitted the PR that got this into latest/edge. This was working brilliantly last week, I used it for 3 days or so for work.
Today, however, mattermost failed to start using this version. I’ve not dug into it particularly yet, there was an error about not being an available usable sandbox (or words to that effect):
❯ sudo snap refresh mattermost-desktop --channel=latest/edge
mattermost-desktop (edge) 4.7.2 from Snapcrafters refreshed
❯ mattermost-desktop --enable-logging
[3269695:0920/150234.081548:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
[1] 3269695 trace trap (core dumped) mattermost-desktop --enable-logging
I should add, trying to start the app with --no-sandbox results in errors trying to access /dev/shm:
❯ mattermost-desktop --enable-logging --no-sandbox
15:04:48.695 › Current working directory is /snap/mattermost-desktop/429/usr, changing into /snap/mattermost-desktop/429/opt/Mattermost
Error org.freedesktop.DBus.Error.Failed: cannot set "default-url-scheme-handler" subproperty "mattermost" setting to invalid value "Mattermost.Desktop"
Gtk-Message: 15:04:48.740: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:04:48.741: Failed to load module "canberra-gtk-module"
15:04:48.753 › config.autostart has been configured: false
15:04:48.754 › config.autostart has been configured: false
/usr/share/libdrm/amdgpu.ids: No such file or directory
(mattermost-desktop:3274346): dbind-WARNING **: 15:04:48.788: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-Wt2YCIYz0y: No such file or directory
15:04:48.792 › BrowserView created for server Canonical
15:04:48.793 › [Canonical] Loading https://chat.canonical.com/
15:04:48.794 › BrowserView created for server Charmhub
15:04:48.795 › [Charmhub] Loading https://chat.charmhub.io/
15:04:48.796 › couldn't show Canonical, not ready
[3274533:0920/150448.804819:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[3274581:0920/150448.809044:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.org.chromium.Chromium.cxQbfD failed: Operation not permitted (1)
[3274581:0920/150448.809122:ERROR:platform_shared_memory_region_posix.cc(253)] Unable to access(W_OK|X_OK) /dev/shm: Operation not permitted (1)
[3274581:0920/150448.809149:FATAL:platform_shared_memory_region_posix.cc(255)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.
[3274346:0920/150448.822761:INFO:CONSOLE(241)] "preloaded for the loading screen!", source: (241)
[3274585:0920/150448.822971:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.org.chromium.Chromium.OyaT6W failed: Operation not permitted (1)
[3274585:0920/150448.823034:ERROR:platform_shared_memory_region_posix.cc(253)] Unable to access(W_OK|X_OK) /dev/shm: Operation not permitted (1)
[3274585:0920/150448.823056:FATAL:platform_shared_memory_region_posix.cc(255)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.
15:04:48.868 › Main window failed to load: Error: ERR_FAILED (-2) loading 'file:///snap/mattermost-desktop/429/opt/Mattermost/resources/app.asar/renderer/index.html'
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
[3274346:0920/150448.898089:INFO:CONSOLE(249)] "Initializing preload", source: (249)
[3274589:0920/150448.898876:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.org.chromium.Chromium.tub4ch failed: Operation not permitted (1)
[3274589:0920/150448.898982:ERROR:platform_shared_memory_region_posix.cc(253)] Unable to access(W_OK|X_OK) /dev/shm: Operation not permitted (1)
[3274589:0920/150448.899019:FATAL:platform_shared_memory_region_posix.cc(255)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.
[3274591:0920/150448.900885:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.org.chromium.Chromium.9ZgYeq failed: Operation not permitted (1)
[3274591:0920/150448.900957:ERROR:platform_shared_memory_region_posix.cc(253)] Unable to access(W_OK|X_OK) /dev/shm: Operation not permitted (1)
[3274591:0920/150448.900981:FATAL:platform_shared_memory_region_posix.cc(255)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.
(node:3274346) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'webContents' of undefined
at n.reload (electron/js2c/browser_init.js:33:1980)
(Use `mattermost-desktop --trace-warnings ...` to show where the warning was created)
(node:3274346) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3274346) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[3274346:0920/150448.901160:INFO:CONSOLE(249)] "Initializing preload", source: (249)
15:04:48.996 › [Canonical] failed loading https://chat.canonical.com/: Error: ERR_FAILED (-2) loading 'https://chat.canonical.com/', retrying in 5 seconds
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
15:04:48.997 › [Charmhub] failed loading https://chat.charmhub.io/: Error: ERR_FAILED (-2) loading 'https://chat.charmhub.io/', retrying in 5 seconds
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
Hey! That PR is now mostly complete, just awaiting a final review. I think that should fix the issue, so keep an eye over the next few days for 5.1.0 landing in edge!