qt5-webengine 5.13.2 breaks ebook-viewer

Bug #1850975 reported by Eli Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Running with Arch Linux testing repos enabled, attempting to view a book
yields the following cryptic error message:

calibre, version 4.2.0
ERROR: Could not open book: Failed to load book manifest, click "Show
details" for more info

Failed to communicate with "/manifest?1572633787795", with status: [200]
OK<br><br>

I've narrowed the problem down to webengine, since the qt5 5.13.2
rebuilds are in testing and leaving most qt5 packages updated but
downgrading qt5-webengine results in the ebook-viewer working fine.

Deleting and rebuilding build/ .build-cache/ src/calibre/plugins/
doesn't help, either.

 affects calibre

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1850975

That looks like a bug in webengine. That error message will be displayed
if the AJAX onerror callback is called despite having a status of 200
OK. I dont have time to investigate webengine right now, but I have
committed a workaround.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
Eli Schwartz (eschwartz) wrote : Re: [Bug 1850975] Fixed in master

I've pulled those changes and rebuilt resources/viewer.js, which now has
the following new content:

- xhr.error_html = str.format(_("Failed to
communicate with \"{}\", with status: [{}] {}<br><br>{}"),
xhr.request_path, xhr.status, xhr.statusText, rt
ext.slice(0, 200));
+ xhr.error_html = str.format(_("Failed to
communicate with \"{}\", with status: [{} ({})] {}<br><br>{}"),
xhr.request_path, xhr.status, event, xhr.st
atusText, rtext.slice(0, 200));

+ if (xhr.status === ok_code && end_type === "error") {
+ end_type = "load";
+ }

But I still get an error:

calibre, version 4.2.0
ERROR: Could not open book: Failed to load book manifest, click "Show
details" for more info

Failed to communicate with "/manifest?1572738733938", with status: [200
(error)] OK<br><br>

The (error) is new, so the commit "Better error message on AJAX call
failure" seems to have successfully done what it's supposed to, but the
attempted fix itself does not seem to have worked.

Revision history for this message
Eli Schwartz (eschwartz) wrote :

Aaaaand also it seems other people have noticed too:
https://bugs.archlinux.org/task/64357

Arch Linux's qt5 packager has stabilized qt5-webengine 5.13.2 with the
attempted fix for calibre (
https://github.com/kovidgoyal/calibre/commit/6cccd18be81133ce57c885ecad9e012a16a3fe8b
) backported, but it hasn't helped.

If you have an Arch Linux system currently handy, that means you can
test the bug without having to enable the testing repos.

Revision history for this message
Kovid Goyal (kovid) wrote :

Should be fixed now. Sadly the fix is spread over a few commits, so you will have to do a bit of work to extract it into a patch.

Revision history for this message
Kovid Goyal (kovid) wrote :
Revision history for this message
Eli Schwartz (eschwartz) wrote : Re: [Bug 1850975] Re: qt5-webengine 5.13.2 breaks ebook-viewer

Thanks for the pointers. Looks like the first patch got mixed in with
some changes that rely on
https://github.com/kovidgoyal/calibre/commit/4e98478013c7e23a6333cb27cc09976667c77d1f

I guess it would've been more convenient to have split it into two
logical patches... but I should be able to manage. :D

Revision history for this message
Eli Schwartz (eschwartz) wrote :

I've successfully backported the 3.5 patches to Arch Linux.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.