-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
Foliate stopped working on Ubuntu 22.04 #879
Comments
I have same problem after upgrade to 22.04. |
Just stumbled upon this. Trying to start from command line outputs
|
Same problem on Ubuntu 20.04
|
I cannot reproduce the issue in Xubuntu 22.04 (fully updated as of 7th April) with the PPA version of Foliate. It runs and opens books just fine. |
Same here. There is a workaround. When you login, choose 'Ubuntu on xorg' instead of 'Ubuntu', and you will get a functional Foliate. |
Hm, that is really strange. I am in fact using Ubuntu on Xorg, and I am still experiencing the same issue - Foliate is practically unusable. |
No tricks work for me because it crashes on load, every time. No error message. Just starts to load and then never does. |
Similar problem, Debian 11, glibc 2.72, installed from .deb package. Interestingly, the same version of foliate, but flatpak (installed via bauh], works just fine. Which isn't a solution, but perhaps a short-term workaround for some other folks. |
@uriel1998 If you're seeing "Empty Response", that's #878. The Flatpak version is still using the GNOME 41 runtime so it probably has glib < 2.72. |
So is there any hope that this gets fixed now? Or that we at least get a response from the maintainer? |
Cannot reproduce on Ubuntu MATE 22.04. Is this issue GNOME specific? |
Yes, this is specific to GNOME. |
I'm pretty sure I am running into the same underlying error. I have been running a Ubuntu apt install of Foliate (2.6.4-1 stable PPA) on Ubuntu Cinammon 22.04 with no issues for weeks. It died on me this morning as described in the top level bug report, i.e. window frame is displayed but it hangs. Re-running from the terminal I get the following error message: (WebKitWebProcess:2): Gdk-ERROR **: 09:36:32.022: The program 'WebKitWebProcess' received an X Window System error. The same thing continues to happen after removing Foliate and reinstalling (2.6.4-4 !!!==> The problem was probably triggered by the apt update that ran between yesterday and today. I suspect the nvidia driver upgrade, but anyway here is the full record: |
@apandada1 since you are marked as the Ubuntu package maintainer, is there a chance you look into this issue any time soon? @johnfactotum if we do not get any responce from @apandada1, what other options do we have to have this fixed? Foliate is basically unusable for over half a year now. |
@tomicakorac I don't know how to fix the bug, but does deleting mime.cache help, as in #878 ? Moreover, last time I checked in a VM, Foliate was working in MATE and XFCE. |
Thank you @apandada1. Deleting I've never used Atril, so can't know for sure. On the first glance, it looks like Atril works just fine, no issues. On the other hand, Atril is a completely different product and is not related to Foliate. Its user preferences are very limited compared to Foliate, and Atril can not replace Foliate for me. MATE and XFCE don't have anything to do with this bug, this is specific to GNOME Shell version 40, as indicated in the initial bug report, and confirmed by several users in this thread. Judging from the direction this discussion is going in, I am very sorry to conclude that Foliate on Ubuntu is a dead project now. What a shame. |
Broken in Fedora 36 as well. rpm build. Flatpak works. |
Google founds a lot of cases with the same error "run@resource:///org/gnome/gjs/modules/script/package.js:206:19" after upgrade to Gnome shell 40 |
Just now I've realised something that might be useful: As described above, Foliate does not accept user commands (or doesn't accept them accurately), but as soon as you change focus from Foliate to anything outside of Foliate (e.g. switch to another app window, or open Gnome menu, or open Activities menu, anything really that is outside of Foliate), Foliate will actually execute the last commands. |
Additional potentially useful detail: This issue consistently exists on regular users' accounts (both admin and user levels), but does not exist on the root account. When I run `sudo com.github.johnfactotum.Foliate' the app instance does not experience any problems. I can't conclude what may be the reason. |
Some more details that I hope can help fix this. After discovering that the problem doesn't occur when Foliate is run as Root, I ran the app from the terminal as both non-root and root, using
As mentioned before, for non-root users this section does not get run until Foliate loses and regains focus. |
This is the warning after which Foliate becomes unrespnosive:
|
Attaching logs for comparison:
|
Finally, it works again since I deleted the file ~/.local/share/mime/mime.cache |
@Nicolaith I'm very happy to hear there's hope. I've deleted that file and still no joy :( Should I re-create |
I just did a fresh Jammy install and ran into Foliate errors including the ones mentioned in this thread. Then I remembered: The first time I installed Jammy (on another computer) several months ago, the first thing I did was to check whether Wayland was causing the trouble, so I rebooted to Jammy using the Ubuntu on Xorg option. There were no problems on Xorg. What was odd, though, was that when I rebooted into Jammy with wayland, Foliate was absolutely fine. So today, I did the same thing:
|
@johnfactotum 's comment in #962 made me curious again. He thinks these issues might arise from malfunctioning of WebkitGTK. Looking around my system I noticed the following:
Is it possible to make Foliate use a different version of libwebkit2gtk package? Can I somehow make it use version 5.0*? How likely is it that this might fix any of the above issues? Edit: For reference, Epiphany browser uses version 4.1, and testing foliate-js in Epiphany does seem to fix at least a couple of issues described in this thread. Edit 2: It's still worth noting that none of these issues exist if I run Foliate with |
Honestly I think perhaps the best way to debug your issue would be to try one of the 1.x versions of Foliate. If it works, try to do a git bisect (or just manually try other different versions) to find the culprit. If not even the 1.x versions work, the best way would be to try to make a minimal GTK window with a WebView, and load a very minimal Epub.js page, and go from there. |
Thank you for the suggestion John. Sadly, even 1.x versions are showing the same set of issues for me. At least from 1.4 and above, as lower versions don't have .deb packages ready.
I would be happy to try this, but I'm sorry to say I'm not a programmer and don't really understand how I would go about doing this. That said, I'll still give it my best try. |
Well, I guess one could go with something like this imports.gi.versions.Gtk = '3.0'
imports.gi.versions.WebKit2 = '4.0'
const { Gtk, Gio, GLib, WebKit2 } = imports.gi
const app = new Gtk.Application({ application_id: 'com.github.johnfactotum.Foliate' })
app.connect('activate', () => {
const win = new Gtk.ApplicationWindow({
application: app,
default_width: 900,
default_height: 600,
})
const webView = new WebKit2.WebView()
win.add(webView)
webView.load_uri('https://johnfactotum.github.io/foliate-js/reader.html')
win.show_all()
})
app.run([]) Run the file with In the So e.g. change it to https://futurepress.github.io/epub.js/examples/input.html to test Epub.js. If this works, then I guess one could debug by building the 1.0.0 version, and try to remove some code at a time until it works. I'm afraid I can't think of another way. (Well, you could do it in the opposite direction. Which basically amounts to recreating Foliate from scratch until it breaks. So it's not really easier.) |
Amazing, you're a star. I'll test this today. Opening https://futurepress.github.io/epub.js/examples/input.html in any browser I have available (Vivaldi, Epiphany, Firefox, Chromium) does show several issues loosly similar to the ones described here - hanging on load, unable to scroll pages, a few others. I'm really not sure how relevant this is, but there is clearly something wrong with Epub.js. None of these issues exist at https://johnfactotum.github.io/foliate-js/reader.html at least not in the web browsers. I'll continue testing John's script, but my hopes are still live that foliate-js renderer might help resolve this report. |
After the first round of testing: Summary: Basically, the script gives the exact same results as all the browsers. foliate-js seems to be working ok, at least those features that are currently available, while epub.js is practically unusable. Foliate.jsTested:
Not tested:
Epub.jsTested:
Not tested:
|
To compare with the above test, all Epub.js examples from this address work absolutely fine: https://futurepress.github.io/epub.js/examples/ Except the "Open from file" example, obviously, which is what was tested above. |
Edit: Unfortunately, this has proven to not solve my problem, as commented further. Please disregard the instructions from this comment. Specifically, it is NOT SAFE to execute Ok, wow... I think I was finally able to fix this problem. It was indeed caused by
For future reference, this seems to have helped:
In my case, the only one causing the problem was I wonder how none of the thread participants thought of suggesting this before. I got the idea from this thread: What is the purpose of mime.cache files I'll continue testing for final confirmation, but I'm closing this thread for now. If needed, I'll reopen it. |
Sorry, I keep forgetting that the version on Epub.js's website is broken (futurepress/epub.js#1066). The problem has been fixed (futurepress/epub.js#949) for some while. It just appears that the website branch (https://github.com/futurepress/epub.js/tree/gh-pages) hasn't been updated since 2018. |
Thank you very much for the time, patience and suggestions @johnfactotum. I confirm that For others, the problem might also be caused by I always say that all is well that ends well, but I still got irrationally angry this morning after finding out that such a simple solution fixed the issue that's been causing me aggrevation for more than 6 months. |
Ugh, my problem is back! After almost 2 days working normally, I can't open any ebook again. This time, the commands I thought had resolved my problem are not helping. This is terrible 😭 |
@johnfactotum this set of problems is caused by Ubuntu's Power Mode settings, specifically, I today found out the following:
I'm not sure how this can help further debugging, but I'll continue digging around. Also, if you or anyone else has any ideas, please let me know. |
I have no idea, honestly. Perhaps you can also try posting on https://discourse.gnome.org/. |
I can reproduce this on a VM running Ubuntu 22.04 (no NVidia card/drivers). Only occurs in the "power saver" mode. |
Just a guess: perhaps it has something to do with the WebView (or one of its ancestor widgets) having zero opacity. I mean that sounds like something that might get optimized when in power saver mode, right? If that's what's causing the problem then it could be fixed by deleting this line: Line 205 in 1f11b9b
And maybe also this line: Line 493 in 1f11b9b
|
I removed the lines in #879 (comment), and it seems to work in a live session in virtualbox (however, Foliate takes ~10 seconds to load in the power saver mode). |
Thanks for the quick reaction guys. @apandada1 that's a negative. Unfortunately the experimental version did not fix the problem on my computer, it only made it a little different, but essentially all the same issues still remain. Honestly, now that we are 100% certain of the culprit -- and we have a really simple workaround (just change power profile to 'balanced' or 'performance') -- I can live with this. It would be great to fix this bug, but I assume its priority is far lower than much of the other workload @johnfactotum has already. Also, Ubuntu's (or more precisely, GNOME's) Power Profiles feature is fairly new, poorly documented and nobody seems to know precisely how the feature works, i.e. what exactly do the profiles do to the system. I think it would be difficult to proceed with the debugging until we understand this first. I've raised an issue in the Power Profiles Daemon Gitlab repository and will update you as I receive new information. Lastly, since this whole thread has become a wreck, containing outdated (and potentially even harmful) assumptions, I suggest that we close it now. I will open a new issue with a more precise bug report, for future tracking, and I suggest that it is addressed with relatively low priority (of course, if anyone disagrees, feel free to say so). |
The same problem also occurs on the Librem5 running PureOS. It does not have a Power Saver Mode. |
I have Ubuntu 22.04 running on no less than three laptops (Huawei and Samsung). On all three, Foliate is working beautifully, BUT their doing so required preliminary steps that I have described in a previous post. I admit that the few steps I took seem illogical, and I cannot explain why they worked. But, I insist, they had to be repeated for all three laptops.
I started Foliate and it did not perform properly.
I started Foliate and it worked perfectly.
I started Foliate, and it worked perfectly (in Wayland) True there is one issue: I can "export annotations" to JSON, HTML and plaintext (have not tried the other options), but I cannot "import annotations" from JSON. To move my annotations to another computer I have to physically copy/paste them between the following directory of the two computers. /.local/share/com.github.johnfactotum.Foliate I was in fact reading a book on Foliate until I was interrupted by recent mail in this thread. Foliate was working beautifully tonight, 23 April, on Ubuntu 22.04 as it has been working beautifully for me ever since I performed the above steps. |
@kaia009 from your work-around steps it looks to me like they can't be used for anyone who is not on Wayland, correct? For example, I use Ubuntu on Xorg as my default environment, I can't change from Xorg to Wayland and stay there. |
I have similar issue on Linux Mint 21.1 but not sure if it has something with 'Power Saver' power profile described in #969 since I couldn't find 'Power Saver' option here. When I launch foliate from the terminal bwrap complains about permissions:
Solution was found here: https://www.mail-archive.com/[email protected]/msg38043.html
and it works fine for me |
I may have found another workaround (or missed it in this huge thread): System info: |
To be boring (it's now 2024!) - this used to work for me until fairly recently but A tower PC on AC power, I can't find any relevant CPU power management utilities installed Ubuntu 22.04.4 LTS (jammy)
Library pane comes up OK but once select an epub, ** (com.github.johnfactotum.Foliate:7218): WARNING **: 14:35:14.192: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied Furthermore, the invisible text can be selected and copied.
|
@David-Duffy How did you install foliate? As a workaround, can you try another installation method? |
Using an nvidia card and the proprietary I also have these warnings which are likely unimportant and can be ignored:
Following this post, setting this variable when calling foliate solved my problem:
copied the snap desktop file
and added the env value by editing the desktop Exec line
then used ALT+F2 and run the gnome-shell command |
Describe the bug
The Foliate application stops responding, and becomes unusable after a couple seconds.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
User interface should respond as expected to the user interaction. For example, when I click on the right side, pages should turn forward, left side pages should turn back, moving page slider should move book pages appropriately, clicking content headings should jump to corresponding section etc.
Version:
Additional context
Foliate was working just fine before, but I am not sure exactly at which point it started malfunctioning. I'm suspecting this happened after upgrading from Ubuntu 21.10 to 22.04.
The text was updated successfully, but these errors were encountered: