Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages not displayed on Ubuntu 22.04 with version 3.1.0 #1271

Open
lissom opened this issue Mar 10, 2024 · 33 comments
Open

Pages not displayed on Ubuntu 22.04 with version 3.1.0 #1271

lissom opened this issue Mar 10, 2024 · 33 comments
Labels
bug Something isn't working

Comments

@lissom
Copy link

lissom commented Mar 10, 2024

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 lissom added the bug Something isn't working label Mar 10, 2024
@soumyaDghosh
Copy link
Contributor

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

@lissom
Copy link
Author

lissom commented Mar 18, 2024

"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?

@soumyaDghosh
Copy link
Contributor

Yes, this is my mail umz6u21rz@mozmail.com

@lissom
Copy link
Author

lissom commented Mar 18, 2024

OK, you should have an email with a link.

@soumyaDghosh
Copy link
Contributor

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.

@lissom
Copy link
Author

lissom commented Mar 18, 2024

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")

@awalvie
Copy link

awalvie commented Mar 18, 2024

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

@soumyaDghosh
Copy link
Contributor

soumyaDghosh commented Mar 18, 2024

(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

@lissom
Copy link
Author

lissom commented Mar 18, 2024

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).

@awalvie
Copy link

awalvie commented Mar 18, 2024

It works with flatpak surprisingly?

@lissom
Copy link
Author

lissom commented Mar 19, 2024 via email

@johnfactotum
Copy link
Owner

Possibly a duplicate of #1107

@soumyaDghosh
Copy link
Contributor

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?

@lissom
Copy link
Author

lissom commented Mar 20, 2024 via email

@lissom
Copy link
Author

lissom commented Mar 20, 2024 via email

@Lestibournes
Copy link

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
Copy link

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.

@kt97679
Copy link

kt97679 commented Mar 23, 2024

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.

@soumyaDghosh
Copy link
Contributor

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?

@kt97679
Copy link

kt97679 commented Mar 23, 2024

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>
}

@lissom
Copy link
Author

lissom commented Mar 23, 2024

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

@soumyaDghosh
Copy link
Contributor

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
Copy link
Contributor

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.

@kt97679
Copy link

kt97679 commented Mar 24, 2024

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

@soumyaDghosh
Copy link
Contributor

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.

@kt97679
Copy link

kt97679 commented Mar 25, 2024

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

@archisman-panigrahi
Copy link
Contributor

@jrjohansen
Copy link

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
Copy link

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.

@lissom
Copy link
Author

lissom commented Apr 10, 2024

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.

@archisman-panigrahi
Copy link
Contributor

it should start working its way into Ubuntu later when the beta freeze is lifted.

Will it be backported into 24.04? Otherwise, since 24.04 is LTS, a lot of users will face similar issues for several years.

@jrjohansen
Copy link

it should start working its way into Ubuntu later when the beta freeze is lifted.

Will it be backported into 24.04? Otherwise, since 24.04 is LTS, a lot of users will face similar issues for several years.

It will be in 24.04, it might even manage to land before release

@lissom
Copy link
Author

lissom commented Apr 19, 2024

3.1.1 still doesn't work with nvidia cards unless ran as:
WEBKIT_DISABLE_DMABUF_RENDERER=1 foliate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants