johnfactotum / foliate

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

Help needed to get snap version of foliate 3.0.1 running under Ubuntu 22.04 #1184

Closed hilderic closed 6 months ago

hilderic commented 7 months ago

Question: Snap version of foliate installed without errors but crashes immediately when started, reporting:

hilderic@cyril:~/Downloads$ sudo snap install foliate
foliate 3.0.1 from John Factotum (johnfactotum) installed
hilderic@cyril:~/Downloads$ foliate

(gjs-console:19870): Gjs-CRITICAL **: 17:04:26.951: JS ERROR: Error: Requiring WebKit, version 6.0: Typelib file for namespace 'WebKit', version '6.0' not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:14:24
@gi://WebKit?version=6.0:3:25

(gjs-console:19870): Gjs-CRITICAL **: 17:04:26.951: Module file:///usr/bin/foliate threw an exception

I'm sure there's an easy fix ("Just install such-and-such"), but I'm beyond my depth in terra (aqua?) incognita.

BTW, I would much have preferred to install the .deb instead of a snap, but I suspect it's not compatible with the version of Ubuntu that I'm running: foliate : Depends: gir1.2-gtk-4.0 (>= 4.10) but 4.6.9+ds-0ubuntu0.22.04.1 is installed Apparently no later version than what I have exists under 22.04.

Version:

johnfactotum commented 7 months ago

@soumyaDghosh

soumyaDghosh commented 7 months ago

Kindly give me the output of snap connections foliate

hilderic commented 6 months ago
Interface                        Plug                            Slot                                           Notes
audio-playback                   foliate:audio-playback          :audio-playback                                -
content[gnome-42-2204]           foliate:gnome-42-2204           gnome-42-2204:gnome-42-2204                    -
content[gtk-3-themes]            foliate:gtk-3-themes            gtk-common-themes:gtk-3-themes                 -
content[icon-themes]             foliate:icon-themes             gtk-common-themes:icon-themes                  -
content[sound-themes]            foliate:sound-themes            gtk-common-themes:sound-themes                 -
content[webkitgtk-6-gnome-2204]  foliate:webkitgtk-6-gnome-2204  webkitgtk-6-gnome-2204:webkitgtk-6-gnome-2204  -
dbus                             -                               foliate:foliate                                -
desktop                          foliate:desktop                 :desktop                                       -
desktop-legacy                   foliate:desktop-legacy          :desktop-legacy                                -
gsettings                        foliate:gsettings               :gsettings                                     -
network                          foliate:network                 :network                                       -
opengl                           foliate:opengl                  :opengl                                        -
wayland                          foliate:wayland                 :wayland                                       -
x11                              foliate:x11                     :x11                                           -

The above is after inistallation via snap install foliate, without the --edge channel specification given in soumyaDghosh's repository (which appears to make no difference in any case). It wasn't clear if your previous message with that reference was a suggestion to me, or merely to notify that person of an apparent problem.

(I responded a couple of days ago by email, but my message didn't show up here.)

soumyaDghosh commented 6 months ago

sudo /usr/lib/snapd/snap-discard-ns foliate

Try this. If it fixes the issue.

hilderic commented 6 months ago

No. :-)

hilderic@cyril:~$ sudo /usr/lib/snapd/snap-discard-ns foliate
[sudo] password for hilderic:
hilderic@cyril:~$ foliate

(gjs-console:5855): Gjs-CRITICAL **: 11:18:12.871: JS ERROR: Error: Requiring WebKit, version 6.0: Typelib file for namespace 'WebKit', version '6.0' not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:14:24
@gi://WebKit?version=6.0:3:25

(gjs-console:5855): Gjs-CRITICAL **: 11:18:12.871: Module file:///usr/bin/foliate threw an exception
soumyaDghosh commented 6 months ago

I tested in a live environment of Ubuntu 22.04, it worked fine. If I am not wrong, probably I got it. Can you give me logs of snap run foliate?

hilderic commented 6 months ago

OK, this is pretty embarrassing. Although I had uninstalled the previous old version (2.6.4), I still had an executable script /usr/bin/foliate on my system. Perhaps this was a remnant of my failed attempt to install and run 3.0.1 from the .deb package.

In any case, /usr/bin precedes /snap/bin in my $PATH so I presume that the reported errors weren't actually from the 3.0.1 snap. My profound apologies!

So the good news is, the snap does work, and I can open and read ebooks.

But not everything is perfect. Although right-clicking on an .epub (in nautilus) and selecting "Open with Foliate" successfully starts the program, it fails to open the selected file. It says "Book Cannot Be Opened / An error occurred / Details / Error: The I/O read operation failed". If I click "Open Another File..." and navigate to the same file, it opens successfully. But that's a rather painful workaround, particularly if the file is several levels of directories deep. Any suggestions?

soumyaDghosh commented 6 months ago

I am working to fix it. I'll try to close atleast 3/4 issues on snaps today. Don't worry about that. It's already listed.