johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
5.93k stars 273 forks source link

Snap: Unable to open epub from file explorer or command line #1153

Closed LaurentBxl closed 8 months ago

LaurentBxl commented 8 months ago

Describe the bug

When I double click on an EPUB file in the file explorer or use the command "foliate ... .epub", it fails to open the file

Foliate is installed with snap

The error log is:

(com.github.johnfactotum.Foliate:58466): WARNING : 18:51:59.997: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

(com.github.johnfactotum.Foliate:58466): WARNING : 18:51:59.997: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

(process:58624): GLib-GIO-WARNING **: 18:52:00.075: GDBus.Error:org.freedesktop.portal.Error.NotAllowed: This call is not available inside the sandbox

(process:58632): WARNING : 18:52:00.298: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

(process:58632): WARNING : 18:52:00.298: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

(process:58632): WARNING : 18:52:00.299: Failed to get atspi registered event listeners: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.48" (uid=1000 pid=58632 comm="/usr/lib/x86_64-linux-gnu/webkitgtk-6.0/WebKitWebP" label="snap.foliate.foliate (enforce)") interface="org.a11y.atspi.Registry" member="GetRegisteredEvents" error name="(unset)" requested_reply="0" destination=":1.3" (uid=1000 pid=2268 comm="/usr/libexec/at-spi2-registryd --use-gnome-session" label="unconfined")

To Reproduce Steps to reproduce the behavior:

  1. use command line to open a file
  2. See error

Workaround Installing the snap in --devmode solves the issue

Version: