foliate icon indicating copy to clipboard operation
foliate copied to clipboard

Pages not displayed on Ubuntu 22.04 with version 3.1.0

Open lissom opened this issue 11 months ago • 35 comments

Describe the bug Pages not displayed on Ubuntu 22.04 with version 3.1.0. The Index panel is working properly.

It was was working in Feb, there was an update to 3.1.0 on 2024-02-03.

Strangely only one book has reversed the index panel (the bits to click on are on the right, not the left, these are all books in English).

sudo snap list foliate --all Name Version Rev Tracking Publisher Notes foliate 3.1.0 1775 latest/stable johnfactotum -

There is no version to downgrade to.

To Reproduce Steps to reproduce the behavior:

  1. Open any epub with Foliate.

Expected behavior Pages are displayed.

Version:

  • Foliate version: 3.9.0
  • OS/Distribution and version: Ubuntu 22.04
  • Desktop environment: 42.9
  • Installation method: snap

Additional context It would be great if there were more versions available so downgrades are possible to immediately fix the issue.

lissom avatar Mar 10 '24 14:03 lissom

@lissom Can you kindly share the book that you're facing issue with? I'll try to look into it.

soumyaDghosh avatar Mar 18 '24 14:03 soumyaDghosh

"Advanced Futures Trading Strategies" by Robert Carver. You are have to own the book to access the public download page. Do you have an email or something where I could privately send you a link?

lissom avatar Mar 18 '24 15:03 lissom

Yes, this is my mail [email protected]

soumyaDghosh avatar Mar 18 '24 15:03 soumyaDghosh

OK, you should have an email with a link.

lissom avatar Mar 18 '24 15:03 lissom

Hi, @lissom I am able to see the pages

Screenshot from 2024-03-18 20-56-09

(Let me know, if I should delete this screenshot)

What you can do is, run the app from terminal via snap run foliate and open the epub file. Then check if you're getting any error. Please share if there is any.

soumyaDghosh avatar Mar 18 '24 15:03 soumyaDghosh

OK, thanks. Here is the output from snap run foliate and clicking on the book:

snap run foliate

(com.github.johnfactotum.Foliate:34458): Gtk-WARNING **: 13:01:13.060: No IM module matching GTK_IM_MODULE=ibus found

** (com.github.johnfactotum.Foliate:34458): WARNING **: 13:01:39.960: 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:34458): WARNING **: 13:01:39.960: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

(process:34723): GLib-GIO-WARNING **: 13:01:40.003: GDBus.Error:org.freedesktop.portal.Error.NotAllowed: This call is not available inside the sandbox KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 900x750: Permission denied KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 900x750: Permission denied KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 900x750: Permission denied Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

** (process:34738): WARNING **: 13:01:40.086: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

** (process:34738): WARNING **: 13:01:40.086: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

** (process:34738): WARNING **: 13:01:40.087: 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.54" (uid=1000 pid=34738 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=18052 comm="/usr/libexec/at-spi2-registryd --use-gnome-session" label="unconfined")

lissom avatar Mar 18 '24 17:03 lissom

Just installed Foliate with snap on PopOS running into the same issue. Blank pages but the index page works. Here's the logs from snap run foliate

(com.github.johnfactotum.Foliate:58894): Gtk-WARNING **: 18:21:26.215: No IM module matching GTK_IM_MODULE=ibus found

(com.github.johnfactotum.Foliate:58894): com.github.johnfactotum.Foliate-WARNING **: 18:21:28.875: Error: Requiring Tracker, version none: Typelib file for namespace 'Tracker' (any version) not found
getURIFromTracker@resource:///com/github/johnfactotum/Foliate/library.js:83:24
get@resource:///com/github/johnfactotum/Foliate/library.js:121:42
getBookFromIdentifier@resource:///com/github/johnfactotum/Foliate/library.js:169:36
getBook@resource:///com/github/johnfactotum/Foliate/library.js:166:21
activate@resource:///com/github/johnfactotum/Foliate/library.js:860:63
activate@resource:///com/github/johnfactotum/Foliate/library.js:386:18
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34


** (com.github.johnfactotum.Foliate:58894): WARNING **: 18:21:28.896: 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:58894): WARNING **: 18:21:28.896: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

(process:59040): GLib-GIO-WARNING **: 18:21:29.004: GDBus.Error:org.freedesktop.portal.Error.NotAllowed: This call is not available inside the sandbox
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 1348x1424: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 1348x1424: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 1348x1424: Permission denied
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

** (process:59053): WARNING **: 18:21:29.157: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

** (process:59053): WARNING **: 18:21:29.157: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

awalvie avatar Mar 18 '24 17:03 awalvie

(process:34723): GLib-GIO-WARNING **: 13:01:40.003: GDBus.Error:org.freedesktop.portal.Error.NotAllowed: This call is not available inside the sandbox

@lissom @awalvie Both you probably doesn't have portals installed on your machine. Try with this, may be it get fixed

sudo apt install xdg-desktop-portal-gnome xdg-desktop-portal-gtk

soumyaDghosh avatar Mar 18 '24 17:03 soumyaDghosh

They are already installed: xdg-desktop-portal-gtk is already the newest version (1.14.0-1build1). xdg-desktop-portal-gnome is already the newest version (42.1-0ubuntu1).

lissom avatar Mar 18 '24 18:03 lissom

It works with flatpak surprisingly?

awalvie avatar Mar 18 '24 21:03 awalvie

flatpak worked for me too

On Mon, Mar 18, 2024 at 5:38 PM Vishesh @.***> wrote:

It works with flatpak surprisingly?

— Reply to this email directly, view it on GitHub https://github.com/johnfactotum/foliate/issues/1271#issuecomment-2005069691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3OFWFGFAZXV3WAGGMXGXLYY5NEXAVCNFSM6AAAAABEPAUR26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBVGA3DSNRZGE . You are receiving this because you were mentioned.Message ID: @.***>

lissom avatar Mar 19 '24 00:03 lissom

Possibly a duplicate of #1107

johnfactotum avatar Mar 19 '24 23:03 johnfactotum

I cannot reproduce this even on kde-neon which is based on 22.04. So, the only thing that I can think of is that the books are opened from a removable device. Can you guys try by clicking on the hamburger menu and then click the Open button and then selecting the book?

image

Are you guys getting this type of page?

soumyaDghosh avatar Mar 20 '24 05:03 soumyaDghosh

The hamburger didn't help.

I checked out issue 1107, and that does seem to be the cause. I'm sure it was working in early Feb with an nivida card, so this is newer for me than Nov for me. The following command does work: WEBKIT_DISABLE_DMABUF_RENDERER=1 foliate However, getting a single application in Gnome to change its settings has a whole lot of bad options. I think I'm going to stick to flatpak for the time being (if you fix the snap, I'd go back to snap, but 6 of one, half dozen of the other).

I really appreciate your help with this! Thank you!

On Wed, Mar 20, 2024 at 1:20 AM সৌম্যদীপ ঘোষ @.***> wrote:

I cannot reproduce this even on kde-neon which is based on 22.04. So, the only thing that I can think of is that the books are opened from a removable device. Can you guys try by clicking on the hamburger menu and then click the Open button and then selecting the book?

image.png (view on web) https://github.com/johnfactotum/foliate/assets/72045785/82df5580-89e3-4d42-86cd-02b36f51e548

Are you guys getting this type of page?

— Reply to this email directly, view it on GitHub https://github.com/johnfactotum/foliate/issues/1271#issuecomment-2008675879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3OFWDTDFY4YRA7E3SVVKDYZEMBHAVCNFSM6AAAAABEPAUR26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGY3TKOBXHE . You are receiving this because you were mentioned.Message ID: @.***>

lissom avatar Mar 20 '24 16:03 lissom

BTW, as long as we're talking:

  • If you had page numbers so it would track to the book's when I talk to people about the book, that would rock (they don't need to be correct, I can subtract 5 or w/e for when the book starts)
  • Foliate is the best viewer by a mile, I've tried like 10. I use it in double page mode, it rocks!!!!

On Wed, Mar 20, 2024 at 12:37 PM Charlie Page @.***> wrote:

The hamburger didn't help.

I checked out issue 1107, and that does seem to be the cause. I'm sure it was working in early Feb with an nivida card, so this is newer for me than Nov for me. The following command does work: WEBKIT_DISABLE_DMABUF_RENDERER=1 foliate However, getting a single application in Gnome to change its settings has a whole lot of bad options. I think I'm going to stick to flatpak for the time being (if you fix the snap, I'd go back to snap, but 6 of one, half dozen of the other).

I really appreciate your help with this! Thank you!

On Wed, Mar 20, 2024 at 1:20 AM সৌম্যদীপ ঘোষ @.***> wrote:

I cannot reproduce this even on kde-neon which is based on 22.04. So, the only thing that I can think of is that the books are opened from a removable device. Can you guys try by clicking on the hamburger menu and then click the Open button and then selecting the book?

image.png (view on web) https://github.com/johnfactotum/foliate/assets/72045785/82df5580-89e3-4d42-86cd-02b36f51e548

Are you guys getting this type of page?

— Reply to this email directly, view it on GitHub https://github.com/johnfactotum/foliate/issues/1271#issuecomment-2008675879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3OFWDTDFY4YRA7E3SVVKDYZEMBHAVCNFSM6AAAAABEPAUR26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGY3TKOBXHE . You are receiving this because you were mentioned.Message ID: @.***>

lissom avatar Mar 20 '24 16:03 lissom

I'm on Pop!_OS 22.04 with Foliate 3.1.0 installed via Flatpak. I too can't see the pages, only the TOC. Here's the Terminal output:


(com.github.johnfactotum.Foliate:2): Gtk-CRITICAL **: 23:57:15.776: gtk_widget_measure: assertion 'for_size >= -1' failed

(com.github.johnfactotum.Foliate:2): Gtk-CRITICAL **: 23:57:15.777: gtk_widget_measure: assertion 'for_size >= -1' failed

(com.github.johnfactotum.Foliate:2): Gtk-WARNING **: 23:57:15.777: gtk_widget_size_allocate(): attempt to allocate FoliateBookItem box 0x5de7ffb74150 with width -30 and height -18

(com.github.johnfactotum.Foliate:2): com.github.johnfactotum.Foliate-WARNING **: 23:57:20.292: Gio.IOErrorEnum: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code1: Service 'dbus:org.freedesktop.Tracker3.Miner.Files' not found in Tracker policy
getURIFromTracker@resource:///com/github/johnfactotum/Foliate/library.js:83:60
get@resource:///com/github/johnfactotum/Foliate/library.js:121:42
getBookFromIdentifier@resource:///com/github/johnfactotum/Foliate/library.js:169:36
getBook@resource:///com/github/johnfactotum/Foliate/library.js:166:21
activate@resource:///com/github/johnfactotum/Foliate/library.js:860:63
activate@resource:///com/github/johnfactotum/Foliate/library.js:386:18
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
  
Failed to create /home/yitz/.var/app/com.github.johnfactotum.Foliate/cache for shader cache (No such file or directory)---disabling.
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 900x750: Permission denied```

Lestibournes avatar Mar 21 '24 22:03 Lestibournes

I tried the snap version as well, and it too didn't work.

Then I tried switching from NVIDIA graphics to hybrid graphics, and both work. So it seems this bug is related to using the NVIDIA GPU.

Lestibournes avatar Mar 21 '24 22:03 Lestibournes

I see same issue on the ubuntu 24.04:

$ apt-cache policy foliate
foliate:
  Installed: 4.~really3.1.0-0.1
  Candidate: 4.~really3.1.0-0.1
  Version table:
 *** 4.~really3.1.0-0.1 500
        500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status
     3.1.0-1~ubuntu24.04.1 500
        500 https://ppa.launchpadcontent.net/apandada1/foliate/ubuntu noble/main amd64 Packages
$ uname -a
Linux fury 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 00:29:05 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ foliate test.fb2.zip
bwrap: setting up uid map: Permission denied

** (com.github.johnfactotum.Foliate:939463): ERROR **: 09:08:22.015: Failed to fully launch dbus-proxy: Child process exited with code 1
Trace/breakpoint trap
$ 

I'm running this on thinkpad x13 (AMD Ryzen 7 PRO 6850U with Radeon Graphics). Please note, that issues started after kernel 6.6.20. With mainline kernel 6.6.20-060620 everything works fine.

kt97679 avatar Mar 23 '24 13:03 kt97679

I see same issue on the ubuntu 24.04:

$ apt-cache policy foliate
foliate:
  Installed: 4.~really3.1.0-0.1
  Candidate: 4.~really3.1.0-0.1
  Version table:
 *** 4.~really3.1.0-0.1 500
        500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status
     3.1.0-1~ubuntu24.04.1 500
        500 https://ppa.launchpadcontent.net/apandada1/foliate/ubuntu noble/main amd64 Packages
$ uname -a
Linux fury 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 00:29:05 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ foliate test.fb2.zip
bwrap: setting up uid map: Permission denied

** (com.github.johnfactotum.Foliate:939463): ERROR **: 09:08:22.015: Failed to fully launch dbus-proxy: Child process exited with code 1
Trace/breakpoint trap
$ 

I'm running this on thinkpad x13 (AMD Ryzen 7 PRO 6850U with Radeon Graphics). Please note, that issues started after kernel 6.6.20. With mainline kernel 6.6.20-060620 everything works fine.

Can you try foliate from the edge channel of snap store?

soumyaDghosh avatar Mar 23 '24 14:03 soumyaDghosh

I was able to resolve issue on the ubuntu 24.04 by creating file /etc/apparmor.d/foliate with the following content and restarting apparmor after that.

# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"

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

profile foliate /usr/bin/foliate flags=(unconfined) {
  userns,

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

kt97679 avatar Mar 23 '24 18:03 kt97679

Sure, but what's the point of using unconfined and having a snap? If that is the fix I'd rather use flatpak.

lissom avatar Mar 23 '24 20:03 lissom

Sure, but what's the point of using unconfined and having a snap? If that is the fix I'd rather use flatpak.

The snap is not at all unconfined. Not in Ubuntu based distros atleast.

soumyaDghosh avatar Mar 23 '24 21:03 soumyaDghosh

I was able to resolve issue on the ubuntu 24.04 by creating file /etc/apparmor.d/foliate with the following content and restarting apparmor after that.

# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"

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

profile foliate /usr/bin/foliate flags=(unconfined) {
  userns,

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

Please add that this is for the deb and not for the snap, because the issue is related to snap.

soumyaDghosh avatar Mar 23 '24 21:03 soumyaDghosh

I'm sorry, I thought it is clear that I'm using deb based on my 1st comment.

kt97679 avatar Mar 24 '24 00:03 kt97679

I'm sorry, I thought it is clear that I'm using deb based on my 1st comment.

The original creator of this issue created this against snap. That's why I said to specify that this is not snap.

soumyaDghosh avatar Mar 24 '24 04:03 soumyaDghosh

Ah, sorry about that, completely missed that part :(.

kt97679 avatar Mar 25 '24 12:03 kt97679

Related https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2060767

archisman-panigrahi avatar Apr 10 '24 05:04 archisman-panigrahi

Sure, but what's the point of using unconfined and having a snap? If that is the fix I'd rather use flatpak.

The snap is not at all unconfined. Not in Ubuntu based distros atleast.

Actually the snap is confined. It just uses a profile controlled by snapd. You can see it using ps -Z. The snap profile is snap.foliate.foliate

snapd has a new interface to support applications that need userns. Current applications will continue to work without the requirement for the interface. When the requirement for the new interface will be enforced I am unsure of.

jrjohansen avatar Apr 10 '24 08:04 jrjohansen

This has been merged in https://gitlab.com/apparmor/apparmor/-/merge_requests/1209, it should start working its way into Ubuntu later when the beta freeze is lifted.

jrjohansen avatar Apr 10 '24 08:04 jrjohansen

I guess in beta means the horse has left the barn, however, running unconfined is on many systems restricted. It also seems like a rendering problem? WEBKIT_DISABLE_DMABUF_RENDERER=1 foliate this makes it all work, and the file does load, so unconfined seems like overkill.

lissom avatar Apr 10 '24 15:04 lissom