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

OCR is not working, Context menu shows no entry #10746

Closed
TobyEU opened this issue Jul 14, 2024 · 7 comments · Fixed by #10842
Closed

OCR is not working, Context menu shows no entry #10746

TobyEU opened this issue Jul 14, 2024 · 7 comments · Fixed by #10842
Labels
bug It's a bug

Comments

@TobyEU
Copy link

TobyEU commented Jul 14, 2024

Operating system

Linux

Joplin version

3.0.13 (prod, linux)

Desktop version info

Joplin 3.0.13 (prod, linux)

Client-ID: 2931d45f8e164a75959fc7290f6eab2f
Sync-Version: 3
Profil-Version: 47
Unterstützter Schlüsselbund: Nein

Revision: 599cf5b

Backup: 1.4.1
Delete unlinked resources: 1.0.0
Freehand Drawing: 2.11.0
Markdown table calculations: 1.0.5
Markdown Table: Sortable: 1.2.2
Paste Special: 1.1.2

Current behaviour

  1. GUI language is German
  2. Adding a attachment e. g. png (screenshot with readable text, not handwritten) to a note
  3. Waiting a short time
  4. Try to view OCR text via new context menu entry on attachment (8bdec4c)
  5. Context menu shows: Open, Save as, Show file in directory, copy path, copy image (but due to language setting in German).
  6. Try to search for text on screenshot

Annotation:
Notes will be synchronized to WebDav. Other client is Android device. Joplin is in use still 2.x.
I'd had the feeling that the OCR wasn't working in the past, but now I can really check via the context menu, that something is wrong (now entry in context menu). Does anybody have an idea what is wrong?

Expected behaviour

  1. File should be processed via OCR
  2. Text should be searchable
  3. OCR-Text should be visible via new context menu or message, that there is no text. Entry like:
    grafik

Logs

21:52:27: OcrService: Starting background service...
node:internal/process/task_queues:95 21:52:27: OcrService: Found 0 resources to process...
/tmp/.mount_JoplincMeLTN/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 21:52:27: OcrService: 0 resources have been processed.
node:internal/process/task_queues:95 21:57:27: OcrService: Found 0 resources to process...
/tmp/.mount_JoplincMeLTN/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 21:57:27: OcrService: 0 resources have been processed.
/tmp/.mount_JoplincMeLTN/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 22:02:27: OcrService: Found 0 resources to process...
/tmp/.mount_JoplincMeLTN/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 22:02:27: OcrService: 0 resources have been processed.
node:internal/process/task_queues:95 22:07:08: OcrService: Found 1 resources to process...
node:internal/process/task_queues:95 22:07:27: OcrService: Found 1 resources to process...
node:internal/process/task_queues:95 22:12:27: OcrService: Found 1 resources to process...

/tmp/.mount_JoplincM…lib/TaskQueue.js:48 Uncaught (in promise) Error: Cannot push task when queue is stopping
at TaskQueue.push (/tmp/.mount_JoplincM…/TaskQueue.js:48:19)
at TaskQueue. (/tmp/.mount_JoplincM…/TaskQueue.js:60:18)
at Generator.next ()
at fulfilled (/tmp/.mount_JoplincM…b/TaskQueue.js:5:58)
node:internal/process/task_queues:95 22:17:27: OcrService: Found 1 resources to process...
/tmp/.mount_JoplincM…lib/TaskQueue.js:48 Uncaught (in promise) Error: Cannot push task when queue is stopping
at TaskQueue.push (/tmp/.mount_JoplincM…/TaskQueue.js:48:19)
at TaskQueue. (/tmp/.mount_JoplincM…/TaskQueue.js:60:18)
at Generator.next ()
at fulfilled (/tmp/.mount_JoplincM…b/TaskQueue.js:5:58)
node:internal/process/task_queues:95 22:22:27: OcrService: Found 1 resources to process...
/tmp/.mount_JoplincM…lib/TaskQueue.js:48 Uncaught (in promise) Error: Cannot push task when queue is stopping
at TaskQueue.push (/tmp/.mount_JoplincM…/TaskQueue.js:48:19)
at TaskQueue. (/tmp/.mount_JoplincM…/TaskQueue.js:60:18)
at Generator.next ()
at fulfilled (/tmp/.mount_JoplincM…b/TaskQueue.js:5:58)

@TobyEU TobyEU added the bug It's a bug label Jul 14, 2024
@laurent22
Copy link
Owner

Could you restart the app and share the log again? I think the messages you have happen when you disable then quickly enable OCR again

@TobyEU
Copy link
Author

TobyEU commented Jul 17, 2024

@laurent22 thanks for investigating.
I've just played around with ticking OCR on and off and also restart the application.
Good story: OCR is generally working now :).

In which view the context menu with "View OCR text" should appear (after right-clicking the image)? I'm always using the split view and neither in the editor nor in the view panel it's working. The context menu in the rich text editor is also not showing the context menu entry.

How should the search regarding OCR text and identifying the attachments should work? Searching in the note (ctrl+F) is not working, but the "general" search is working.
In the note:
grafik
General:
grafik

OCR:
14:47:05: OcrService: Found 1 resources to process... /tmp/.mount_JoplinFVXfNG/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 14:47:05: OcrService: Processing resource 1 / 1: 972fccbf454a4cba95a32d67aa7791bd (type image/png)... /tmp/.mount_JoplinFVXfNG/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 14:47:05: OcrDriverTesseract: Created worker: 1

Context menu:
Got ipc-message: contextMenu {type: 'image', resourceId: 'cd1bf330153b4f2ca140040b68e4b8c2'}

@laurent22
Copy link
Owner

It's used in general search only. And right-clicking the image should show the menu item

@TobyEU
Copy link
Author

TobyEU commented Jul 17, 2024

The menu entry item isn't appearing (and also no message box). Based on general search I know, that there was OCR text identified.
Also switching app language from German to English doesn't help. Log isn't helpful I guess.
Any hints want I can do to track down the issue?

Btw: Could the search be extended to note search or are there any reasons not doing that?

Log:
Got ipc-message: contextMenu {type: 'image', resourceId: '3d13478b8624473ba66b8be68e524dd6'}

@JackGruber
Copy link
Contributor

Possible you try it on a image?

For a an Resource Link like over the PDF preview or on a image link the View OCR text is working, but not directly on the PDF/Images

Clicked on the Link:
image

Clicked on the Image:
image

@TobyEU
Copy link
Author

TobyEU commented Jul 19, 2024

Possible you try it on a image?

For a an Resource Link like over the PDF preview or on a image link the View OCR text is working, but not directly on the PDF/Images

Clicked on the Link: image

Clicked on the Image: image

Woah, that is the trick. Now it's feeling a little bit embarrassing for creating the ticket. But honestly I've never used the link feature, I'm always pasting the images, pdfs, directly in the note.
Is there any reason to limit the "view ocr data" to the link? Could it be also applicable when right-clicking directly on the image?

@JackGruber
Copy link
Contributor

I think this could be classified as a bug, because you can't get the text of OCR images that are displayed and not included as link only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
3 participants