nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch_elasticsearch
GNU Affero General Public License v3.0
81 stars 30 forks source link

"TypeError: Return value of OCA\Files_FullTextSearch\Model\MountPoint::isGlobal() must be of the type bool" #147

Closed angcar closed 3 years ago

angcar commented 3 years ago

Dear support & community,

We have the full file indexing plugins along with ElasticSearch but it has stopped working properly.

Initially, the elasticsearch and nextcloud-fulltext-elasticsearch-worker services were down, I pulled them up and it was still not working.

The next task I did was to reset the indexes, as this had worked for me on a previous occasion:

sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:stop
sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:reset
sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:index

But I received the following error:

An unhandled exception has been thrown:
TypeError: Return value of OCA\Files_FullTextSearch\Model\MountPoint::isGlobal() must be of the type bool, null returned in /var/www/nextcloud/apps/files_fulltextsearch/lib/Model/MountPoint.php:103
Stack trace:
#0 /var/www/nextcloud/apps/files_fulltextsearch/lib/Model/MountPoint.php(175): OCA\Files_FullTextSearch\Model\MountPoint->isGlobal()
#1 [internal function]: OCA\Files_FullTextSearch\Model\MountPoint->jsonSerialize()
#2 /var/www/nextcloud/apps/files_fulltextsearch/lib/TNC22Logger.php(193): json_encode(Array)
#3 /var/www/nextcloud/apps/files_fulltextsearch/lib/TNC22Logger.php(178): OCA\Files_FullTextSearch\Service\GroupFoldersService->log(0, '[debug] initGro...', false, Array)
#4 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/GroupFoldersService.php(133): OCA\Files_FullTextSearch\Service\GroupFoldersService->debug('[debug] initGro...', Array)
#5 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(379): OCA\Files_FullTextSearch\Service\GroupFoldersService->initGroupSharesForUser('adrpen')
#6 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(202): OCA\Files_FullTextSearch\Service\FilesService->initFileSystems('adrpen')
#7 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(249): OCA\Files_FullTextSearch\Service\FilesService->getChunksFromUser('adrpen', Object(OCA\FullTextSearch\Model\IndexOptions))
#8 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(182): OCA\Files_FullTextSearch\Provider\FilesProvider->generateChunks('adrpen')
#9 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(410): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), 'adrpen', Object(OCA\FullTextSearch\Model\IndexOptions))
#10 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\IndexOptions))
#11 /var/www/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))
#12 /var/www/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1000): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/nextcloud/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))
#15 /var/www/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#18 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

Other tasks I performed:

And here the versions i'm using:

Could anyone help me with this issue?

Best regards, Ángel.

aviatorhh commented 3 years ago

I have the same issue on 21.0.2 and PHP 8.0.5 and with PHP 7.4.18 no joy either.

angcar commented 3 years ago

I have the same issue on 21.0.2 and PHP 8.0.5 and with PHP 7.4.18 no joy either.

Hi, I've got php 7.4 also 👎

If I can find out anything else I will update this thread, but I can't think of anything else right now.

Best regards.

sethHive commented 3 years ago

someone has a temp fix for this here. https://github.com/nextcloud/files_fulltextsearch/issues/125 good luck with it. i'm up and running again without this error now. (and per the error it is files_fulltextsearch not fulltextsearch_elasticsearch that is the problem.

aviatorhh commented 3 years ago

Yes, I have disabled the file_fulltextsearch before and had no error but that has not been the solution for sure. The temp fix you mentioned works for me. Many thanks! 👍🏻

angcar commented 3 years ago

Hi,

Very true, the error is from fulltextsearch; the temporary fix of commenting the line solves the problem. Thanks a lot!

Let's see if they publish something definitive.