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

Unhandeld exception due to Deck's FullTextSearchService.php - Test of patch nextcloud/deck#1049 #498

Closed
truelai opened this issue May 16, 2019 · 2 comments

Comments

@truelai
Copy link

truelai commented May 16, 2019

NC 16
FTS 1.3.1
Deck 0.6.1 (there's a 0.6.2 updated bu the file in question isn't touched by this)

Before the patch, an index command throws an exception:

TypeError: Argument 1 passed to OC\FullTextSearch\Model\IndexDocument::setContent() must be of the type string, null given, called in /var/www/nextcloud/apps/deck/lib/Service/FullTextSearchService.php on line 182 and defined in /var/www/nextcloud/lib/private/FullTextSearch/Model/IndexDocument.php:477
Stack trace:
#0 /var/www/nextcloud/apps/deck/lib/Service/FullTextSearchService.php(182): OC\FullTextSearch\Model\IndexDocument->setContent(NULL)
#1 /var/www/nextcloud/apps/deck/lib/Provider/DeckProvider.php(187): OCA\Deck\Service\FullTextSearchService->fillIndexDocument(Object(OC\FullTextSearch\Model\IndexDocument))
#2 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(325): OCA\Deck\Provider\DeckProvider->fillIndexDocument(Object(OC\FullTextSearch\Model\IndexDocument))
#3 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(205): OCA\FullTextSearch\Service\IndexService->indexDocuments(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Deck\Provider\DeckProvider), Array, Object(OCA\FullTextSearch\Model\IndexOptions))
#4 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(409): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Deck\Provider\DeckProvider), 'pov', Object(OCA\FullTextSearch\Model\IndexOptions))
#5 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(273): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Deck\Provider\DeckProvider), Object(OCA\FullTextSearch\Model\IndexOptions))
#6 /var/www/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))
#7 /var/www/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/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))
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /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))
#12 /var/www/nextcloud/console.php(97): OC\Console\Application->run()
#13 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

After patch:

No error yet, but something strange in the Progress line: Progress: 70000/0
Not sure if this was an issue before, but I noticed it now. Seems strange.

root@cloud:~# sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:index "{\"user\":\"accountingocr\", \"providers\":\"files_external\"}" && sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:index

Options: {"user":"accountingocr","providers":"files_external"}
Memory: 460 MB
┌─ Indexing  ────
│ Action: generateIndexFiles
│ Provider: Files                Account: accountingocr
│ Document: 
│ Info: /accountingocr/files/Samba/picklists
│ Title: 
│ Content size: 
│ Chunk:     14/15
│ Progress:  70000/0
└──
┌─ Results ────
│ Result:      0/0
│ Index: 
│ Status: 
│ Message: 
│ 
│ 
└──

I'll add to this as more info comes in. I'll also try to do a straight index without user or provider variables and see how that goes as well.

Update:
Ok. A little weirdness but it looks to be working. I'm not crashing where I was before, The weirdness is that Progress: 70000/0 changed to 0/48991 while the Info: /accountingocr/files/Samba/picklists did not change. This may be normal behavior but I don't usually study what's hapeening so hard. I have a video I can send to @daita if you'd like (has many usernames in it so I don't want to post here).

So, my crash is gone with this patch.

@truelai
Copy link
Author

truelai commented May 29, 2019

Full text search - Elasticsearch Platform 1.3.0
Full text search - Files 1.3.0
Full text search - Files - Tesseract OCR 1.3.0
tesseract 3.04.01

Comparing indexes for a single user now spans around 2 days
I'm guessing this is due to the fact that Tesseract is actually OCRing now but not sure why this affects comparing indexes.

@truelai
Copy link
Author

truelai commented May 29, 2019

This patch looks like it will be included in Deck 0.6.3

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

1 participant