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

Error: Call to a member function instanceOfStorage() on null ( with LDAP, NC16 ) #16886

Closed
andrewborell opened this issue Aug 27, 2019 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@andrewborell
Copy link

Get this error using fulltextsearch and file scan if I change a users first or last name in LDAP and it syncs across thereby leaving parts of the old accounts behind in nextcloud. I suspect I should be able to merge the accounts to fix the problem and will test this today.

@andrewborell
Copy link
Author

I found the issue is that when a users name is changed in LDAP it creates a new link in the ldap mapping in nextcloud but the old user is never cleaned up in the groups. When doing a file scan there is no issue but fulltextsearch chokes on the orphaned user in the group. I think this must also be tied into group folders. Since there are 4 places this is tied into I will leave it to the admins to triage this matter.

Here is a stack trace:

Error: Call to a member function instanceOfStorage() on null in /var/www/mysite/nextcloud/lib/private/Files/View.php:1923
Stack trace:
#0 /var/www/mysite/nextcloud/lib/private/Files/View.php(2037): OC\Files\View->lockPath('/dsharp', 1, false)
#1 /var/www/mysite/nextcloud/lib/private/Files/View.php(1134): OC\Files\View->lockFile('/dsharp', 1)
#2 /var/www/mysite/nextcloud/lib/private/Files/View.php(269): OC\Files\View->basicOperation('mkdir', '/dsharp', Array)
#3 /var/www/mysite/nextcloud/lib/private/Files/Node/Folder.php(161): OC\Files\View->mkdir('/dsharp')
#4 /var/www/mysite/nextcloud/lib/private/Files/Node/Root.php(381): OC\Files\Node\Folder->newFolder('/dsharp')
#5 [internal function]: OC\Files\Node\Root->getUserFolder('dsharp')
#6 /var/www/mysite/nextcloud/lib/private/Files/Node/LazyRoot.php(64): call_user_func_array(Array, Array)
#7 /var/www/mysite/nextcloud/lib/private/Files/Node/LazyRoot.php(281): OC\Files\Node\LazyRoot->__call('getUserFolder', Array)
#8 /var/www/mysite/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php(90): OC\Files\Node\LazyRoot->getUserFolder('dsharp')
#9 /var/www/mysite/nextcloud/lib/private/Files/Config/MountProviderCollection.php(103): OCA\GroupFolders\Mount\MountProvider->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
#10 /var/www/mysite/nextcloud/lib/private/Files/Filesystem.php(447): OC\Files\Config\MountProviderCollection->addMountForUser(Object(OC\User\User), Object(OC\Files\Mount\Manager))
#11 /var/www/mysite/nextcloud/lib/private/Files/Node/Root.php(375): OC\Files\Filesystem::initMountPoints('dsharp')
#12 [internal function]: OC\Files\Node\Root->getUserFolder('dsharp')
#13 /var/www/mysite/nextcloud/lib/private/Files/Node/LazyRoot.php(64): call_user_func_array(Array, Array)
#14 /var/www/mysite/nextcloud/lib/private/Files/Node/LazyRoot.php(281): OC\Files\Node\LazyRoot->__call('getUserFolder', Array)
#15 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(495): OC\Files\Node\LazyRoot->getUserFolder('dsharp')
#16 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(760): OCA\Files_FullTextSearch\Service\FilesService->getPathFromViewerId(17645, 'dsharp')
#17 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(676): OCA\Files_FullTextSearch\Service\FilesService->updateShareNames(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
#18 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(650): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentAccess(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
#19 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(631): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocumentFromFile(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\File))
#20 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(522): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#21 /var/www/mysite/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(272): OCA\Files_FullTextSearch\Service\FilesService->generateDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#22 /var/www/mysite/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(314): OCA\Files_FullTextSearch\Provider\FilesProvider->fillIndexDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#23 /var/www/mysite/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))
#24 /var/www/mysite/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), 'austin', Object(OCA\FullTextSearch\Model\IndexOptions))
#25 /var/www/mysite/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\IndexOptions))
#26 /var/www/mysite/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))
#27 /var/www/mysite/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/mysite/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /var/www/mysite/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))
#30 /var/www/mysite/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#31 /var/www/mysite/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 /var/www/mysite/nextcloud/console.php(97): OC\Console\Application->run()
#33 /var/www/mysite/nextcloud/occ(11): require_once('/var/www/mysite...')

@kesselb
Copy link
Contributor

kesselb commented Sep 4, 2019

Mind to add the https://github.com/nextcloud/server/blob/master/.github/ISSUE_TEMPLATE/Bug_report.md to your post?

cc @nextcloud/server-triage Hmm. We have fulltextsearch, ldap and groupfolders.

@kesselb kesselb added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Sep 4, 2019
@szaimen
Copy link
Contributor

szaimen commented May 26, 2021

I'm closing this issue due to inactivity. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

@szaimen szaimen closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants