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

Cannot work on IOS version 14.4 #701

Closed
hieunguyen2211 opened this issue Dec 16, 2022 · 5 comments
Closed

Cannot work on IOS version 14.4 #701

hieunguyen2211 opened this issue Dec 16, 2022 · 5 comments

Comments

@hieunguyen2211
Copy link

hieunguyen2211 commented Dec 16, 2022

Describe the bug
After upgrading tesseract.js to version 4.0.0, it cannot work as expected on IOS version 14.4. The system throws an error, which is described below:

Unhandled Promise Rejection: RuntimeError: Aborted(CompileError: WebAssembly.Module doesn't parse at byte 11942: invalid section). Build with -sASSERTIONS for more info. (evaluating 'new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.")')

We tried to use the latest version (4.0.1) but the issue is still there.

To Reproduce
Steps to reproduce the behavior:

  1. Run tesseract.js on IOS version 14.4
  2. See the error on console tab

Expected behavior
Everything should work as expected and there is no error occurred.

Screenshots
Screen Shot 2022-12-14 at 17 15 09

Smartphone (please complete the following information):

  • Device: iPhone XR
  • OS: IOS 14.4
  • Browser: Safari, Chrome
  • Version: Safari version 14.4, Chrome version 108.0.5359.52
@hieunguyen2211
Copy link
Author

After debugging, the error is thrown when trying to use createWorker function.

@hieunguyen2211
Copy link
Author

Besides that, the error handling cannot work to catch this error. I found the root cause is that inside worker-script/index.js, the function load has not been implemented with any try-catch blocks.

Screen Shot 2022-12-16 at 14 13 33

@Balearica
Copy link
Member

Balearica commented Dec 17, 2022

Thank you for this bug report. I was able to replicate this error on iOS 14. It does not appear to occur on iOS 15 or 16. I will investigate what could be causing this.

One follow-up question: you mentioned that you updated to Tesseract.js v4. What was the version you were previously running (that presumably did not have this issue)?

Edit: This appears to have been caused by the addition of webp support (specifically, through "libwebp" library), which I believe was first introduced in version 3.

@Balearica
Copy link
Member

This should be resolved by the latest release (4.0.2). Let me know if you continue to experience this issue.

@hieunguyen2211
Copy link
Author

I used tesseract.js version 2.1.2 before upgrading to v4. Thanks a lot for considering this bug.

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

2 participants