nextcloud / nextcloud/fulltextsearch
TypeError: Argument 1 passed to OCA\Files_FullTextSearch\Model\FilesDocument::setOwnerId() must be of the type string
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 234
- Forks
- 64
- Avg merge
- 6h 18m
- Merged PRs (30d)
- 10
Description
Okay,
I open an other Ticket. I get this message when trying to index my files.
Nextcloud 15.0.0
PHP 7.2
Ubuntu 18.04
Nginx
An unhandled exception has been thrown:
TypeError: Argument 1 passed to OCA\Files_FullTextSearch\Model\FilesDocument::setOwnerId() must be of the type string, boolean given, called in /var/www/cloud/apps/files_fulltextsearch/lib/Service/FilesService.php on line 289 and defined in /var/www/cloud/apps/files_fulltextsearch/lib/Model/FilesDocument.php:70
Stack trace:
#0 /var/www/cloud/apps/files_fulltextsearch/lib/Service/FilesService.php(289): OCA\Files_FullTextSearch\Model\FilesDocument->setOwnerId(false)
#1 /var/www/cloud/apps/files_fulltextsearch/lib/Service/FilesService.php(247): OCA\Files_FullTextSearch\Service\FilesService->generateFilesDocumentFromFile('Lars', Object(OC\Files\Node\Folder))
#2 /var/www/cloud/apps/files_fulltextsearch/lib/Service/FilesService.php(188): OCA\Files_FullTextSearch\Service\FilesService->getFilesFromDirectory('Lars', Object(OC\Files\Node\Folder))
#3 /var/www/cloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(228): OCA\Files_FullTextSearch\Service\FilesService->getFilesFromUser('Lars', Object(OCA\FullTextSearch\Model\IndexOptions))
#4 /var/www/cloud/apps/fulltextsearch/lib/Service/IndexService.php(179): OCA\Files_FullTextSearch\Provider\FilesProvider->generateIndexableDocuments('Lars')
#5 /var/www/cloud/apps/fulltextsearch/lib/Command/Index.php(407): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), 'Lars', Object(OCA\FullTextSearch\Model\IndexOptions))
#6 /var/www/cloud/apps/fulltextsearch/lib/Command/Index.php(271): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\IndexOptions))
#7 /var/www/cloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/cloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/cloud/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/cloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Index), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/cloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/cloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/cloud/console.php(96): OC\Console\Application->run()
#14 /var/www/cloud/occ(11): require_once('/var/www/cloud/...')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at FilesService.php line 289, where generateFilesDocumentFromFile calls FilesDocument::setOwnerId, and inspect the method definition at FilesDocument.php line 70. Reproduce the failure through the indexing entry point shown in the stack trace and trace why a boolean reaches setOwnerId; done means file indexing completes without this TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100