janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13.19k stars 1.41k forks source link

Unable to view some cbr files in web reader #2689

Open designeramic opened 1 year ago

designeramic commented 1 year ago

I'm able to read some cbr files but not others. At first I thought it might be a bad file, so I tried reading in local Calibre ereader and it works fine. As such, I think this might be an issue with the web ereader. I'm getting this error in the console.

Screenshot 2023-02-11 at 5 48 51 PM
OzzieIsaacs commented 1 year ago

Yeah, looks like some error in the webreader. Please make sure you are using the latest nightly version, as there have been some bugs in the reader in the past.
If this is the case, please send me one of the problematic books via private email(the email address on my profile page), so I can have a look at it.

designeramic commented 1 year ago

Thanks for the assistance here, @OzzieIsaacs. I just sent you an email with one of the problematic books as you suggested.

OzzieIsaacs commented 1 year ago

I can reproduce the problem. Calibre-Web decompresses the files for the comic reader on the client side (your reading device). To speed up the process I use a binary decompression library, which I can't debug. The library I use had no updates in the last 5 years (https://github.com/workhorsy/uncompress.js). Currently I tend to rewriting the complete comic reader code to do the decompression on the server side to avoid problems like this and also to be more flexible. My last attempt a few years ago failed, because of out of memory issues, I could not find, I'll try it again, but it will take some time

myrandor commented 1 year ago

Take a look at this project. I just stumble on it. Maybe it can help you to support more compression methods!

https://github.com/nika-begiashvili/libarchivejs

myrandor commented 1 year ago

I also have many CBR that linux doesn't detect as RAR file but are able to open using 7zip. My Calibre software on Windows is able to read it, but the Web reader won't uncompress it.