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
When the "corePath" or the "workerPath" cannot be downloaded, there is no way to catch the error #528
Comments
Why have none of the contributors responded to this? |
I looked into why an invalid tesseract.js/src/worker/browser/spawnWorker.js Lines 10 to 14 in b419e45
|
I worked on this further, and unfortunately I think the issue (specifically with an invalid |
Closing as this should be resolved in Version 4. |
I want to use the library offline. I followed the tutorial in documentation, configured
corePath
andworkerPath
, which lead to JS files deployed locally and they are pre-cached by PWA. So normally, in production, they work. But when I have the application started locally and I simulate the offline state browser's dev tools, it tries to access the JS files via a localhost URL, which doesn't work because of the offline mode and PWA is off for localhost. That's quite understandable, but the problem is that I cannot figure out a way to catch this error and react to it. It seems to happen somewhere between thecreateWorker
call and theworker.load()
in the background - somewhere inside of the tesseract library. So no matter what I wrap with catch or if I call catch on the promise coming from theload
, it doesn't catch this problem.It seems kinda strange to me that I cannot react in any way to such a basic and common error - not being able to download the worker scripts.
The text was updated successfully, but these errors were encountered: