-
Notifications
You must be signed in to change notification settings - Fork 6
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
FreeBSD Support? #215
Comments
Hi, the app uses
Could you check if you can execute this command manually on your backend? Also would it be possible for you to share some Nextcloud logs after you opened the settings page and tried to configure the appropriate languages? Otherwise it will be quite hard for us to tell where the error comes from. Could you also tell us which version (Nextcloud + app) you're using? We had something similar in #184 |
I ran tesseract --list-langs in the jail and got the output showing in the screenshot, I also went ahead and read the attached nextcloud.log and it seems the vast majority was some antivirus errors because I admittedly haven't fully setup. My Nextcloud is running version 27.0.0 and the app is running version 1.27.1. |
Thanks for your fast feedback! I'd say that from a backend perspective everything looks good. I could only imagine that you're facing a frontend issue with the OCR workflow settings UI. To check that you should open your browsers devtools if possible. After that, please browse to the settings UI and try to open the languages dropdown. If there is an error in the frontend code, it should show up in the console tab. Please share your results here afterwards. Btw: the OCR workflow should also work fine without a language set, even though the result might not be as accurate. |
Yes it indeed seems that the API endpoint which delivers the installed languages ( The app itself delivers all Javascripts it needs so there shouldn't be a need of anything else. The 404 errors is only complaining about missing source map files. You don't need them, they're just needed for development. Could you try to directly browse to |
Might be a duplicate of #183 |
Going to https://192.168.1.40/apps/workflow_ocr/ocrBackendInfo/installesLangs directly gives a page not found error with the following console log. 00:00","remoteAddr":"192.168.1.10","user":"DecusAnima","app":"encryption","method":"GET","url":"/apps/workflow_ocr/ocrBackendInfo/installedLangs","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36","version":"27.0.0.8","data":{"app":"encryption"}} |
Sorry I had a typo in my url, I meant https://192.168.1.40/apps/workflow_ocr/ocrBackendInfo/installedLangs. You can also copy the url directly from your browser console where you got the 500 error. |
Seemed to have found the issue, going to the corrected link gives a CSRF check fail, wouldn't know if this has to do with OCR workflow or Tesseract though. |
Ah sorry I think directly calling the endpoint is not possible due to the automatic CSRF check. If you're on the settings page and open the devtools, could you please try to query the following in the $.get('https://192.168.1.40/index.php/apps/workflow_ocr/ocrBackendInfo/installedLangs').then(res=>console.log(res)) I'd like to get more information on the 500 server error, either through the logs or through the frontend |
Logs still seems to only show the /appinfo/app.php deprecation when referencing the https://192.168.1.40/index.php/apps/workflow_ocr/ocrBackendInfo/installedLangs pull |
It has to be a really "hard" error if it's not logged in the What does the following give you? $.get('https://192.168.1.40/index.php/apps/workflow_ocr/ocrBackendInfo/installedLangs').error(res=>console.log(res.responseText)).then(res=>console.log(res)) This should log the returned HTML page the server gives you |
Ok I think we're getting closer. Usually the error message "The command 'tesseract --list-langs' produced an error: Exited abnormally with exit-code 127 ..." should show up in the UI, that might be a bug. But what this is telling us is that the user which runs the PHP or webserver-process (most likely To reproduce the behaviour, login to your box and do something like Maybe also have a look at #203 where we had a similar problem. |
Wow, after a few hours of messing with permissions and pathing, I finally got it. I guess the issue did indeed stem from where FreeBSD set the PATH variables, I had to dig through some forums to find how to add new commands to the list but afterwards the languages popped up. Thank you for guiding me through this. |
Glad to help! I think you're facing the same issue like mentioned here: #41 Btw: if you provide the full solution on how you fixed the error, I'd be happy to but some notes into the README. |
Yeah I found the resolution for the above error quickly with the mentioned issue, thanks again. For a full solution regarding this error, apparently it has to do with the user running the php and/or web programs for Nextcloud not having the path for tesseract commands. In my case the bin for tesseract was in /usr/local/bin. FreeBSD has a command for routing a new command path 'chsh' (e.g. chsh -s /usr/local/bin/tesseract). |
I recently attempted to install this workflow into a TrueNAS Core jail of Nextcloud. However while I did follow the installation of OCRmyPDF as well as Tesseract the language list of the flow on my Nextcloud site remains empty.
I imagine this is due to Workflow OCR looking for these apps in where a Linux machine would typically have these programs installed, and TrueNAS Core is FreeBSD. I was curious if you could confirm this, and there is a way for me to get it to get Workflow OCR to see my OCRmyPDF installation in the jail.
I should mention that both Tesseract and OCRmyPDF seem to be properly installed as I can run their commands manually through the shell and get outputs.
The text was updated successfully, but these errors were encountered: