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

Page is blank in 3.0.0 version #1115

Closed
enricosavegnago opened this issue Nov 13, 2023 · 13 comments
Closed

Page is blank in 3.0.0 version #1115

enricosavegnago opened this issue Nov 13, 2023 · 13 comments
Labels
bug Something isn't working not our bug Needs to be fixed upstream or elsewhere

Comments

@enricosavegnago
Copy link

Describe the bug
It's unable to read any kind of .epub file in the 3.0.0 version and neither it shows the loading of the page. It's possible to open the book and view chapters and details but the text doesn't load.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Library'
  2. Click on 'Open file'
  3. See error

Screenshots
Reading page

Version:

  • Foliate version: 3.0.0
    System: Ubuntu Core 22
    Desktop: X-Cinnamon
    Session: cinnamon (x11)
    Language: en_US.UTF-8

Versions:

  • Foliate 3.0.0

  • GJS 1.76.02

  • GTK 4.12.2

  • Adwaita 1.4.0

  • GLib 2.78.0

  • WebKitGTK 2.42.0

  • Installation method: Snap package

@enricosavegnago enricosavegnago added the bug Something isn't working label Nov 13, 2023
@enricosavegnago enricosavegnago changed the title cannot read book in 3.0.0 version Cannot read book in 3.0.0 version Nov 13, 2023
@archisman-panigrahi
Copy link
Contributor

Can you try the flatpak as well? We need to know if this is a snap-only bug.

@enricosavegnago
Copy link
Author

I've just tried the flatpak version. Same situation.

@archisman-panigrahi
Copy link
Contributor

Did you open the book from the library view or did you open Foliate directly by opening the book from your file manager?

Can you reproduce the issue with other books? Try a free ebook like https://standardebooks.org/ebooks/jules-verne/an-antarctic-mystery/frances-cashel-hoey, and let us know.

@johnfactotum
Copy link
Owner

Nvidia?

@brezanac
Copy link

Same issue, Linux Mint 21.2 Cinnamon, Nvidia 535.129.03.

System: GNOME 45 (Flatpak runtime)
Desktop: X-Cinnamon
Session: cinnamon (x11)
Language: en_US.UTF-8

Versions:
- Foliate 3.0.0
- GJS 1.78.00
- GTK 4.12.3
- Adwaita 1.4.0
- GLib 2.78.1
- WebKitGTK 2.42.1

User directories:
- /home/brezanac/.var/app/com.github.johnfactotum.Foliate/data
- /home/brezanac/.var/app/com.github.johnfactotum.Foliate/cache

The application just hangs at loading the file after using the Open option.
foliate-3 0 0-hang

It looks like something is crashing WebKitGTK.

foliate-3 0 0

@johnfactotum
Copy link
Owner

If it's showing a blank page, probably the same as #1085 and #1093.

The crash looks like something different. See flatpak/flatpak#5564 and flatpak/flatpak#3712

@johnfactotum johnfactotum added the not our bug Needs to be fixed upstream or elsewhere label Nov 14, 2023
@brezanac
Copy link

brezanac commented Nov 14, 2023

While running Foliate with explicit locale did solve the loading issues, no actual book content was displayed, aside from what was in the sidebar.

flatpak run --env=LC_ALL=en_US.UTF-8 com.github.johnfactotum.Foliate

foliate-no-content

The output was showing following errors.

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 704x689: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 704x689: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 704x689: Permission denied
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

So I decided to explicitly instruct WebKitGTK inside the flatpak package to revert back to WPE/X11 renderer.

flatpak run --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 --env=LC_ALL=en_US.UTF-8 com.github.johnfactotum.Foliate

This fixed the issue and Foliate was now properly displaying all content.

foliate-content

Now, WEBKIT_DISABLE_DMABUF_RENDERER is kind of an ugly solution, soon possibly to be deprecated or even removed from WebKitGTK, but it gets the job done for now.

To make a more permanent solution without the need to run Foliate through shell, you could use Flatseal to define the necessary
environmental varaibles like this.

foliate-flatseal

Hope this helps.

@archisman-panigrahi
Copy link
Contributor

archisman-panigrahi commented Nov 14, 2023

@johnfactotum In the next minor version of Foliate, please consider adding a "Troubleshoot books not loading if you are running NVidia" link/button (which can point to the comment above) (#1115 (comment)) in the library view page, which NVidia users can follow. That can also stop many duplicate of bug reports. Also, beginner users may not know about GitHub, and may install Foliate from a software center. They can troubleshoot the issue by following that link

@johnfactotum
Copy link
Owner

johnfactotum commented Nov 14, 2023

Well, ideally it could be included in the "troubleshooting" section in the about dialog, but I don't think Libadwaita supports that.

Probably I'll pin an issue, add a section to the FAQ (which is linked to in the about dialog), and update the issue templates.

@johnfactotum johnfactotum changed the title Cannot read book in 3.0.0 version Page is blank in 3.0.0 version Nov 14, 2023
@enricosavegnago
Copy link
Author

enricosavegnago commented Nov 14, 2023

Did you open the book from the library view or did you open Foliate directly by opening the book from your file manager?
Both way it doesn't work
Can you reproduce the issue with other books? Try a free ebook like https://standardebooks.org/ebooks/jules-verne/an-antarctic-mystery/frances-cashel-hoey, and let us know.
Same issue

@timothyparez
Copy link

Same issue here on Ubuntu 23.04 (snap)
Open Foliate and then open any epub. ToC is visible, but reading pane is empty

@MikhailTNY
Copy link

Same issue on PopOS 22.04 LTS, had to add the env variables that @brezanac helpfully provided. Thanks.

@johnfactotum johnfactotum closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@zmazanv
Copy link

zmazanv commented Dec 18, 2023

Arch Wiki: Window does not appear in Flatpak on Nvidia

This is a known issue with Nvidia in Flatpak environments.

The linked Arch Wiki page includes a band-aid fix which does solve the issue, although inconvenient and not really a long-term solution. This could be made easier with a script if it this isn't resolved any time soon and it becomes too much of a headache to have to update the variable at each driver update.

The advantage over the other proposed "solution" of setting WEBKIT_DISABLE_DMABUF_RENDERER=1 is that you don't lose hardware acceleration. WEBKIT_DISABLE_DMABUF_RENDERER=1 makes the app noticeably sluggish due to this. The app runs perfectly fine with the linked "solution".

The environment variable to set for Nvidia driver version 545.29.06 would be:
GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-545-29-06/extra/gbm

The driver version number would need to be updated to match the running Nvidia driver version.

You could then set this with an override with flatpak override --env=GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-XXX-YY-ZZ/extra/gbm com.github.johnfactotum.Foliate or through setting the environment variable in Flatseal, which does the same thing.

imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not our bug Needs to be fixed upstream or elsewhere
Projects
None yet
Development

No branches or pull requests

7 participants