nextcloud / fulltextsearch

🔍 Core of the full-text search framework for Nextcloud
GNU Affero General Public License v3.0
209 stars 50 forks source link

An unhandled exception has been thrown: #591

Open jonathanmmm opened 3 years ago

jonathanmmm commented 3 years ago

Hi,

I use nextcloud 19.0.4 Php 7.4 nginx Debian 10 (OMV 5) Elasticsearch 7.10.0 (via Docker, same problem happened with 6.x. and 7.x without docker). Nextcloud Apps (only tell the one I think could be usefull to know to find the issue): Full text search 1.4.2 Full text search - Elasticsearch Platform 1.5.2 Full text search - Files 1.4.3 Group Folder 7.1.1 External Storage Support 1.10.0

I have multiple Shared Folders and two big SMB folders (hosted on same server).

I think the Search Feature is a great step in the right direction for the nextcloud platform and I would like use it, but it just crashes again and again. I am glad for any help :)

The crash happened after an .ods file in a group folder (this time, don't know the other ones).

Memory: 129 MB
┌─ Indexing  ────
│ Action: indexDocument
│ Provider: Files                Account: someusername
│ Document: 605513
│ Info: application/vnd.oasis.opendocument.spreadsheet
│ Title: Group Share/IMPORTANT_DOCUMENT/Excel-Files/ListeBücher.ods
│ Content size: 4311292
│ Chunk:    139/166
│ Progress:    217/2438
└──
┌─ Results ────
│ Result:  84688/84688
│ Index: files:605507
│ Status: ok
│ Message: {"_index":"nextcloud_index","_type":"standard","_id":"files:605507","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed"
│ :0},"_seq_no":84050,"_primary_term":1}
│
└──
┌─ Errors ────
│ Error:    629/629
│ Index: files:605508
│ Exception: Elasticsearch\Common\Exceptions\BadRequest400Exception
│ Message: field [content] not present as part of path [attachment.content]
│
│
└──
## x:first result ## c/v:prec/next result ## b:last result
## f:first error ## h/j:prec/next error ## d:delete error ## l:last error
## q:quit ## p:pause
An unhandled exception has been thrown:
TypeError: Return value of OCA\FullTextSearch_ElasticSearch\Service\IndexMappingService::indexDocumentNew() must be of the type array, string returned in /var/www/nextcloud/apps/fulltextsearch_elasticsearch/lib/Service/IndexMappingService.php:89
Stack trace:
#0 /var/www/nextcloud/apps/fulltextsearch_elasticsearch/lib/Service/IndexService.php(197): OCA\FullTextSearch_ElasticSearch\Service\IndexMappingService->indexDocumentNew()
#1 /var/www/nextcloud/apps/fulltextsearch_elasticsearch/lib/Platform/ElasticSearchPlatform.php(222): OCA\FullTextSearch_ElasticSearch\Service\IndexService->indexDocument()
#2 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(375): OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform->indexDocument()
#3 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(326): OCA\FullTextSearch\Service\IndexService->indexDocument()
#4 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(204): OCA\FullTextSearch\Service\IndexService->indexDocuments()
#5 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(409): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser()
#6 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider()
#7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute()
#8 /var/www/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1012): OC\Core\Command\Base->run()
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun()
#12 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#13 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#14 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

The docker container (and before the non docker container) crashed/stopped. I had to start them again. Then I entered:

sudo -u www-data php7.4 /var/www/nextcloud/occ fulltextsearch:stop
sudo -u www-data php7.4 /var/www/nextcloud/occ fulltextsearch:index

And I just saw the indexing got to this specific file but continued so it shoulnd't be a problem that this file is corrupt.

My config in Nextcloud is:

image image

Don't know what to do, uninstalled all full text search apps and reinstalled them, put the whole thing in Docker.

fourstepper commented 3 years ago

I am seeing something similar -

[root@nc ~]# rpm -qa | grep elastic
elasticsearch-7.9.2-1.x86_64
An unhandled exception has been thrown:
TypeError: Return value of OCA\FullTextSearch_ElasticSearch\Service\IndexMappingService::indexDocumentNew() must be of the type array, string returned in /var/www/html/nextcloud/apps/fulltextsearch_elasticsearch/lib/Service/IndexMappingService.php:89
Stack trace:
#0 /var/www/html/nextcloud/apps/fulltextsearch_elasticsearch/lib/Service/IndexService.php(197): OCA\FullTextSearch_ElasticSearch\Service\IndexMappingService->indexDocumentNew()
#1 /var/www/html/nextcloud/apps/fulltextsearch_elasticsearch/lib/Platform/ElasticSearchPlatform.php(222): OCA\FullTextSearch_ElasticSearch\Service\IndexService->indexDocument()
#2 /var/www/html/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(375): OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform->indexDocument()
#3 /var/www/html/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(326): OCA\FullTextSearch\Service\IndexService->indexDocument()
#4 /var/www/html/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(204): OCA\FullTextSearch\Service\IndexService->indexDocuments()
#5 /var/www/html/nextcloud/apps/fulltextsearch/lib/Command/Index.php(409): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser()
#6 /var/www/html/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider()
#7 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute()
#8 /var/www/html/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#9 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(1000): OC\Core\Command\Base->run()
#10 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun()
#12 /var/www/html/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#13 /var/www/html/nextcloud/console.php(100): OC\Console\Application->run()
#14 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
charismeki commented 3 years ago

Hi there, I am having the same output after occ:fulltextsearch:index . Have you found any solution? Best