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

ES5 error in Capacitor 2.4.6/Stencil 2.0.3 environment #37

Open
bitflower opened this issue Feb 3, 2021 · 2 comments
Open

ES5 error in Capacitor 2.4.6/Stencil 2.0.3 environment #37

bitflower opened this issue Feb 3, 2021 · 2 comments

Comments

@bitflower
Copy link

Hey guys,

upgraded an app that uses your pdf-viewer. On Android I'm getting this in the dev console:

viewer.html:1 Uncaught (in promise) 
UnknownErrorException {message: "The browser/environment lacks native support for c…ed`); please use an ES5-compatible build instead.", name: "UnknownErrorException", details: "Error: The browser/environment lacks native suppor…ed`); please use an ES5-compatible build instead."}
details: "Error: The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream` and/or `Promise.allSettled`); please use an ES5-compatible build instead."
message: "The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream` and/or `Promise.allSettled`); please use an ES5-compatible build instead."
name: "UnknownErrorException"
__proto__: Error

In the component it shows:
image

Continues to work on ios as it did on Android the last year with Capacitor 1.5.

Should I maybe add ES5 build to my output?

@bitflower
Copy link
Author

Root cause: mozilla/pdf.js#12490 (comment)

@bitflower
Copy link
Author

It's Promise.allSettled not being defined inside the iFrame in my Capacitor web view.

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