janis91 / ocr

Nextcloud OCR (optical character recoginition) processing for images with tesseract-js
GNU Affero General Public License v3.0
107 stars 17 forks source link

Error: Failed to load TesseractCore #219

Closed dt64 closed 5 years ago

dt64 commented 5 years ago

Bug report /

Expected Behavior

should work as described

Current Behavior

failes with error message

Steps to Reproduce (for bugs)

  1. have runnning Nextcloud16 installation
  2. install app
  3. try to OCR a random pdf file
  4. failes with error message

Context

Your Environment

Logs (console output of the browser)

occ integrity:check-app ocr

janis91 commented 5 years ago

Can you give me the exact error message that is shown in the browsers console (by looking into the developer console of the browser). I know that the integrity check will lead to an error at the moment, but this shouldn't be the cause of the error actually.

dt64 commented 5 years ago

there is a popup saying: "Texterkennung: Texterkennung fehlgeschlagen: Ein unerwarteter Fehler trat bei der Verarbeitung durch Tesseract auf. " there is nothing in the log but: {"reqId":"WdMvB7ZAUUWpTL7Y2aMr","level":0,"time":"2019-09-09T12:13:58+02:00","remoteAddr":"217.71..","user":"dt64","app":"ocr","method":"GET","url":"\/apps\/ocr\/api\/personal\/languages","message":"Get favorite languages for user: dt64: ","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko\/20100101 Firefox\/52.0","version":"16.0.4.1"}

browser console says: An error occured in OCR. Error: Ein unerwarteter Fehler trat bei der Verarbeitung durch Tesseract auf. Stack-Trace: t.OcrError<@https://domain.de/apps/ocr/js/app.js?v=d0c6f3ee-4:1:10730 t.TesseractError<@https://domain.de/apps/ocr/js/app.js?v=d0c6f3ee-4:8:23166 c/this.process/<@https://domain.de/apps/ocr/js/app.js?v=d0c6f3ee-4:8:21873 c@https://domain.de/apps/ocr/js/app.js?v=d0c6f3ee-4:8:21273 H/</o@https://domain.de/core/js/dist/main.js?v=d0c6f3ee-4:230:27381 H/<@https://domain.de/core/js/dist/main.js?v=d0c6f3ee-4:230:27526 e.exports/u@https://domain.de/core/js/dist/main.js?v=d0c6f3ee-4:235:77644 Error: Failed to load TesseractCore

janis91 commented 5 years ago

Btw. Now with version 4.4.1 the Signature data not found message should not be displayed anymore. But the wrong behavior should still be there, actually. Can you confirm this?

janis91 commented 5 years ago

Can you also provide your Firefox browser version? And (maybe in private / via email) the domain or details about the requests (in the network tab) the with regards to the search keyword 'tesseract'. Are there failing requests or something like that?

dt64 commented 5 years ago

right, seems to be dependent on browser. tried again with Chrome Version 64.0.3282.186 -> works fine. tried with Firefox ESR 52.9.0 -> failed.

and you have mail with more details

dt64 commented 5 years ago

"Btw. Now with version 4.4.1 the Signature data not found message should not be displayed anymore. But the wrong behavior should still be there, actually. Can you confirm this?"

confirmed

janis91 commented 5 years ago

So it seems like, Firefox ESR v52 DOES support all the things (Service Workers, WebAssembly, maybe even multi-process architecture is required by ocr), BUT it has to be enabled explicitly in about:config.

Here is a german explanation: https://www.soeren-hentzschel.at/firefox/alle-unterschiede-zwischen-firefox-52-und-firefox-esr-52/

(Can be translated into english with deepl for example)

@dt64 Could you try this please? I don‘t have an ESR version available at the moment.

dt64 commented 5 years ago

enabling Service Workers and WebAssembly in FF52ESR doesn't fix the issue but changes the behaviour. The process is reported to start by the spinner but seems to get stuck immediately. can't test with multi-process architecture enabled since that would break my installation. Would need a test environment for it :(

janis91 commented 5 years ago

Sorry that I'm not able to test this at the moment, maybe I will be at a later point in time, but I think the main cause of the problem is identified already (Firefox ESR), newer versions or another browser like Chrome will help out here. Thank you for your testing