johnfactotum / foliate

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

No books will load #322

Closed thomasrive closed 4 years ago

thomasrive commented 4 years ago

Installed foliate on a fresh install of Ubuntu 20.04 LTS, using snap, .deb, and flatpak. All result in the following picture when trying to open up either epub or mobi, an indefinite loading that goes nowhere.

foliate

johnfactotum commented 4 years ago

Please provide more information.

thomasrive commented 4 years ago

(com.github.johnfactotum.Foliate:19214): GLib-GIO-WARNING **: 11:14:27.960: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2) Gjs-Message: 11:14:31.960: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/tts.js 33]: reference to undefined property "_epub" file:///snap/foliate/current/usr/share/com.github.johnfactotum.Foliate/assets/epub-viewer.js:352:22: CONSOLE ERROR TypeError: undefined is not an object (evaluating 'cfiOne.path.steps') Cannot get default EGL display: EGL_SUCCESS Cannot create EGL sharing context: invalid display (last error: EGL_SUCCESS)

Closing the window then results in this:

Gjs-Message: 11:16:23.370: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/epubView.js 558]: reference to undefined property "_dataHandlers"

(com.github.johnfactotum.Foliate:19214): Gjs-WARNING **: 11:16:23.370: JS ERROR: TypeError: this._dataHandlers is undefined _disconnectData@resource:///com/github/johnfactotum/Foliate/js/epubView.js:558:9 _connectData/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:552:13 main@resource:///com/github/johnfactotum/Foliate/js/main.js:183:12 run@resource:///org/gnome/gjs/modules/package.js:225:12 @/snap/foliate/142/usr/bin/com.github.johnfactotum.Foliate:9:1

thomasrive commented 4 years ago

I apologize, what specific console command did you want me to run to have that debug.txt?

sgtnasty commented 4 years ago

I have the same issue, none of my epub files will load. Fedora 32, com.github.johnfactotum.Foliate flatpak v 2.0.0 stable branch.

Error message: ` $ flatpak run com.github.johnfactotum.Foliate Portal call failed: Failed to start command: Failed to execute child process “dict” (No such file or directory) Gtk-Message: 18:48:13.141: Failed to load module "pk-gtk-module" Gtk-Message: 18:48:13.142: Failed to load module "pk-gtk-module" Gjs-Message: 18:48:13.257: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/window.js 1119]: reference to undefined property "_loading" Gjs-Message: 18:48:18.001: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/tts.js 33]: reference to undefined property "_epub" Gtk-Message: 18:48:18.074: Failed to load module "pk-gtk-module" Gtk-Message: 18:48:18.075: Failed to load module "pk-gtk-module" file:///app/share/com.github.johnfactotum.Foliate/assets/epub-viewer.js:352:22: CONSOLE ERROR TypeError: undefined is not an object (evaluating 'cfiOne.path.steps') libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast

(WebKitWebProcess:25): Gdk-ERROR **: 18:48:18.393: The program 'WebKitWebProcess' received an X Window System error. This probably reflects a bug in the program. The error was 'BadValue (integer parameter out of range for operation)'. (Details: serial 228 error_code 2 request_code 150 (GLX) minor_code 34) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Gjs-Message: 18:48:21.538: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/epubView.js 558]: reference to undefined property "_dataHandlers"

(com.github.johnfactotum.Foliate:2): Gjs-WARNING **: 18:48:21.539: JS ERROR: TypeError: this._dataHandlers is undefined _disconnectData@resource:///com/github/johnfactotum/Foliate/js/epubView.js:558:9 _connectData/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:552:18 main@resource:///com/github/johnfactotum/Foliate/js/main.js:183:24 run@resource:///org/gnome/gjs/modules/script/package.js:222:19 @/app/bin/com.github.johnfactotum.Foliate:9:17`

johnfactotum commented 4 years ago

@thomasrive Are these messages from the .deb, Snap, or Flatpak package?

I apologize, what specific console command did you want me to run to have that debug.txt?

Run the app with the environment variable G_MESSAGES_DEBUG=all. It might provide some clues. But I think it's probably something to do with WebKit and/or OpenGL. In which case the issue is probably not something that we can fix.

@sgtnasty That looks very similar to https://github.com/johnfactotum/foliate/issues/149#issuecomment-552119916 and https://github.com/johnfactotum/foliate/issues/149#issuecomment-550377338. Again, this seems to be some kind of graphics problem.

thomasrive commented 4 years ago

@johnfactotum this is using the snap app, but I reproduced it using flatpak and the available .deb file.

Here is the resulting debug.txt

Gjs-Message: 12:14:33.601: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/window.js 1119]: reference to undefined property "_loading"
Gjs-Message: 12:14:33.624: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/tts.js 33]: reference to undefined property "_epub"

(com.github.johnfactotum.Foliate:9641): GLib-GIO-WARNING **: 12:14:36.168: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
file:///snap/foliate/current/usr/share/com.github.johnfactotum.Foliate/assets/epub-viewer.js:352:22: CONSOLE ERROR TypeError: undefined is not an object (evaluating 'cfiOne.path.steps')
Cannot get default EGL display: EGL_SUCCESS
Cannot create EGL sharing context: invalid display (last error: EGL_SUCCESS)
Gjs-Message: 12:14:45.436: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/epubView.js 558]: reference to undefined property "_dataHandlers"

(com.github.johnfactotum.Foliate:9641): Gjs-WARNING **: 12:14:45.436: JS ERROR: TypeError: this._dataHandlers is undefined
_disconnectData@resource:///com/github/johnfactotum/Foliate/js/epubView.js:558:9
_connectData/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:552:13
main@resource:///com/github/johnfactotum/Foliate/js/main.js:183:12
run@resource:///org/gnome/gjs/modules/package.js:225:12
@/snap/foliate/142/usr/bin/com.github.johnfactotum.Foliate:9:1

(com.github.johnfactotum.Foliate:9641): GLib-GIO-WARNING **: 12:14:46.813: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
file:///snap/foliate/current/usr/share/com.github.johnfactotum.Foliate/assets/epub-viewer.js:352:22: CONSOLE ERROR TypeError: undefined is not an object (evaluating 'cfiOne.path.steps')
Cannot get default EGL display: EGL_SUCCESS
Cannot create EGL sharing context: invalid display (last error: EGL_SUCCESS)

(com.github.johnfactotum.Foliate:9641): Gjs-WARNING **: 12:14:53.313: JS ERROR: TypeError: this._dataHandlers is undefined
_disconnectData@resource:///com/github/johnfactotum/Foliate/js/epubView.js:558:9
_connectData/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:552:13
main@resource:///com/github/johnfactotum/Foliate/js/main.js:183:12
run@resource:///org/gnome/gjs/modules/package.js:225:12
@/snap/foliate/142/usr/bin/com.github.johnfactotum.Foliate:9:1
johnfactotum commented 4 years ago

@thomasrive These don't contain the the debug level messages. Can you run

G_MESSAGES_DEBUG=all com.github.johnfactotum.Foliate

or

G_MESSAGES_DEBUG=all flatpak run com.github.johnfactotum.Foliate
thomasrive commented 4 years ago
thomasrive@COMPUTER:~$ G_MESSAGES_DEBUG=all com.github.johnfactotum.Foliate
com.github.johnfactotum.Foliate: command not found
johnfactotum commented 4 years ago

The command should be available if you have the .deb installed. You know what, just run

export G_MESSAGES_DEBUG=all

and run whatever command you use to launch Foliate.

thomasrive commented 4 years ago
thomasrive@COMPUTER:~$ export G_MESSAGES_DEBUG=all
thomasrive@COMPUTER:~$ foliate
(com.github.johnfactotum.Foliate:8409): Gtk-DEBUG: 09:59:04.704: Connecting to session manager
Gjs-Message: 09:59:06.107: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/window.js 1119]: reference to undefined property "_loading"

(com.github.johnfactotum.Foliate:8409): GLib-GIO-WARNING **: 09:59:11.209: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
Gjs-Message: 09:59:14.911: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/tts.js 33]: reference to undefined property "_epub"
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.295: ready
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.296: run_javascript: doubleClickTime =
                    400
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.296: run_javascript: windowSize = 960
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.298: run_javascript: zoomLevel = 1
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.298: run_javascript: enableFootnote = true
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.299: run_javascript: skeuomorphism = false
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.299: run_javascript: autohideCursor = false
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.300: run_javascript: open("file:///home/thomasrive/Downloads/The%2520Strange%2520Case%2520of%2520Dr%2520Jekyll.epub", 'epub',
                    'viewer',
                    {"width":"100%","flow":"paginated"})
file:///snap/foliate/current/usr/share/com.github.johnfactotum.Foliate/assets/epub-viewer.js:352:22: CONSOLE ERROR TypeError: undefined is not an object (evaluating 'cfiOne.path.steps')
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.561: book-ready
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.561: run_javascript: JSON.stringify(book.package.metadata)
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.562: run_javascript: JSON.stringify(book.navigation.toc)
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.566: run_javascript: loadLocations(null)
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.566: run_javascript: render()
(com.github.johnfactotum.Foliate:8409): Foliate-DEBUG: 09:59:16.572: cover
Cannot get default EGL display: EGL_SUCCESS
Cannot create EGL sharing context: invalid display (last error: EGL_SUCCESS)
Gjs-Message: 09:59:39.169: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/epubView.js 558]: reference to undefined property "_dataHandlers"

(com.github.johnfactotum.Foliate:8409): Gjs-WARNING **: 09:59:39.169: JS ERROR: TypeError: this._dataHandlers is undefined
_disconnectData@resource:///com/github/johnfactotum/Foliate/js/epubView.js:558:9
_connectData/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:552:13
main@resource:///com/github/johnfactotum/Foliate/js/main.js:183:12
run@resource:///org/gnome/gjs/modules/package.js:225:12
@/snap/foliate/142/usr/bin/com.github.johnfactotum.Foliate:9:1

I am running the snap not .deb

johnfactotum commented 4 years ago

Well, looks like everything loads fine, but after calling render(), somehow Epub.js doesn't actually finish rendering. Since the EGL messages appear right after render() was called, maybe that's what went wrong. But I know nothing about these WebKit/OpenGL stuff and, if it's indeed that, probably not something we can fix in the application. Do other WebKitGTK apps run fine on your system?

thomasrive commented 4 years ago

fixedfoliate It would seem that after switching to Using X.Org X server -- Nouveau display driver from xserver-xorg-video-noueau (open source) the problem resolved itself and the book loads just fine. First time I've heard of display drivers affecting programs. Previously trying to run foliate via Using NVIDIA driver metapackage from nvidia-driver-390 (proprietary, tested)

Edit: Performed a manual nvidia driver reinstall and foliate is working as normal. It would seem that the drivers ubuntu downloads automatically on a fresh install were interfering with foliate. Used http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux

sudo apt-get purge nvidia* followed by

sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-driver-390

Restarted and foliate is still working and has loaded up epub and mobi files. A beautiful app, and so glad I'm able to use it now. Thank you for your help!