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

epubs not loaded due to xhtml error in epub or webview #1

Open
jaded0 opened this issue Feb 10, 2022 · 1 comment
Open

epubs not loaded due to xhtml error in epub or webview #1

jaded0 opened this issue Feb 10, 2022 · 1 comment

Comments

@jaded0
Copy link

jaded0 commented Feb 10, 2022

my code:
String otherpath = '${(await _filePath)}/otherepub.epub'; ByteData data = await rootBundle.load("assets/frank.epub"); List<int> bytes = data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes); await File(otherpath).writeAsBytes(bytes); Navigator.push(context, MaterialPageRoute(builder: (context) => EpubScreen.fromPath(filePath: otherpath)));

Webpage not available
net:ERR_CLEARTEXT_NOT_PERMITTED

is shown on the app.

I/chromium(10556): [INFO:CONSOLE(1)] "Uncaught ReferenceError: xpub is not defined", source: chrome-error://chromewebdata/ (1)

is the error code showing on the android studio console.

@jaded0
Copy link
Author

jaded0 commented Feb 10, 2022

The current workaround is that the widget user must put android:usesCleartextTraffic="true" in their AndroidManifest.xml.

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

1 participant