Skip to content

Searching in files fails with unified search #22755

@raimund-schluessler

Description

@raimund-schluessler

Steps to reproduce

  1. Type the name of an existing file in the unified search input

Expected behaviour

The file should be found.

Actual behaviour

The file is not found, browser console shows a failed request.

Server configuration

Operating system: Ubuntu 20.04

Web server: Apache 2.4

Database: MariaDB

PHP version: 7.4

Nextcloud version: latest master

Nextcloud log shows this (although it's a bit hard to say what's relevant, because it is spammed with deprecation messages):

{"reqId":"0HSwJjS5wHEDiyfuwmUy","level":3,"time":"2020-09-09T20:32:40+00:00","remoteAddr":"192.168.56.1","user":"admin","app":"no app in context","method":"GET","url":"/nextcloud/ocs/v2.php/search/providers/files/search?term=per&from=%2Fnextcloud%2Fapps%2Ffiles%2F%3Fdir%3D%2F%26fileid%3D1265","message":{"Exception":"Exception","Message":"Call to a member function search() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":88,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":24,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":110,"Previous":{"Exception":"Error","Message":"Call to a member function search() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Search/Provider/File.php","line":47,"function":"search","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/apps/files/lib/Search/FilesSearchProvider.php","line":110,"function":"search","class":"OC\\Search\\Provider\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Search/SearchComposer.php","line":162,"function":"search","class":"OCA\\Files\\Search\\FilesSearchProvider","type":"->"},{"file":"/var/www/nextcloud/core/Controller/UnifiedSearchController.php","line":109,"function":"search","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":88,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":24,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/Filesystem.php","Line":763},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0","version":"20.0.0.5"}

Browser console says this:
log

I can provide more information if required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions