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

"Exception":"ImagickException","Message":"NoDecodeDelegateForThisImageFormat `PDF' @ error/constitute.c/ReadImage/572","Code":420 #35

Open
ReinerNippes opened this issue Jan 6, 2021 · 0 comments

Comments

@ReinerNippes
Copy link

Just tried to test my playbook to setup up NC20 and files_fulltextsearch / files_fulltextsearch_tesseract. During the task: docker exec --user www-data nextcloud php occ fulltextsearch:index I'm getting the following error message. This happens during indexing the file Documents/Nextcloud flyer.pdf

    An unhandled exception has been thrown:
    Error: Call to a member function getContent() on string in /var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php:719
    Stack trace:
    #0 /var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php(658): OCA\Files_FullTextSearch\Service\FilesService->updateContentFromFile('*** sensitive p...', Object(OC\Files\Node\File))
    #1 /var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php(638): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocumentFromFile(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
    #2 /var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php(529): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
    #3 /var/www/html/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(268): OCA\Files_FullTextSearch\Service\FilesService->generateDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
    #4 /var/www/html/apps/fulltextsearch/lib/Service/IndexService.php(317): OCA\Files_FullTextSearch\Provider\FilesProvider->fillIndexDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
    #5 /var/www/html/apps/fulltextsearch/lib/Service/IndexService.php(204): OCA\FullTextSearch\Service\IndexService->indexDocuments(Object(OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array, Object(OCA\FullTextSearch\Model\IndexOptions))
    #6 /var/www/html/apps/fulltextsearch/lib/Command/Index.php(410): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), 'admin', Object(OCA\FullTextSearch\Model\IndexOptions))
    #7 /var/www/html/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\IndexOptions))
    #8 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #9 /var/www/html/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #10 /var/www/html/3rdparty/symfony/console/Application.php(1000): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #11 /var/www/html/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Index), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #12 /var/www/html/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #13 /var/www/html/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #14 /var/www/html/console.php(100): OC\Console\Application->run()
    #15 /var/www/html/occ(11): require_once('/var/www/html/c...')
    #16 {main}
  stdout_lines: <omitted>

in the logs I found the following entry:

{"reqId":"UmZIrh7qxXLxJzh3Bbam","level":1,"time":"2021-01-06T20:42:25+00:00","remoteAddr":"","user":"--","app":"files_fulltextsearch_tesseract","method":"","url":"--","message":{"Exception":"ImagickException","Message":"NoDecodeDelegateForThisImageFormat `PDF' @ error/constitute.c/ReadImage/572","Code":420,"Trace":[{"file":"/var/www/html/apps/files_fulltextsearch_tesseract/vendor/spatie/pdf-to-image/src/Pdf.php","line":40,"function":"pingimage","class":"Imagick","type":"->","args":["/var/nc-data/admin/files/Documents/Nextcloud flyer.pdf"]},{"file":"/var/www/html/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":249,"function":"__construct","class":"Spatie\\PdfToImage\\Pdf","type":"->","args":["/var/nc-data/admin/files/Documents/Nextcloud flyer.pdf"]},{"file":"/var/www/html/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":165,"function":"ocrPdf","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":121,"function":"extractContentUsingTesseractOCR","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/apps/files_fulltextsearch_tesseract/lib/Listeners/GenericListener.php","line":84,"function":"onFileIndexing","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->","args":[{"__class__":"OCP\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\Files_FullTextSearch_Tesseract\\Listeners\\GenericListener","type":"->","args":[{"__class__":"OCP\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OCP\\EventDispatcher\\GenericEvent"},"OCP\\EventDispatcher\\GenericEvent",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"}],"OCP\\EventDispatcher\\GenericEvent",{"__class__":"OCP\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\EventDispatcher\\GenericEvent"},"OCP\\EventDispatcher\\GenericEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\EventDispatcher\\GenericEvent",{"__class__":"OCP\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Service/ExtensionService.php","line":123,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Service/ExtensionService.php","line":90,"function":"dispatch","class":"OCA\\Files_FullTextSearch\\Service\\ExtensionService","type":"->","args":["Files_FullTextSearch.onFileIndexing",{"file":"*** sensitive parameter replaced ***","document":"*** sensitive parameter replaced ***"}]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php","line":713,"function":"fileIndexing","class":"OCA\\Files_FullTextSearch\\Service\\ExtensionService","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php","line":658,"function":"updateContentFromFile","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php","line":638,"function":"updateFilesDocumentFromFile","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Service/FilesService.php","line":529,"function":"updateFilesDocument","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_fulltextsearch/lib/Provider/FilesProvider.php","line":268,"function":"generateDocument","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameter replaced ***"]},{"file":"/var/www/html/apps/fulltextsearch/lib/Service/IndexService.php","line":317,"function":"fillIndexDocument","class":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider","type":"->","args":["*** sensitive parameter replaced ***"]},{"file":"/var/www/html/apps/fulltextsearch/lib/Service/IndexService.php","line":204,"function":"indexDocuments","class":"OCA\\FullTextSearch\\Service\\IndexService","type":"->","args":[{"__class__":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"},{"__class__":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider"},[],{"__class__":"OCA\\FullTextSearch\\Model\\IndexOptions"}]},{"file":"/var/www/html/apps/fulltextsearch/lib/Command/Index.php","line":410,"function":"indexProviderContentFromUser","class":"OCA\\FullTextSearch\\Service\\IndexService","type":"->","args":[{"__class__":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"},{"__class__":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider"},"admin",{"__class__":"OCA\\FullTextSearch\\Model\\IndexOptions"}]},{"file":"/var/www/html/apps/fulltextsearch/lib/Command/Index.php","line":273,"function":"indexProvider","class":"OCA\\FullTextSearch\\Command\\Index","type":"->","args":[{"__class__":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider"},{"__class__":"OCA\\FullTextSearch\\Model\\IndexOptions"}]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\FullTextSearch\\Command\\Index","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/core/Command/Base.php","line":169,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1000,"function":"run","class":"OC\\Core\\Command\\Base","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":271,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OCA\\FullTextSearch\\Command\\Index"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":147,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/apps/files_fulltextsearch_tesseract/vendor/spatie/pdf-to-image/src/Pdf.php","Line":40,"CustomMessage":"{\"document\":{\"id\":\"19\",\"providerId\":\"files\",\"access\":{\"ownerId\":\"admin\",\"viewerId\":\"\",\"users\":[],\"groups\":[],\"circles\":[],\"links\":[]},\"modifiedTime\":1609965688,\"title\":\"Documents\\/Nextcloud flyer.pdf\",\"link\":\"\",\"index\":{\"ownerId\":\"\",\"providerId\":\"files\",\"source\":\"files_local\",\"documentId\":\"19\",\"lastIndex\":1609965745,\"errors\":[],\"errorCount\":0,\"status\":28,\"options\":{\"_files_pdf\":\"1\",\"_files_local\":\"1\"}},\"source\":\"files_local\",\"info\":{\"share_names\":{\"admin\":\"Documents\\/Nextcloud flyer.pdf\"}},\"hash\":\"\",\"contentSize\":498680,\"tags\":[],\"metatags\":[],\"subtags\":[],\"more\":[],\"excerpts\":[],\"score\":\"\"}}"},"userAgent":"--","version":"20.0.4.0"}

This happens with elasticsearch:7.6.2 and 7.9.3.

BTW: elasticsearch:7.10.1 doesn't build at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant