Closed ghost closed 7 years ago
Please send those e-books to contact@michaldaniel.work, it's the only way I can have chance to debug this. Thank you for bringing this to my attention.
Done. I sent you three different e-books for testing.
I think it should work now, opened all three of them working correctly.
I updated e-book viewer to latest git version, but I still can't read the three e-books I sent you...
I've sent you an email. Please note that due to conflict with calibre "ebook viewer" I changed name to "Easy Ebook Viewer".
Just replied to your email.
@fturco Can you update again to include last commit? It will give me just a little more output.
/tmp/easy-ebook-viewer-yourusername/
?ls -l
gir1.2-webkit-3.0
dependency. On ubuntu and debian dpkg -s gir1.2-webkit-3.0
Could you also do cd && rm .easy-ebook-viewer.conf
so my new fix (that makes sure not to save about:blank as restore point page) could be tested? I really can't reproduce this bug, whatever I do those books open fine.
I updated easy-ebook-viewer, removed ~/.easy-ebook-viewer.conf
and tried again. Same problem.
I can see files from my ebook stored in /tmp/easy-ebook-viewer-cache-fturco/:
$ ls -l /tmp/
total 0
drwx------ 2 fturco fturco 40 Sep 18 19:35 babel-41169Bt
drwx------ 5 fturco fturco 220 Sep 18 20:38 easy-ebook-viewer-cache-fturco
drwx------ 2 root root 40 Sep 18 18:23 pulse-PKdhtXMmr18n
drwx------ 2 fturco fturco 60 Sep 18 18:24 ssh-LuxJGPjPk1hp
drwx------ 3 root root 60 Sep 18 18:24 systemd-private-f371e1b37f5a49659e0cc6a160584796-colord.service-N5HYZ5
drwx------ 3 root root 60 Sep 18 18:23 systemd-private-f371e1b37f5a49659e0cc6a160584796-systemd-timesyncd.service-ZSAKjx
drwx------ 2 fturco fturco 60 Sep 18 20:42 tracker-extract-files.1000
srwxr-xr-x 1 fturco fturco 0 Sep 18 19:37 uGetIPC-fturco
When clicking on the prev/next page buttons it seems to switch page, but unfortunately I can't read it since it's blank.
On Gentoo Linux there's no gir1.2-webkit-3.0
package, but I have 3 versions of webkit-gtk
installed:
$ equery list webkit-gtk
* Searching for webkit-gtk ...
[IP-] [ ] net-libs/webkit-gtk-2.4.11-r1:3/25
[IP-] [ ] net-libs/webkit-gtk-2.4.11-r200:2
[IP-] [ ] net-libs/webkit-gtk-2.12.5:4/37
This is the list of USE flags (aka compile options) I used for webkit-gtk-2.12.5
:
$ equery uses webkit-gtk
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for net-libs/webkit-gtk-2.12.5:
U I
- - coverage : Enable code coverage support
- - doc : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
+ + egl : Enable EGL support.
+ + geolocation : Enable physical position determination
- - gles2 : Enable GLESv2 support.
+ + gnome-keyring : Enable support for storing passwords via gnome-keyring
+ + gstreamer : Add support for media-libs/gstreamer (Streaming media)
+ + introspection : Add support for GObject based introspection
+ + jit : Enable just-in-time compilation for improved performance. May prevent use of some PaX memory protection features in
Gentoo Hardened.
+ + libnotify : Enable desktop notification support
- - nsplugin : Build plugin for browsers supporting the Netscape plugin architecture (that is almost any modern browser)
+ + opengl : Add support for OpenGL (3D graphics)
- - spell : Add dictionary support
- - test : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set
it in make.conf/package.use anymore
- - wayland : Enable dev-libs/wayland backend
+ + webgl : Build support for the WebGL HTML API using virtual/opengl
According to https://packages.debian.org/sid/amd64/gir1.2-webkit-3.0/filelist I need to have /usr/lib/x86_64-linux-gnu/girepository-1.0/WebKit-3.0.typelib
. I don't have that file on my system. The right location for Gentoo Linux is probably /usr/lib64/girepository-1.0/WebKit-3.0.typelib
:
$ equery belongs /usr/lib64/girepository-1.0/WebKit-3.0.typelib
* Searching for /usr/lib64/girepository-1.0/WebKit-3.0.typelib ...
net-libs/webkit-gtk-2.4.11-r1 (/usr/lib64/girepository-1.0/WebKit-3.0.typelib)
In other words that file belongs to package webkit-gtk-2.4.11-r1
, which is correctly installed on my system.
Hmm. Normally navigating around should produce output like this
Loaded uri: file:///tmp/easy-ebook-viewer-cache-michal///text/part0010.html
Loading file: file:///tmp/easy-ebook-viewer-cache-michal///text/part0010.html
Loaded uri: file:///tmp/easy-ebook-viewer-cache-michal///text/part0011.html
Loading file: file:///tmp/easy-ebook-viewer-cache-michal///text/part0011.html
First I call load_uri on WebKit.WebView and then load-finished
event handler should print out Loading file
before doing some position saving logic and what not. It would seem that webkit never fires 'load-finished' on those files.
I will try to dive into this again next weekend and test it against most recent webkit but right now I can only offer this insight.
With certain e-books I obtain the behaviour you just specified: Loaded uri
followed by Loaded file
. But on several problematic e-books I get only the Loaded uri
messages.
@fturco It seems to be very webkit specific thing, I can already sense it's going to be massive pain in the ass to narrow down. But you gave me version and compilation flags so I'll set up some VM and try to reproduce it. Until I can test this bug against my build it's all guess work. Thanks for all the info.
One more thing, could go download pPub and give it a try? https://github.com/sakisds/pPub
pPub can't open any of the three ebooks I sent you. Same problem: blank window. It can successfully open other e-books I have, just like Easy E-book Viewer.
If you want I can try a different webkit-gtk version, for example one of the following ones:
I can also try installing some ebuild from 3rd-party overlay from here.
Please tell me which version I should test. I don't want to choose a random one myself because webkit-gtk
takes a lot of time to compile on my system.
@fturco I'm sporting 2.4.10, we could establish that it works on that version and then try newest 2.12.5. If it does work on 2.4.10 and breaks on 2.12.5 we have something solid to work with ie. it's about changes between versions not some config/building tricks. And I really appreciate you going forward with this proposition, I know how long webkit-gtk takes to compile, done it once.
On my system I currently have three webkit-gtk
versions:
# equery list webkit-gtk
* Searching for webkit-gtk ...
[IP-] [ ] net-libs/webkit-gtk-2.4.11-r1:3/25
[IP-] [ ] net-libs/webkit-gtk-2.4.11-r200:2
[IP-] [ ] net-libs/webkit-gtk-2.12.5:4/37
As you can see there are three parallel slots:
I found old ebuilds for both net-libs/webkit-gtk-2.4.10 (slot 3) and for webkit-gtk-2.4.10-r200 (slot 2). Which version does Easy E-book Viewer need?
It's really hard to tell. It should support all webkits as long as GTK-3 api doesn't change. I'll test things in weekend myself, I am using webkit 2.4.10 so I know it works with this version but it shouldn't need it, it just might be worth to check if it does work using that specific one for you.
OK, I'm going to build both of them. Wish me luck! ;-)
I really do. And I really hope it works, it will narrow it a lot.
I finished installing both packages. This is my setup now:
$ equery list webkit-gtk
* Searching for webkit-gtk ...
[I-O] [ ] net-libs/webkit-gtk-2.4.10:3/25
[I-O] [ ] net-libs/webkit-gtk-2.4.10-r200:2
[IP-] [ ] net-libs/webkit-gtk-2.12.5:4/37
Unfortunately I haven't noticed changes from Easy E-book Viewer or pPub. In other words, the problems remain.
Hello. Thanks for your promising viewer. I tried to install it on archlinux, but it doesn't work. I can't open any ebook (for instance O'Reilly ebooks) that open fine with other viewers. I guess that somehow I might have missed some dependencies (see the depends section in the PKGBUILD file code below), since their naming was for your system (debian ?). If you can take a look in the code below to see if I'm correct.
Actually, the [bug|error] is quite the same than in pPub that I've tried to install (and removed).
I took the time to create a PKGBUILD and an .install file in order to create an archlinux package to properly install / upgrade / remove it from my system. Other arch users can use those scripts too, so I post them here.
PKGBUILD
# Maintainer: myself <firstname.name@gmail.com>
pkgname=Ebook-Viewer
pkgver=0.1
pkgrel=1
epoch=
pkgdesc="Modern GTK Python app to easily read ePub files"
arch=('i686' 'x86_64')
url="https://github.com/michaldaniel/Ebook-Viewer"
license=('GPL-3.0')
groups=()
depends=('webkitgtk' 'gobject-introspection' 'python-gobject' 'python3' 'gtk3')
makedepends=('git' 'make')
checkdepends=()
optdepends=()
provides=('Ebook-Viewer')
conflicts=('Ebook-Viewer')
replaces=()
backup=()
options=()
install=$pkgname.install
changelog=
source=("$pkgname::git+https://github.com/michaldaniel/Ebook-Viewer")
noextract=()
md5sums=('SKIP')
validpgpkeys=()
prepare() {
cd $pkgname
sed -i '/gtk-update-icon-cache/d' Makefile
}
build() {
cd "$pkgname"
make
}
package() {
cd "$pkgname"
make PREFIX="$pkgdir/usr" install
}
Ebook-Viewer.install
post_install() {
gtk-update-icon-cache -q -t -f usr/share/icons/gnome
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}
@quatrecouleurs That seemed about right with python3 exception, you listed python2, the app relies on python3. I edited your post.
@quatrecouleurs Also I can see you are using name "Ebook Viewer" it's now "Easy eBook Viewer" and the app doesn't handle prefixes well with some hard coded paths in it. I'm going to change that sooner or later but right now it has those set in stone:
PREFIX = /usr
EBOOKVIEWER_DIR = ${PREFIX}/share/easy-ebook-viewer
BINDIR = ${PREFIX}/bin
PYTHON = ${BINDIR}/python3
PS. I'm going to looking into this today and report back later.
Should be working fine now. Thanks to help from my friend @bookletchoir we were able to narrow it down. Turns out is might be issue that needs to be taken upstream but for now we can use load_html_string
webview method instead of load_uri
that fails for certain html files.
I can open my three e-books now! Thank you both!
@fturco Thank you for taking time to report this and helping with all that debug process.
Thanks with your edits now it works perfectly well :)
I tried opening several ePub books, with limited success. Some can be displayed just fine while others cannot (the main window remains empty, with no content). Calibre can open them instead. Unfortunately I cannot share those e-books publicly, but I'm happy to send them to you in private (e-mail?) if you want.