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 while creating index (Error: Call to a member function getOwner() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:1651) #652

Open
DecaTec opened this issue Aug 15, 2021 · 2 comments

Comments

@DecaTec
Copy link

DecaTec commented Aug 15, 2021

I'm getting the following error while creating the index:

An unhandled exception has been thrown:
Error: Call to a member function getOwner() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:1651
Stack trace:
#0 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/LocalFilesService.php(163): OC\Share20\Manager->getAccessList()
#1 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(795): OCA\Files_FullTextSearch\Service\LocalFilesService->getShareUsersFromFile()
#2 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(725): OCA\Files_FullTextSearch\Service\FilesService->updateShareNames()
#3 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(699): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentAccess()
#4 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(680): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocumentFromFile()
#5 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(571): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocument()
#6 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(288): OCA\Files_FullTextSearch\Service\FilesService->generateDocument()
#7 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(317): OCA\Files_FullTextSearch\Provider\FilesProvider->fillIndexDocument()
#8 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(204): OCA\FullTextSearch\Service\IndexService->indexDocuments()
#9 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(410): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser()
#10 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider()
#11 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute()
#12 /var/www/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#13 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#14 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#15 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#16 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#17 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#18 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

This might be a problem with the app 'group folders' enabled.
This should have been fixed by nextcloud/server#15832
But as a user already mentioned on the PR, the error seems to be back again in NC 21.

NC version: 21.0.3

Result of 'occ fulltextsearch:check'
Full text search 21.0.3
 
- Search Platform:
Elasticsearch 21.0.2 (Selected)
{
    "elastic_host": [
        "http://192.168.100.1:9200"
    ],
    "elastic_index": "my_index",
    "fields_limit": "10000",
    "es_ver_below66": "0",
    "analyzer_tokenizer": "standard"
} 

- Content Providers:
Files 21.0.4
{
    "files_local": "1",
    "files_external": "1",
    "files_group_folders": "1",
    "files_encrypted": "0",
    "files_federated": "0",
    "files_size": "20",
    "files_pdf": "1",
    "files_office": "1",
    "files_image": "0",
    "files_audio": "0",
    "files_fulltextsearch_tesseract": {
        "version": "20.0.1",
        "enabled": "0",
        "psm": "4",
        "lang": "deu,eng",
        "pdf": "0",
        "pdf_limit": "0"
    }
}
Result of 'occ fulltextsearch:test'
.Testing your current setup:  
Creating mocked content provider. ok  
Testing mocked provider: get indexable documents. (2 items) ok  
Loading search platform. (Elasticsearch) ok  
Testing search platform. ok  
Locking process ok  
Removing test. ok  
Pausing 3 seconds 1 2 3 ok  
Initializing index mapping. ok  
Indexing generated documents. ok  
Pausing 3 seconds 1 2 3 ok  
Retreiving content from a big index (license). (size: 32386) ok  
Comparing document with source. ok  
Searching basic keywords:  
 - 'test' (result: 1, expected: ["simple"]) ok  
 - 'document is a simple test' (result: 2, expected: ["simple","license"]) ok  
 - '"document is a test"' (result: 0, expected: []) ok  
 - '"document is a simple test"' (result: 1, expected: ["simple"]) ok  
 - 'document is a simple -test' (result: 1, expected: ["license"]) ok  
 - 'document is a simple +test' (result: 1, expected: ["simple"]) ok  
 - '-document is a simple test' (result: 0, expected: []) ok  
 - 'document is a simple +test +testing' (result: 1, expected: ["simple"]) ok  
 - 'document is a simple +test -testing' (result: 0, expected: []) ok  
 - 'document is a +simple -test -testing' (result: 0, expected: []) ok  
 - '+document is a simple -test -testing' (result: 1, expected: ["license"]) ok  
 - 'document is a +simple -license +testing' (result: 1, expected: ["simple"]) ok  
Updating documents access. ok  
Pausing 3 seconds 1 2 3 ok  
Searching with group access rights:  
 - 'license' - [] -  (result: 0, expected: []) ok  
 - 'license' - ["group_1"] -  (result: 1, expected: ["license"]) ok  
 - 'license' - ["group_1","group_2"] -  (result: 1, expected: ["license"]) ok  
 - 'license' - ["group_3","group_2"] -  (result: 1, expected: ["license"]) ok  
 - 'license' - ["group_3"] -  (result: 0, expected: []) ok  
Searching with share rights:  
 - 'license' - notuser -  (result: 0, expected: []) ok  
 - 'license' - user2 -  (result: 1, expected: ["license"]) ok  
 - 'license' - user3 -  (result: 1, expected: ["license"]) ok  
Removing test. ok  
Unlocking process ok 
@Omaha2002
Copy link

nextcloud/files_fulltextsearch#133 (comment)

and the fix: nextcloud/files_fulltextsearch#125 (comment)

@DecaTec
Copy link
Author

DecaTec commented Aug 17, 2021

Seems to work.
I only worry a bit to change the source code in productive environments...

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