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

occ fulltextsearch:index throws exception: OCA\Files_FullTextSearch\Service\ExternalFilesService::getExternalMountById() must be of the type integer, null given #538

Open
herrep opened this issue Aug 29, 2019 · 1 comment

Comments

@herrep
Copy link

herrep commented Aug 29, 2019

Hi,

I run Nextcloud 16.0.4 with Fulltextsearch 1.3.6. When executing occ fulltextsearch:index for the first time to build an index, I fail with index completion as an exception is thrown during building the index.

This is the last output from building the index:

Options: []
Memory: 541 MB
┌─ Indexing ────
│ Action: compareWithCurrentIndex
│ Provider: Files Account:
│ Document: 4792039
│ Info: //
│ Title:
│ Content size:
│ Chunk: 30/63
│ Progress: 56000/56947
└──
┌─ Results ────
│ Result: 8/8
│ Index: files:3426838
│ Status: ok
│ Message: {"_index":"nextcloud","_type":"standard","_id":"files:3426838","_version":1,"result":"noop"
│ ,"_shards":{"total":0,"successful":0,"failed":0}}

└──
┌─ Errors ────
│ Error: 8165/8165
│ Index: files:98555
│ Exception: Elasticsearch\Common\Exceptions\ServerErrorResponseException
│ Message: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: 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

From this state, occ fulltextsearch:index stopped execution:

An unhandled exception has been thrown: TypeError: Argument 1 passed to OCA\Files_FullTextSearch\Service\ExternalFilesService::getExternalMountById() must be of the type integer, null given, called in /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/ExternalFilesService.php on line 244 and defined in /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/ExternalFilesService.php:258 Stack trace: #0 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/ExternalFilesService.php(244): OCA\Files_FullTextSearch\Service\ExternalFilesService->getExternalMountById(NULL) #1 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/ExternalFilesService.php(156): OCA\Files_FullTextSearch\Service\ExternalFilesService->getMountPoint(Object(OC\Files\Node\Folder)) #2 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(423): OCA\Files_FullTextSearch\Service\ExternalFilesService->getFileSource(Object(OC\Files\Node\Folder), '') #3 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(382): OCA\Files_FullTextSearch\Service\FilesService->getFileSource(Object(OC\Files\Node\Folder)) #4 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(359): OCA\Files_FullTextSearch\Service\FilesService->generateFilesDocumentFromFile('<user>', Object(OC\Files\Node\Folder)) #5 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(260): OCA\Files_FullTextSearch\Service\FilesService->generateFilesDocumentFromParent('<user>', Object(OC\Files\Node\Folder)) #6 /var/www/html/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(254): OCA\Files_FullTextSearch\Service\FilesService->getFilesFromUser('<user>', '/<user>...') #7 /var/www/html/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(193): OCA\Files_FullTextSearch\Provider\FilesProvider->generateIndexableDocuments('<user>', '/<user>...') #8 /var/www/html/nextcloud/apps/fulltextsearch/lib/Command/Index.php(409): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), '<user>', Object(OCA\FullTextSearch\Model\IndexOptions)) #9 /var/www/html/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\IndexOptions)) #10 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Index), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/nextcloud/console.php(97): OC\Console\Application->run() #17 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')

Thanks for your your support!

Best regards,
Peter

@GammaPi
Copy link

GammaPi commented Sep 8, 2019

We both have the same issue. I'm trying a quick and dirty fix.

nextcloud/files_fulltextsearch#79

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

2 participants