Open mdevl opened 1 year ago
Hi @mdevl - Thanks for the report. I'm unable to reproduce this, unfortunately.
Any chance you just have "Search for X only" clicked in the 3-dots menu to the right of the search input box? (Just checking the obvious to rule things out - no judgement if so!)
In your browser console, when you trigger a search you should see a bunch of simultaneous queries to /ocs/v2.php/search/providers/[numerous]/search?term=blah
sent off to all the various providers. In that bunch, does the one that goes to /ocs/v2.php/search/providers/files/search
have a return code? (I suppose not if you're just seeing the front-end wait forever...)
Anything special about the files you're searching for? e.g.
groupfolders
managed folders?Does it matter which application you are currently within in the web ui when reproducing this behavior? (i.e. Files vs Contacts vs Calendar vs Talk)
The Nextcloud logs contain sensitive information, with the failed search queries making no appearance (to the best of my judgment). Hence omitted. I.e., search queries for files are simply swallowed without any appearance in the log.
Any searches that generate exceptions on the back-end should be showing up.
The individual queries to each provider should show also be in your web server logs (both successful and otherwise). I'd be interested in the return codes there.
Using primary and secondary DB, running behind a traefik proxy.
Multi-master?
Thanks @joshtrichards for taking a look at the issue.
Neither in the browser nor the native Nextcloud app (NC25) does there seem to be any obvious way (to me) to filter down the search queries. Is this a newer feature introduced, or is there some misunderstanding here? That being said, it will not be the cause of this issue: I manually executed a GET
request on the appropriate API endpoint to search for files on the Nextcloud server and received no reply.
If you trigger a search query and look at the logs, files
is the only provider that does not make an appearance in the log at all. Here are the log entries that resulted from searching for my_test_file
:
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/calendar/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 886 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/comments/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 886 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/tasks/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 886 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/circles/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 884 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/settings_apps/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 885 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/settings/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 887 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
nextcloud-app | 192.168.48.2 - - [11/Apr/2023:13:17:07 +0000] "GET /ocs/v2.php/search/providers/contacts/search?term=my_test_file&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2Fpersonal%26fileid%3D52966391 HTTP/1.1" 200 887 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
Hence it is also irrelevant where the files are located since the files
search provider as a whole fails entirely, irrespective of everything else (searching from the webgui or native app).
I Issued a GET .../ocs/v2.php/search/providers
in order to verify that the files
search provider was registered
{
"meta": {
"status": "ok",
"statuscode": "200",
"message": "OK",
"#text": "..."
},
"data": {
"element": [
{
"id": "settings_apps",
"name": "Apps",
"order": "-50",
"#text": "..."
},
{
"id": "files",
"name": "Files",
"order": "5",
"#text": "..."
},
# (shortened/removed remaining entries)
],
"#text": "..."
},
"#text": "..."
}
and then - as mentioned above - also triggered a manual search for files via a GET
on the /ocs/v2.php/search/providers/files
endpoint. For e.g. contacts
I received a reply as expected. For files
, no reply is returned at all.
As such, regarding your interest in seeing the return code or the exceptions associated with the files search queries in the log: both are unfortunately not applicable, as no returns or log entries exist assciated with files
ever come into being. The GET
query associated with the file searches is unfortunately just swallowed up completely without ever returning anything, raising an error, or logging anything. Everything disappearing in a black void completely unfortunately makes it sort of difficult to troubleshoot.
Regarding the DBs: The DBs are setup as master-slave for the purpose of backups.
⚠️ This issue respects the following points: ⚠️
Bug description
The unified search is broken for
files
and does not return any results. Using the search functionality of Nextcloud within the Webgui, results are only obtained for anything that is not a file. Issuing aGET
operation onocs/v2.php/search/providers
we can verify that the suitable provider is registeredIf issuing a manual
GET
request along the linesNothing happens, and no reply is received. In contrast, for e.g.
ocs/v2.php/search/providers/contacts/search?
replies are received as expected.Correspondingly, when searching for files in the Webgui, the search simply remains stuck on waiting forever.
Steps to reproduce
Expected behavior
File search should return a reply to get
GET
request and provide list of matching files.Installation method
Community Docker image
Nextcloud Server version
25
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
Using primary and secondary DB, running behind a traefik proxy.