immich
immich copied to clipboard
API: POST /search/random returns internal server error
The bug
https://demo.immich.app/doc#/Search/searchRandom
calling the POST /search/random
endpoint with parameters like withExif
or personIds
returns an internal server error
The OS that Immich Server is running on
Unraid
Version of Immich Server
v1.116
Version of Immich Mobile App
Platform with the issue
- [X] Server
- [ ] Web
- [ ] Mobile
Your docker-compose.yml content
not needed
Your .env content
not needed
Reproduction steps
- Go to https://demo.immich.app/doc#/Search/searchRandom (make sure you are logged in)
- use request body:
{
"withExif": true,
"page": 1,
"size": 100
}
- Execute
Relevant log output
Immich Logs:
ERROR [Api:ErrorInterceptor~2tquej6l] Database error: QueryFailedError: for SELECT DISTINCT, ORDER BY expressions must appear in select list
Server Response:
Error: response status is 500
{
"message": "Failed to search random",
"error": "Internal Server Error",
"statusCode": 500,
"correlationId": "p93x6n1q"
}
Additional information
curl -X 'POST' \
'https://demo.immich.app/api/search/random' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"withExif": true,
"page": 1,
"size": 100
}'