nextcloud / files_fulltextsearch

🔍 Index the content of your files
GNU Affero General Public License v3.0
59 stars 30 forks source link

live index crashes: withoutEndSlash() returns false #32

Closed hirschrobert closed 5 years ago

hirschrobert commented 5 years ago

https://github.com/nextcloud/files_fulltextsearch/blob/668958b1f7eb3003ca7ac4b5f8676125c1e8525b/lib/Service/FilesService.php#L400

withoutEndSlash() somehow returned false instead of a string. coud it be that dashes in newly created usernames while live indexing cause this issue? the given user is not owner of the folder, it is only shared.

i had to reset index and start a new index, now it works again.

NC 15.0.2 files_fulltextsearch 1.2.3

full error log: [cron] Error: TypeError: Argument 1 passed to OCA\Files_FullTextSearch\Service\FilesService::withoutEndSlash() must be of the type string, bool given, called in /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php on line 400 at <>

  1. /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php line 400 withoutEndSlash(false)
  2. /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php line 297 getPathFromViewerId(123456, "user-name")
  3. /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php line 445 generateFilesDocumentFromFile("user-name", OC\Files\Node\Folder {})
  4. /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php line 494 generateDocumentFromIndex(OCA\FullTextSearch\Model\Index {})
  5. /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php line 264 updateDocument(OCA\FullTextSearch\Model\Index {})
  6. /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php line 401 updateDocument(OCA\FullTextSearch\Model\Index {})
  7. /var/www/nextcloud/apps/fulltextsearch/lib/Cron/Index.php line 130 updateDocument(OCA\FullTextSear ... {}, OCA\Files_FullTe ... {}, OCA\FullTextSearch\Model\Index {})
  8. /var/www/nextcloud/apps/fulltextsearch/lib/Cron/Index.php line 100 liveCycle()
  9. /var/www/nextcloud/lib/private/BackgroundJob/Job.php line 61 run(null)
  10. /var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php line 55 execute(OC\BackgroundJob\JobList {}, OC\Log {})
    1. /var/www/nextcloud/cron.php line 123 execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2019-01-23T04:30:03+00:00

ArtificialOwl commented 5 years ago

Thanks for the report, this should be fixed in the next minor release