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

misleading text - [workflow_ocr] Warning: OCRmyPDF succeeded with warning(s): sh: ocrmypdf: not found #259

Open
ferdiga opened this issue Jul 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ferdiga
Copy link

ferdiga commented Jul 25, 2024

Describe the bug

instead of "succeeded" it should read "FAILED"
[workflow_ocr] Warning: OCRmyPDF FAILED with warning(s): sh: ocrmypdf: not found

this BTW happens because these packages are missing in the nextcloud-aio-nextcloud container , and I didn't find a way to permanently add these. Hence after every container update these have to be installed again.

docker exec -it nextcloud-aio-nextcloud bash -c "apk add libreoffice" # not sure that's really necessary
docker exec -it nextcloud-aio-nextcloud bash -c "apk add ocrmypdf"
docker exec -it nextcloud-aio-nextcloud bash -c "apk add tesseract-ocr"
docker exec -it nextcloud-aio-nextcloud bash -c "apk add tesseract-ocr-data-fra"
docker exec -it nextcloud-aio-nextcloud bash -c "apk add tesseract-ocr-data-deu"
docker exec -it nextcloud-aio-nextcloud bash -c "apk add tesseract-ocr-data-eng"

System

  • App version: 1.29.0
  • Nextcloud version: AIO 9.3.0
  • PHP version: [VERSION]
  • Environment: [Docker/native Apache/native PHP FPM/...]
  • ocrmypdf version: [VERSION]

How to reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots

If applicable, add screenshots to help explain your problem.

Server log

Please paste relevant content of your nextcloud.log file here. It might make sense to first decrease the Loglevel. Also, since the OCR process runs asynchronously, run your cron.php before copying the logs here.

Paste relevant server log lines here. Make sure to trim sensitive information.

Browser log

If you're observing Browser errors, please paste your developer tools logs here.

Help for Chrome: https://developer.chrome.com/docs/devtools/console/#view
Help for Firefox: https://firefox-source-docs.mozilla.org/devtools-user/browser_console/index.html

Paste your developer tools logs here. 

Additional context

Add any other context about the problem here.

@ferdiga ferdiga added the bug Something isn't working label Jul 25, 2024
@R0Wi
Copy link
Contributor

R0Wi commented Jul 27, 2024

The only reliable way of mitigating this is probably by checking the exitcode for 127 here

$exitCode = $this->command->getExitCode();

Interesting though that command->execute() obviously returns true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants