netblue30 / firejail

Linux namespaces and seccomp-bpf sandbox
https://firejail.wordpress.com
GNU General Public License v2.0
5.83k stars 568 forks source link

element-desktop: Unable to find Electron app at /usr/share/element/app #6421

Closed leukimi closed 3 months ago

leukimi commented 4 months ago

Description

element-desktop.profile on openSUSE Tumbleweed fails to start /usr/bin/element-desktop. Electron is located at /usr/bin/electron.

Steps to Reproduce

  1. Install element-desktop from software.opensuse.org
  2. Run in bash LC_ALL=C firejail /usr/bin/element-desktop

Expected behavior

Application window should open.

Actual behavior

Process exits without opening main window.

Behavior without a profile

Output of LC_ALL=C firejail --noprofile /usr/bin/element-desktop

``` Parent pid 15379, child pid 15380 Warning: cannot find /var/run/utmp Child process initialized in 12.43 ms /home/user/.config/Element exists: yes /home/user/.config/Riot exists: no No update_base_url is defined: auto update is disabled Fetching translation json for locale: en_EN Changing application language to en Fetching translation json for locale: en Resetting the UI components after locale change Resetting the UI components after locale change Changing application language to en Fetching translation json for locale: en Resetting the UI components after locale change [2:0727/185125.147277:ERROR:nss_util.cc(357)] After loading Root Certs, loaded==false: NSS error code: -8018 ```

Environment

Checklist

Log

Output of LC_ALL=C firejail /usr/bin/element-desktop

``` Reading profile /etc/firejail/element-desktop.profile Reading profile /etc/firejail/riot-desktop.profile Reading profile /etc/firejail/riot-web.profile Reading profile /etc/firejail/electron.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-exec.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-xdg.inc Reading profile /etc/firejail/whitelist-common.inc Reading profile /etc/firejail/whitelist-runuser-common.inc Reading profile /etc/firejail/whitelist-usr-share-common.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 9532, child pid 9536 Warning: cannot find /var/run/utmp Warning: skipping Element for private /opt Private /opt installed in 0.10 ms Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Warning: NVIDIA card detected, nogroups command ignored Warning: NVIDIA card detected, nogroups command ignored Warning: NVIDIA card detected, nogroups command ignored Child process initialized in 193.24 ms [4:0727/183420.166497:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/firejail/mnt/dbus/system: Permission denied Error launching app Unable to find Electron app at /usr/share/element/app Cannot find module '/usr/share/element/app' Parent is shutting down, bye... ```

Output of LC_ALL=C firejail --debug /usr/bin/element-desktop

[debug_log (link to log)](https://gist.github.com/leukimi/ebd60b4dba8c99000a7efddccdb7a66a)

kmk3 commented 4 months ago
Error launching app
Unable to find Electron app at /usr/share/element/app

Cannot find module '/usr/share/element/app'

Does it work with the following in ~/.config/firejail/element-desktop.local?

whitelist /usr/share/element
leukimi commented 3 months ago

Yes! It worked to do:

echo "whitelist /usr/share/element" > $HOME/.config/firejail/element-desktop.local

The main window now opens as it should.