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

Unhandled Exception: Return value of OCA\Files_FullTextSearch\Model\MountPoint::isGlobal() must be of the type bool, null returned in /var/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/Model/MountPoint.php:103 #127

Closed
Jsalas424 opened this issue Jun 12, 2021 · 3 comments

Comments

@Jsalas424
Copy link

My nextcloud snap full text search has started to malfunction recently. Here is the error it throws when I try to start indexing. I noticed after a file I recently added wasn't popping up in the search.

This is a Nextcloud Snap 21 on an Ubuntu 21 VM.

jon@nextcloud:~$ sudo nextcloud.occ fulltextsearch:index --no-readline

Options: {"_no-readline":true}
Memory: 35 MB
┌─ Indexing  ────
│ Action: generateIndexFiles
│ Provider: Files                Account: jon
│ Document: 
│ Info: 
│ Title: 
│ Content size: 
│ Chunk:      0/0
│ Progress:      0/0
└──
┌─ Results ────
│ Result:      0/0
│ Index: 
│ Status: 
│ Message: 
│ 
│ 
└──
┌─ Errors ────
│ Error:      0/0
│ Index: 
│ Exception: 
│ Message: 
│ 
│ 
└──
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/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/Model/MountPoint.php:103
Stack trace:
#0 /var/snap/nextcloud/28088/nextcloud/extra-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/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/TNC22Logger.php(193): json_encode(Array)
#3 /var/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/TNC22Logger.php(178): OCA\Files_FullTextSearch\Service\GroupFoldersService->log(0, '[debug] initGro...', false, Array)
#4 /var/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/Service/GroupFoldersService.php(133): OCA\Files_FullTextSearch\Service\GroupFoldersService->debug('[debug] initGro...', Array)
#5 /var/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/Service/FilesService.php(379): OCA\Files_FullTextSearch\Service\GroupFoldersService->initGroupSharesForUser('jon')
#6 /var/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/Service/FilesService.php(202): OCA\Files_FullTextSearch\Service\FilesService->initFileSystems('jon')
#7 /var/snap/nextcloud/28088/nextcloud/extra-apps/files_fulltextsearch/lib/Provider/FilesProvider.php(249): OCA\Files_FullTextSearch\Service\FilesService->getChunksFromUser('jon', Object(OCA\FullTextSearch\Model\IndexOptions))
#8 /var/snap/nextcloud/28088/nextcloud/extra-apps/fulltextsearch/lib/Service/IndexService.php(182): OCA\Files_FullTextSearch\Provider\FilesProvider->generateChunks('jon')
#9 /var/snap/nextcloud/28088/nextcloud/extra-apps/fulltextsearch/lib/Command/Index.php(410): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), 'jon', Object(OCA\FullTextSearch\Model\IndexOptions))
#10 /var/snap/nextcloud/28088/nextcloud/extra-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/snap/nextcloud/28088/nextcloud/extra-apps/bookmarks/vendor/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /snap/nextcloud/28088/htdocs/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/snap/nextcloud/28088/nextcloud/extra-apps/bookmarks/vendor/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/snap/nextcloud/28088/nextcloud/extra-apps/bookmarks/vendor/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/snap/nextcloud/28088/nextcloud/extra-apps/bookmarks/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /snap/nextcloud/28088/htdocs/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /snap/nextcloud/28088/htdocs/console.php(100): OC\Console\Application->run()
#18 /snap/nextcloud/28088/htdocs/occ(11): require_once('/snap/nextcloud...')

Here's the check output:

jon@nextcloud:~$ sudo nextcloud.occ fulltextsearch:check
Full text search 21.0.1
 
- Search Platform:
Elasticsearch 21.0.1 (Selected)
{
    "elastic_host": [
        "://localhost:9200"
    ],
    "elastic_index": "nextcloud",
    "fields_limit": "10000",
    "es_ver_below66": "0",
    "analyzer_tokenizer": "standard"
} 

- Content Providers:
Files 21.0.2
{
    "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"
}

Here's the test output:

jon@nextcloud:~$ sudo nextcloud.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  

@skynick11
Copy link

Is it the same as #125 ?

@LazyGatto
Copy link

With updated version of plugin today error still persist and it is the same...
So it is doesn't work with Group Folders.

@solracsf
Copy link
Member

Duplicate of #125

@solracsf solracsf marked this as a duplicate of #125 Sep 15, 2021
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

4 participants