Skip to content
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

Exception thrown reading certain epub files #7

Open
getBoolean opened this issue Nov 29, 2021 · 4 comments
Open

Exception thrown reading certain epub files #7

getBoolean opened this issue Nov 29, 2021 · 4 comments

Comments

@getBoolean
Copy link

getBoolean commented Nov 29, 2021

This is different from #3. I have tested the file they linked and it does not throw an exception.

Describe the bug
The method ChapterReader.getChaptersImpl is throwing an exception because it can't find the key in the html map

I have identified the cause in ChapterReader.getChaptersImpl (line 34)

if (!bookRef.Content!.Html!.containsKey(contentFileName))

Where:
contentFileName is "../Text/Section00001.xhtml"
but the actual key in bookRef.Content!.Html! is "Text/Section00001.xhtml"

So it throws the exception

To Reproduce
Steps to reproduce the behavior:

  1. Open this epub
  2. See error thrown when trying to get chapters with the chapter reader (specifically with epub_view's EpubView widget)

Screenshots

@getBoolean
Copy link
Author

I made an issue at ScerIO/packages.flutter#237, but that was before I found the core cause.

@petersephrin
Copy link

What solution did you find?

@shinkhantmaung
Copy link

Did you get solution?

@getBoolean
Copy link
Author

@petersephrin @shinkhantmaung no i haven’t. The only solution right now is to write your own library or fork it and fix the bugs yourself.

I’m working on my own library but its a long way from completion, and I’ve been too busy to work on it recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants