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

An unhandled exception has been thrown: /Share20/Manager.php:1433 #507

Closed
Omaha2002 opened this issue May 26, 2019 · 9 comments
Closed

An unhandled exception has been thrown: /Share20/Manager.php:1433 #507

Omaha2002 opened this issue May 26, 2019 · 9 comments

Comments

@Omaha2002
Copy link

Nextcloud 16.0.1
MariaDB 15.1
PHP 7.3

sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:test -> OK
sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:reset -> OK
sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:index -> ERROR

Indexing stops halfway with the following error, get the impression it's because of groupfolders app.

An unhandled exception has been thrown:
Error: Call to a member function getUID() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:1433
Stack trace:
#0 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/LocalFilesService.php(163): OC\Share20\Manager->getAccessList(Object(OC\Files\Node\File), true, true)
#1 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(723): OCA\Files_FullTextSearch\Service\LocalFilesService->getShareUsersFromFile(Object(OC\Files\Node\File), Array)
#2 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(652): OCA\Files_FullTextSearch\Service\FilesService->updateShareNames(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
#3 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(626): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentAccess(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
#4 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(607): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocumentFromFile(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
#5 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(501): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#6 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(263): OCA\Files_FullTextSearch\Service\FilesService->generateDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#7 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(325): OCA\Files_FullTextSearch\Provider\FilesProvider->fillIndexDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#8 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(205): OCA\FullTextSearch\Service\IndexService->indexDocuments(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array, Object(OCA\FullTextSearch\Model\IndexOptions))
#9 /var/www/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), 'r.ruiter@market...', 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(166): 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(901): 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(262): 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(145): 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(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/nextcloud/console.php(97): OC\Console\Application->run()
#18 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

@jurgenhaas
Copy link

I'm seeing the very same issue.

@Omaha2002
Copy link
Author

Omaha2002 commented May 28, 2019

Updated groupfolders to 4.0.2, same error at the end of indexing, btw don't know if groupfolders is cause:

An unhandled exception has been thrown:
Error: Call to a member function getUID() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:1433

@jurgenhaas
Copy link

This seems to be related to #383 and after cleaning up missing shares the problem is gone. I wonder if this should lead to these resolutions:

  • fulltextsearch should handle such exceptions and just ignore missing objects
  • nextcloud should offer a maintenance task which checks all shares and fixes missing ones

@Omaha2002
Copy link
Author

Cleaning up missing shares is a manual job? Going through the tables in the database? I have thousands of files and folders, that seems almost undoable..

@jurgenhaas
Copy link

Agreed, that's why I proposed a maintenance task for occ which is doing that automatically.

@Omaha2002
Copy link
Author

A sudo -u www-data php occ files:scan --all doesn't clean up right? Or does it mess up groupfolders?

@jurgenhaas
Copy link

To be honest, I don't know and I haven't found any documentation explaining that.

@Omaha2002
Copy link
Author

a sudo -u www-data php occ files:scan --all does not help. Still same error. So how do you find out what missing share is the one causing the error? I see in the log the name of the user it stops indexing but it doesn't say what share.

@Omaha2002
Copy link
Author

Fixed with latest update Fulltextsearch 1.3.4

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