-
-
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
glib2 2.72.0 causes "Empty response" #878
Comments
I confirm that I have the exact same bug on arch : foliate 2.6.4-1 and glib2 2.72.0-1.
|
For some reason I can't seem to reproduce this. Have glib2 2.72.0-1. Built both 2.6.4 and master and all seems fine. |
Interesting... I tried a few other downgrades thinking maybe glib2 was a red herring, but these also have no effect:
I'm not sure how something low in the stack (like glib2) could cause this error. Any additional debugging I can do to help? |
I don't really have any idea. But here's a somewhat minimal script for reproducing the problem: #!/usr/bin/gjs
const fetchURI = 'file:///home/user/test'
const pageURI = 'file:///usr/share/com.github.johnfactotum.Foliate/assets/epub-viewer.html'
imports.gi.versions.Gtk = '3.0'
imports.gi.versions.WebKit2 = '4.0'
const { Gtk, WebKit2 } = imports.gi
const app = new Gtk.Application({ application_id: 'org.gtk.Example' })
const script = `fetch('${fetchURI}').then(res => res.text()).then(text => alert(text))`
app.connect('activate', () => {
const win = new Gtk.ApplicationWindow({ application: app })
const webView = new WebKit2.WebView({
settings: new WebKit2.Settings({
enable_write_console_messages_to_stdout: true,
enable_developer_extras: true,
allow_universal_access_from_file_urls: true,
}),
})
webView.connect('load-changed', (_, event) =>
event === WebKit2.LoadEvent.FINISHED
? webView.run_javascript(script, null, () => {}) : null)
webView.load_uri(pageURI)
win.add(webView)
win.show_all()
})
app.run([]) To run this script you first need to make sure that If one can reproduce with this GJS example, then it's probably a good idea to try to reproduce it in C as well and submit a bug to the WebKitGTK devs. |
Hmm, running through those steps (with
which seems... like an error, but not quite the same as the "Empty response" error. Downgrading glib2 does fix it; the window shows a "Hello" alert with this output instead:
I'll see about filing that upstream bug. |
Perhaps it's related to how your filesystem is set up, as I still cannot reproduce it. In any case, in the future we really want to stop making requests to files, which is not only unreliable, but also insecure, and bad for performance as the whole file is loaded in memory. Instead it should either set up a local server, or somehow get a |
I don't know if it's really useful, but the script gave me the same output... |
Yeah I'm also going to investigate miscellaneous filesystem and DNS related things. glib2 2.72.0 has other peculiar behaviors on my system (eg the GTK file picker no longer shows mountpoints in the "other locations" list) which seem to be in the same ballpark as this. There must be something that makes the file:// request "look" cross-origin that's specific to my setup. |
Temporary solution on Arch Linux with the downgrade command : sudo downgrade glib2=2.70.4-1 |
I'm on Arch and @johackim's suggestion solved it for me. It did not work simply by opening foliate as soon as I downgraded, I had to open a specific file. I do not have the downgrade package, but I used the native command: pacman -U https://archive.archlinux.org/packages/g/glib2/glib2-2.70.4-1-x86_64.pkg.tar.zst And then added
to |
I confirm there is a bug. if I roll back to the previous version of glibc, after rebooting, my desktop and taskbar do not appear. How to read books now? |
I rolled back using @johackim solution and Foliate worked for me as well, using Garuda Linux/Arch. |
Strace log of the issue on fedora 36 if it can help. |
Appears with the latest Arch updates, downgrading glib2 no longer works, thus no YacReader, also, still doesn't work with latest glib2 2.72.0-1. Running in terminal gets me; 'YACReader: error while loading shared libraries: libicuuc.so.70: cannot open shared object file: No such file or directory' |
FWIW the bug seems to appear on Debian as well but I cannot reproduce it on my hosts using glib 2.72.1 |
I can reproduce this too |
Some more investigation updates:
|
I cannot reproduce this issue with glib2 |
I can confirm @tummychow's comment that upgrading to glib2 v2.72.1-1 on Arch Linux does not seem to fix the issue. |
I filed a bug for Debian. I'm using Debian Sid with XFCE, not with Gnome, and foliate still doesn't work after updating to glib2 v2.72.1-1. |
I am confused, why are users filing bug reports with their distro maintainers? Isn't this an issue for the Foliate maintainer to update Foliate to work with the latest Glib2? |
@Kandelai pretty sure foliate is already doing the right thing here - it's passing the option that disables cross origin restrictions for file urls. So the fact that it's failing a file url request, with a cross origin error message, certainly looks like an upstream bug. (As I've already said, I don't know how webkit2gtk and glib2 can interact in a way that causes this outcome. My guess is both are at fault in some way and glib2 happened to to be the one that revealed the issue.) |
@Kandelai because sometimes bugs are due to interactions between library versions or other OS components and so on and can be fixed by the package maintainer. |
If you are on Arch Linux and you use Cinnamon, DO NOT DOWNGRADE glib2 to 2.70.4-1 |
Arch w/ Gnome shell 42 here. Encountered the same issue and found the downgrade trick above worked. |
I encountered this bug on Arch, but after deleting the file This might provide a workaround for others that can't downgrade glib2. Based on Michael Catanzaro's comment at https://gitlab.gnome.org/GNOME/glib/-/issues/2639, it appears that the upstream bug is triggered if an application has been set as default for the .html extension, which happens after Firefox is set as the default web browser. Deleting the mime database clears this default, at least temporarily. The following upstream issues are also relevant. |
Just to confirm the same bug on Arch Linux as fellow users of that distribution and same versions, hopefully a solution will be found. I'd rather not mess with mime.cache or downgrades of core packages. |
Do not downgrade! I messed up my environment. You can install it from Snap store, it works just fine. |
Oh well, having same problem on Ubuntu Mate 22.04 with same glib 2.72, so its global problem. Interestingly enough, Atril - Mate's standard viewer for PDF and epub have lost ability to show epub file at same time. |
Since my last comment, I have reinstalled ArchLinux and I can now use Foliate 2.6.4 (the most recent) with glib2 2.72.1-1 via the package foliate from the Community repository. |
can you re-check this? I just did the same on my Arch install and i'm still getting the same error. Please verify your versions: i don't believe this issue is resolved. (there's been no update to Foliate that i can tell, nor to glib2, that would have fixed anything) |
Reinstalling Arch created a new version of mime.cache which might have
fixed the issue.
…On Thu, 19 May, 2022, 7:13 am winteriscariot, ***@***.***> wrote:
Since my last comment, I have reinstalled ArchLinux and I can now use
Foliate 2.6.4 (the most recent) with glib2 2.72.1-1 via the package foliate
from the Community repository.
can you re-check this? I just did the same on my Arch install and i'm
still getting the same error. Please verify your versions: i don't believe
this issue is resolved. (there's been no update to Foliate that i can tell,
nor to glib2, that would have fixed anything)
—
Reply to this email directly, view it on GitHub
<#878 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXL2XCGDW6AD23EXXJI643VKWMCTANCNFSM5RNA6IBA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@winteriscariot I have just rechecked the versions (using |
If you (plural) need me to provide more information on my system or run any test, I'd be happy to oblige. I can think of no difference between the current installation from the previous one except that I've replaced the common kernel with the zen kernel and that I've started using LVM. However, I do not think such changes would interfere. The change must be of the sort @apandada1 mentioned. |
This comment was marked as outdated.
This comment was marked as outdated.
Well, I deleted |
This worked for me too on Debian Sid. After deleting ~/.local/share/mime/mime.cache, foliate started working again without any apparent issues. However, if I restore the deleted mime.cache file or recreate it via |
I have the same exact experience as @argosatcore on fully updated Arch Linux 5.18, including failure after update-mime-database. |
I started having this issue on Fedora 36 with everything up to date. Deleting |
Wow, yes. I did too, on Manjaro and it fixed the issue. Thanks so much!! ♥ |
on Debian removing |
|
This issue has been fixed on Debian Sid. [1] It looks like the culprit was After running [1] See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009669 |
As well, on Arch the issue is fixed with glib2 updated to v. 2.72.3 |
I second what @wenzezlaus reported. Somehow the issue reappeared to me some days ago but updating the system getting |
Closing as it seems to have been fixed. |
Describe the bug
Opening any epub causes foliate to show "Could not open file" with this output:
To Reproduce
Open any epub with glib2 2.72.0
Version:
This is with Arch Linux's foliate 2.6.4-1 and glib2 2.72.0-1. Downgrading to Arch's glib2 2.70.4-2 fixes the issue. Honestly, I have no idea why. From past foliate issues, I assumed some other gtk package was involved (eg webkit2gtk 2.36.0-1 to 2.34.6-1, gjs 2:1.70.2-1 to 2:1.70.1-2, js78 78.15.0-4 to 78.15.0-3) but those downgrades don't fix it; only the glib2 downgrade has any effect.
The text was updated successfully, but these errors were encountered: