-
Notifications
You must be signed in to change notification settings - Fork 30
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 NULL Pointer on isGlobal
#125
Comments
Hi I have the same error on NC 20.0.9 + FTS 20.0.1 + Files 20.0.3. I tried on a fresh install with the same version as I use in production, and got the same behavior. Like @bronnertm I had to disable Group Folders app to get indexing working. Disabling in fulltextsearch setting is not working. |
Same here with NC 21.0.1 + FTS 21.0.1 + FTS Files 21.0.2 |
Same here . |
I have the same problem. |
Thanks @ShinjiLE the quickfix seems to be working. |
I am experiencing the same issue at our company. Unfortunately commenting out lines, is not an option, as were are using a Docker deployment, which means changes would be non-persistent. Is anybody working on this?
|
Comment out the point suggested by @ShinjiLE helps getting the indexing started but after indexing a lot of files and users with groupfolders enabled I get the following error: An unhandled exception has been thrown: |
Hi, |
Thanks @ShinjiLE the quickfix works here too!! Are there any news about the bug? |
this app is not alive, isn't it? |
Maybe some simple type fixing should be considered here. Otherwise the same issues might surface anywhere, not "only" during debug(x) call. You might apply this diff to --- MountPoint.orig.php 2021-07-11 12:14:05.690177923 +0000
+++ MountPoint.php 2021-07-11 12:13:30.439026756 +0000
@@ -100,7 +100,7 @@
* @return bool
*/
public function isGlobal(): bool {
- return $this->global;
+ return $this->global === TRUE;
}
/**
@@ -119,7 +119,7 @@
* @return array
*/
public function getGroups(): array {
- return $this->groups;
+ return $this->groups ? $this->groups : array();
}
/**
@@ -138,7 +138,7 @@
* @return array
*/
public function getUsers(): array {
- return $this->users;
+ return $this->users ? $this->users : array();
}
/** |
That diff fixes it for me! |
Getting the same over here, even after buzz-tees fix. Anyone got a fix for this? |
Group folders elasticsearch indexing is still broken, but that's a separate issue from this one imo - the null errors were returned due to files existing, but in a deleted state, which the diff handles. Group folders is a separate permissions set, and given that, I'd probably create a new issue for it, referencing this ones fix. Thatll at least give them a good starting point ince the dev has some time to work on it 👍 |
I also get the "Call to a member function getOwner() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:1651" error... |
In line /var/www/nextcloud/lib/private/Share20/Manager.php:1651 I've added an additional check on null on the object itself:
This prevents the exception though I'm not yet sure that the indexing is correct. |
I can confirm that this works. |
I can also confirm this works on 21.0.4. |
@JanBartels mind to make a PR for review on it? |
@acsfer: I don't know how to make the PR correctly without loosing the link to this issue as the modified file is a part of another repo (https://github.com/nextcloud/server). Please advise. |
occ fulltextsearch:index
throws NULL Pointer on isGlobal
Hi,
When I issue the fulltextsearch:index command I only get a NULL Pointer execption.
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/html/custom_apps/files_fulltextsearch/lib/Model/MountPoint.php:103 Stack trace: #0 /var/www/html/custom_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/html/custom_apps/files_fulltextsearch/lib/TNC22Logger.php(193): json_encode(Array) #3 /var/www/html/custom_apps/files_fulltextsearch/lib/TNC22Logger.php(178): OCA\Files_FullTextSearch\Service\GroupFoldersService->log(0, '[debug] initGro...', false, Array) #4 /var/www/html/custom_apps/files_fulltextsearch/lib/Service/GroupFoldersService.php(133): OCA\Files_FullTextSearch\Service\GroupFoldersService->debug('[debug] initGro...', Array) #5 /var/www/html/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(379): OCA\Files_FullTextSearch\Service\GroupFoldersService->initGroupSharesForUser('birte') #6 /var/www/html/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(202): OCA\Files_FullTextSearch\Service\FilesService->initFileSystems('birte') #7 /var/www/html/custom_apps/files_fulltextsearch/lib/Provider/FilesProvider.php(249): OCA\Files_FullTextSearch\Service\FilesService->getChunksFromUser('birte', Object(OCA\FullTextSearch\Model\IndexOptions)) #8 /var/www/html/custom_apps/fulltextsearch/lib/Service/IndexService.php(182): OCA\Files_FullTextSearch\Provider\FilesProvider->generateChunks('birte') #9 /var/www/html/custom_apps/fulltextsearch/lib/Command/Index.php(410): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), 'birte', Object(OCA\FullTextSearch\Model\IndexOptions)) #10 /var/www/html/custom_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/html/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/html/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/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/3rdparty/symfony/console/Application.php(273): 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/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/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/html/console.php(100): OC\Console\Application->run() #18 /var/www/html/occ(11): require_once('/var/www/html/c...')
My NC version is 21.0.1
Fulltextsearch + the Eleastic Platform is on 21.0.1 and Files is on 21.0.2
Group Folders is on 9.01
My PHP version is: 7.4.19
When I disable the group folders addon in NC the index job will start without an issue. Can someone please point me in the right direction or is this a known issue, because NC 21 is not supported right now?
Thanks Matthias
The text was updated successfully, but these errors were encountered: