standardnotes / forum

Support from other community members. For 1-on-1 help, please contact help@standardnotes.com.
https://forum.standardnotes.org
198 stars 8 forks source link

Snap does not launch on Ubuntu 24.04 #3691

Open jspaetzel opened 3 months ago

jspaetzel commented 3 months ago

Describe the bug Snap installs but fails to launch in 24.04 w/ base install

To Reproduce Steps to reproduce the behavior:

  1. Install ubuntu 24.04
  2. Install standard-notes snap
  3. Run standard-notes

Expected behavior App should launch

Desktop (please complete the following information):

Additional context

$ standard-notes 
/snap/standard-notes/1054/app/standard-notes: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory

Some additional checks

$ ldd /snap/standard-notes/1054/app/standard-notes
    linux-vdso.so.1 (0x00007fff231fe000)
    libffmpeg.so => /snap/standard-notes/1054/app/libffmpeg.so (0x0000783406406000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007834063ee000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007834063e9000)
    libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x0000783406386000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x000078340623d000)
    libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x000078340606b000)
    libnss3.so => /lib/x86_64-linux-gnu/libnss3.so (0x0000783405f3c000)
    libnssutil3.so => /lib/x86_64-linux-gnu/libnssutil3.so (0x0000783405f0a000)
    libsmime3.so => /lib/x86_64-linux-gnu/libsmime3.so (0x0000783405ee1000)
    libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x0000783405ea2000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x0000783405e53000)
    libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x0000783405e27000)
    libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x0000783405deb000)
    libcups.so.2 => /lib/x86_64-linux-gnu/libcups.so.2 (0x0000783405d4a000)
    libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x0000783405d33000)
...
$ ll /lib/x86_64-linux-gnu/ | grep libatk
lrwxrwxrwx   1 root root        15 Apr  8 07:37 libatk-1.0.so -> libatk-1.0.so.0
lrwxrwxrwx   1 root root        23 Apr  8 07:37 libatk-1.0.so.0 -> libatk-1.0.so.0.25209.1
-rw-r--r--   1 root root    170064 Apr  8 07:37 libatk-1.0.so.0.25209.1
...
jspaetzel commented 3 months ago

I was able to fix this manually by running

sudo snap install gnome-3-38-2004
sudo snap remove standard-notes
sudo snap install standard-notes

and now the app launches, but im not able to login, the app crashes when I start interacting with it to login

bunch of errors, here's the last couple

...
MESA-LOADER: failed to open iris (search paths /snap/standard-notes/1054/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: iris
MESA-LOADER: failed to open kms_swrast (search paths /snap/standard-notes/1054/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /snap/standard-notes/1054/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver
[53088:0714/110554.106297:ERROR:command_buffer_proxy_impl.cc(132)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
jspaetzel commented 3 months ago

OK I found a workaround for now. Would be nice to be able to use the snap though.

Installed the deb package instead. https://github.com/standardnotes/app/releases/tag/%40standardnotes%2Fdesktop%403.195.0

Then created /etc/apparmor.d/standard-notes

# This profile adds the "userns" flags to the otherwise "unrestricted" flags, this is needed, since electron uses user namespaces (userns) to run a sandbox, and this app uses electron

abi <abi/4.0>,
include <tunables/global>

profile standard-notes "/opt/Standard Notes/standard-notes" flags=(unconfined) {
  userns,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/standard-notes>
}

and then reloaded apparmor systemctl restart apparmor.service