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

Can't open *some* Perso-arabic script EPUB #1

Open
Mamasodikov opened this issue May 21, 2024 · 4 comments
Open

Can't open *some* Perso-arabic script EPUB #1

Mamasodikov opened this issue May 21, 2024 · 4 comments

Comments

@Mamasodikov
Copy link
Owner

Mamasodikov commented May 21, 2024

Package ver: cosmos_epub: ^0.0.1+3

Flutter doctor:

[✓] Flutter (Channel stable, 3.13.1, on macOS 14.2.1 23C71 darwin-arm64, locale en-UZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.88.1)
E/flutter (20393): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Illegal percent encoding in URI
E/flutter (20393): #0      _Uri._uriDecode (dart:core/uri.dart:3064:11)
E/flutter (20393): #1      Uri.decodeFull (dart:core/uri.dart:1302:17)
E/flutter (20393): #2      ChapterReader.getChaptersImpl (package:epubx/src/readers/chapter_reader.dart:34:29)
E/flutter (20393): #3      ChapterReader.getChapters (package:epubx/src/readers/chapter_reader.dart:11:12)
E/flutter (20393): #4      EpubBookRef.getChapters (package:epubx/src/ref_entities/epub_book_ref.dart:56:26)
E/flutter (20393): #5      EpubReader.readBook (package:epubx/src/epub_reader.dart:92:41)
E/flutter (20393): <asynchronous suspension>
E/flutter (20393): #6      CosmosEpub.openAssetBook (package:cosmos_epub/cosmos_epub.dart:64:25)
E/flutter (20393): <asynchronous suspension>
E/flutter (20393): #7      _MyHomePageState._openEpubReader (package:cosmos_epub_example/main.dart:51:5)
E/flutter (20393): <asynchronous suspension>

Error is coming from EPUBX package.

The file:
book.epub.zip

@Mamasodikov Mamasodikov changed the title Can't open Perso-arabic script EPUB Can't open ***some*** Perso-arabic script EPUB May 21, 2024
@Mamasodikov Mamasodikov changed the title Can't open ***some*** Perso-arabic script EPUB Can't open *some* Perso-arabic script EPUB May 21, 2024
@Mamasodikov
Copy link
Owner Author

Mamasodikov commented May 21, 2024

I can't open attached book even in Books (Mac native application)
But I can open book_RTL.epub in mac with 5-6 sec delay. It strrugles.
I opened zak_LTR.epub without any problem in both viewers. I guess some books are broken or malformatted.
Maybe for they are formatted RTL (Right to LEFT)

Books:
books-LTR-and-RTL.zip

@MohammadMhadiTabatabaie
Copy link

Hello, the problem was with the original structure of the epub file

@Mamasodikov
Copy link
Owner Author

Hello, the problem was with the original structure of the epub file

Oh, I see, Anyways I should handle these exceptions.

@2803404074
Copy link

软件包版本:cosmos_epub:^0.0.1+3

颤振医生:

[✓] Flutter (Channel stable, 3.13.1, on macOS 14.2.1 23C71 darwin-arm64, locale en-UZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.88.1)
E/flutter (20393): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Illegal percent encoding in URI
E/flutter (20393): #0      _Uri._uriDecode (dart:core/uri.dart:3064:11)
E/flutter (20393): #1      Uri.decodeFull (dart:core/uri.dart:1302:17)
E/flutter (20393): #2      ChapterReader.getChaptersImpl (package:epubx/src/readers/chapter_reader.dart:34:29)
E/flutter (20393): #3      ChapterReader.getChapters (package:epubx/src/readers/chapter_reader.dart:11:12)
E/flutter (20393): #4      EpubBookRef.getChapters (package:epubx/src/ref_entities/epub_book_ref.dart:56:26)
E/flutter (20393): #5      EpubReader.readBook (package:epubx/src/epub_reader.dart:92:41)
E/flutter (20393): <asynchronous suspension>
E/flutter (20393): #6      CosmosEpub.openAssetBook (package:cosmos_epub/cosmos_epub.dart:64:25)
E/flutter (20393): <asynchronous suspension>
E/flutter (20393): #7      _MyHomePageState._openEpubReader (package:cosmos_epub_example/main.dart:51:5)
E/flutter (20393): <asynchronous suspension>

错误来自 EPUBX 包。

文件: book.epub.zip

I also encountered the same problem. Have you solved it

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