Pool-Of-Tears / Myne

An android app to download & read ebooks from Project Gutenberg, built with Jetpack Compose.
https://pooloftears.in
Apache License 2.0
987 stars 59 forks source link

[Bug]: unable to read EPUB doc #177

Closed Asur30 closed 1 month ago

Asur30 commented 1 month ago

Steps to reproduce

1.switch to international reader. 2 open imported book 3.

Expected behaviour

It should show no of pages or progress completed

Actual behaviour

It is unable to read the document i imported and opened while selecting internal reader But opens wen i select external reader and then chose myne reader.

Device name

OnePlus pad

Android version

Android 14

Myne version

3.8.0

Device logs

https://github.com/Pool-Of-Tears/Myne/assets/151044518/0cae46ae-ace0-4022-b4e1-d6d5b80f95d2

Additional information

No response

starry-shivam commented 1 month ago

@Asur30 Thanks for reporting. I think this might be happening because the internal reader parses the book based on the toc.ncx (table of contents) file located within the epub archive if it's available. If the ncx file is not present, then it will parse the book using the spine method.

What might be happening in this case is that the book contains a toc.ncx file, but it is invalid or empty, hence it was not able to parse any chapters and the book was rendered as empty. I'll try to fix this issue in the next release by checking if the toc.ncx file exists and is not empty or invalid. If it is valid, then it will be used for parsing; otherwise, it will fall back to the spine-based parsing method. While spine-based parsing is generally not as accurate in mapping chapters as toc, it's at least better than having an empty book :)

If you don't mind, can you send me that particular EPUB book via email (starry@krsh.dev) or in our Telegram group, which was causing trouble? It'll help me reproduce the problem more easily while I'm working on it and ensure that it's working as expected.

starry-shivam commented 1 month ago

If you don't mind, can you send me that particular EPUB book via email (starry@krsh.dev) or in our Telegram group, which was causing trouble? It'll help me reproduce the problem more easily while I'm working on it and ensure that it's working as expected.

@Asur30 Waiting for your response.

Asur30 commented 1 month ago

Here's my issue

https://github.com/Pool-Of-Tears/Myne/issues/177#event-13023596614

And below is the file attached with which im having the issue

On Mon, 3 Jun 2024, 21:27 Stɑrry Shivɑm, @.***> wrote:

Closed #177 https://github.com/Pool-Of-Tears/Myne/issues/177 as completed via #180 https://github.com/Pool-Of-Tears/Myne/pull/180.

— Reply to this email directly, view it on GitHub https://github.com/Pool-Of-Tears/Myne/issues/177#event-13023596614, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEAMDJQ22XHBDUKOACN5K2TZFSHAHAVCNFSM6AAAAABIDXQ2HWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGAZDGNJZGY3DCNA . You are receiving this because you were mentioned.Message ID: @.***>

Asur30 commented 1 month ago

If you don't mind, can you send me that particular EPUB book via email (starry@krsh.dev) or in our Telegram group, which was causing trouble? It'll help me reproduce the problem more easily while I'm working on it and ensure that it's working as expected.

@Asur30 Waiting for your response.

And yeh, sorry for the late response as I was busy with my exams

Asur30 commented 1 month ago

I just updated to the latest version and I'm still having the same issue...

May be the problem is with the EPUB file that I've sent you via email

starry-shivam commented 1 month ago

I initially made the fix based on a hunch because I didn't have the EPUB file, which was causing trouble, to know exactly what was going wrong. Now that I have the file, I can investigate it and fix it properly.