nextcloud / nextcloud/fulltextsearch

Unhandled exception ::setUser() must implement interface OCP\IUser

Open
#399 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3. to review bug fixed ?
Dominant language
PHP
Stars
234
Forks
64
Avg merge
6h 18m
Merged PRs (30d)
10

Description

NC 14.0.3
Full text search 1.0.3
Full text search - Elasticsearch Platform 1.0.1
Full text search - Files 1.0.3
Full text search - Files - Tesseract OCR 1.0.0

I don't understand what happened here.

root@nextcloud:~# sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:live

Memory: 30 MB
┌─ Indexing  ────
│ Action: indexing
│ Provider: Files                Account: aakram
│ Document: 406639
│ Info: application/vnd.openxmlformats-officedocument.presentationml.presentation
│ Title: vika/PPP/Conditionals/Conditionals.pptx
│ Content size: 0
└──
┌─ Results ────
│ Result:     28/28
│ Index: files:406639
│ Status: ok
│ Message: {"_index":"nc-index-1","_type":"standard","_id":"files:406639","_version":2,"result":"updated","_shards":{"total":
│ 2,"successful":1,"failed":0},"_seq_no":32955,"_primary_term":1}
│
└──
┌─ Errors ────
│ Error:     16/16
│ Index: files:708494
│ Exception: Elasticsearch\Common\Exceptions\ServerErrorResponseException
│ Message: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [content] not present as part of pat
│ h [attachment.content]
│
└──
## x:first result ## c/v:prec/next result ## b:last result
## f:first error ## h/j:prec/next error ## d:delete error ## l:last error
## q:quit ## p:pause
An unhandled exception has been thrown:
TypeError: Argument 1 passed to OCA\Files_External\Service\UserGlobalStoragesService::setUser() must implement interface OCP\IUser, null given, called in /var/www/nextcloud/apps/files_external/lib/config.php on line 99 and defined in /var/www/nextcloud/apps/files_external/lib/Service/UserTrait.php:60
Stack trace:
#0 /var/www/nextcloud/apps/files_external/lib/config.php(99): OCA\Files_External\Service\UserGlobalStoragesService->setUser(NULL)
#1 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/ExternalFilesService.php(250): OC_Mount_Config::getAbsoluteMountPoints('aakram')
#2 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/ExternalFilesService.php(124): OCA\Files_FullTextSearch\Service\ExternalFilesService->getMountPoints('aakram')
#3 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(190): OCA\Files_FullTextSearch\Service\ExternalFilesService->initExternalFilesForUser('aakram')
#4 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(466): OCA\Files_FullTextSearch\Service\FilesService->initFileSystems('aakram')
#5 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(310): OCA\Files_FullTextSearch\Service\FilesService->updateDocument(Object(OCA\FullTextSearch\Model\ExtendedIndex))
#6 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(390): OCA\Files_FullTextSearch\Provider\FilesProvider->updateDocument(Object(OCA\FullTextSearch\Model\ExtendedIndex))
#7 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Live.php(262): OCA\FullTextSearch\Service\IndexService->updateDocument(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Object(OCA\FullTextSearch\Model\ExtendedIndex))
#8 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Live.php(228): OCA\FullTextSearch\Command\Live->liveCycle()
#9 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(251): OCA\FullTextSearch\Command\Live->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/nextcloud/core/Command/Base.php(162): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Live), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /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))
#15 /var/www/nextcloud/console.php(96): OC\Console\Application->run()
#16 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#17 {main}root@nextcloud:~# 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with occ fulltextsearch:live, then trace the listed calls through apps/files_fulltextsearch/lib/Service/ExternalFilesService.php, apps/files_external/lib/config.php, and apps/files_external/lib/Service/UserTrait.php. Done means the reported indexing path no longer throws the setUser() TypeError and an appropriate regression check covers the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, php
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.