[BUG] Internal server error 500 when clicking "Explore" #756

Closed
opened 2026-02-04 22:19:03 +03:00 by OVERLORD · 16 comments
Owner

Originally created by @bertmelis on GitHub (Mar 20, 2023).

The bug

When clicking "Explore" on the web, the server generates an internal error 500.

immich-server shows this log:

[Nest] 1  - 03/20/2023, 5:42:08 PM   ERROR [ExceptionsHandler] Request failed with HTTP code 400 | Server said: Error with filter field `exifInfo.state`: Filter value cannot be empty.

RequestMalformed: Request failed with HTTP code 400 | Server said: Error with filter field `exifInfo.state`: Filter value cannot be empty.

    at RequestMalformed.TypesenseError [as constructor] (/usr/src/app/node_modules/typesense/lib/Typesense/Errors/TypesenseError.js:23:28)

    at new RequestMalformed (/usr/src/app/node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js:25:42)

    at ApiCall.customErrorForResponse (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:332:21)

    at /usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:199:98

    at step (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:33:23)

    at Object.next (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:14:53)

    at step (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:18:139)

    at Object.next (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:14:53)

    at fulfilled (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:5:58)

    at runMicrotasks (<anonymous>)

image

The OS that Immich Server is running on

RHEL9

Version of Immich Server

v1.51.0

Version of Immich Mobile App

v1.50.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

standard, like the official

Your .env content

standard, like the official

Reproduction steps

Updated the containers to v1.51.0
Clicked "Explore" in the web interface.

Additional information

No response

Originally created by @bertmelis on GitHub (Mar 20, 2023). ### The bug When clicking "Explore" on the web, the server generates an internal error 500. immich-server shows this log: ``` [Nest] 1 - 03/20/2023, 5:42:08 PM ERROR [ExceptionsHandler] Request failed with HTTP code 400 | Server said: Error with filter field `exifInfo.state`: Filter value cannot be empty. RequestMalformed: Request failed with HTTP code 400 | Server said: Error with filter field `exifInfo.state`: Filter value cannot be empty. at RequestMalformed.TypesenseError [as constructor] (/usr/src/app/node_modules/typesense/lib/Typesense/Errors/TypesenseError.js:23:28) at new RequestMalformed (/usr/src/app/node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js:25:42) at ApiCall.customErrorForResponse (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:332:21) at /usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:199:98 at step (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:33:23) at Object.next (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:14:53) at step (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:18:139) at Object.next (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:14:53) at fulfilled (/usr/src/app/node_modules/typesense/lib/Typesense/ApiCall.js:5:58) at runMicrotasks (<anonymous>) ``` ![image](https://user-images.githubusercontent.com/23474336/226424086-c207bb4d-7b6b-4dee-a35c-1666dce32437.png) ### The OS that Immich Server is running on RHEL9 ### Version of Immich Server v1.51.0 ### Version of Immich Mobile App v1.50.0 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML standard, like the official ``` ### Your .env content ```Shell standard, like the official ``` ### Reproduction steps ```bash Updated the containers to v1.51.0 Clicked "Explore" in the web interface. ``` ### Additional information _No response_
Author
Owner

@bo0tzz commented on GitHub (Mar 20, 2023):

Did you add the new typesense container as specified in the release notes?

@bo0tzz commented on GitHub (Mar 20, 2023): Did you add the new typesense container as specified in the release notes?
Author
Owner

@ytzelf commented on GitHub (Mar 20, 2023):

Is there any way to define the network name of the typesense server? It's hardcoded as "typesense" afaik (and not immich_typesense). I don't see that option in the current .env

@ytzelf commented on GitHub (Mar 20, 2023): Is there any way to define the network name of the typesense server? It's hardcoded as "typesense" afaik (and not immich_typesense). I don't see that option in the current .env
Author
Owner

@jrasm91 commented on GitHub (Mar 20, 2023):

The communication happens over http and the default hostname the immich server tries to connect to is typesense. This can be changed with the env variable TYPESENSE_HOST.

typesense is the service name in the updated docker-compose file, and the container name is set to be immich_typesense by default.

@jrasm91 commented on GitHub (Mar 20, 2023): The communication happens over http and the default hostname the immich server tries to connect to is `typesense`. This can be changed with the env variable `TYPESENSE_HOST`. `typesense` is the service name in the updated docker-compose file, and the container name is set to be `immich_typesense` by default.
Author
Owner

@bertmelis commented on GitHub (Mar 20, 2023):

Did you add the new typesense container as specified in the release notes?

Yes, it's running fine. No suspicious logs there.

@bertmelis commented on GitHub (Mar 20, 2023): > Did you add the new typesense container as specified in the release notes? Yes, it's running fine. No suspicious logs there.
Author
Owner

@bertmelis commented on GitHub (Mar 20, 2023):

It might have something to do with the hostname indeed. I'm running the stack with Podman and not Docker. I'll see if I can sort this out.

@bertmelis commented on GitHub (Mar 20, 2023): It might have something to do with the hostname indeed. I'm running the stack with Podman and not Docker. I'll see if I can sort this out.
Author
Owner

@bertmelis commented on GitHub (Mar 20, 2023):

So, containers in a podman pod communicate through localhost. So I added TYPESENSE_HOST=localhost to the .env file.

It tries to connect, but the connection is refused...

In immich-server logs:
Error: connect ECONNREFUSED 127.0.0.1:8108

The whole stack now fails with error 500 obviously. I'm digging deeper. Hints are welcome.

EDIT: Is Typesense listening on all interfaces, or only a specified one?

@bertmelis commented on GitHub (Mar 20, 2023): So, containers in a podman pod communicate through localhost. So I added `TYPESENSE_HOST=localhost` to the `.env` file. It tries to connect, but the connection is refused... In immich-server logs: ` Error: connect ECONNREFUSED 127.0.0.1:8108` The whole stack now fails with error 500 obviously. I'm digging deeper. Hints are welcome. EDIT: Is Typesense listening on all interfaces, or only a specified one?
Author
Owner

@jrasm91 commented on GitHub (Mar 20, 2023):

BTW - the actual error you originally posted about a malformed request looks to be a immich bug, not a typesense issue or even a communication issue.

@jrasm91 commented on GitHub (Mar 20, 2023): BTW - the actual error you originally posted about a malformed request looks to be a immich bug, not a typesense issue or even a communication issue.
Author
Owner

@bertmelis commented on GitHub (Mar 20, 2023):

Yes, I'll try to reproduce the original error and post the log again.

@bertmelis commented on GitHub (Mar 20, 2023): Yes, I'll try to reproduce the original error and post the log again.
Author
Owner

@Nobrac commented on GitHub (Mar 20, 2023):

I have the exact same error with a completely new installed Immich server from scratch. My OS is RHEL 8.6.
Everything else is working fine. I use the default .env and docker-compose.yml file.

Accessing Immich from external via Nginx Proxy Manager or using the internal IP of the VM inside the network doesn't matter. It's the same result.

immich

@Nobrac commented on GitHub (Mar 20, 2023): I have the exact same error with a completely new installed Immich server from scratch. My OS is RHEL 8.6. Everything else is working fine. I use the default .env and docker-compose.yml file. Accessing Immich from external via Nginx Proxy Manager or using the internal IP of the VM inside the network doesn't matter. It's the same result. ![immich](https://user-images.githubusercontent.com/22682116/226453120-a5057711-509c-42bd-abe0-ca7c502cd00d.PNG)
Author
Owner

@bertmelis commented on GitHub (Mar 20, 2023):

I'm about to completely ruin my system... Can't really reproduce anymore. When defining the hostname (localhost) I do get this:

Request #1679342542451: Request to Node 0 failed due to "ECONNREFUSED connect ECONNREFUSED 127.0.0.1:8108"

Typesense isn't reachable.

I added an extra container to the stack to curl into Typesense but the connection was refused...

@bertmelis commented on GitHub (Mar 20, 2023): I'm about to completely ruin my system... Can't really reproduce anymore. When defining the hostname (`localhost`) I do get this: ``` Request #1679342542451: Request to Node 0 failed due to "ECONNREFUSED connect ECONNREFUSED 127.0.0.1:8108" ``` Typesense isn't reachable. I added an extra container to the stack to curl into Typesense but the connection was refused...
Author
Owner

@alextran1502 commented on GitHub (Mar 20, 2023):

Let us take a look at the issue and will advise you

@alextran1502 commented on GitHub (Mar 20, 2023): Let us take a look at the issue and will advise you
Author
Owner

@alextran1502 commented on GitHub (Mar 21, 2023):

Confirm that we also experiencing this issue of accessing the Explore page on some of the accounts. On my production instance, I can access with my account but my wife account has problem accessing it, same 500 error. We are working on identifying the cause for a hot fix

@alextran1502 commented on GitHub (Mar 21, 2023): Confirm that we also experiencing this issue of accessing the Explore page on some of the accounts. On my production instance, I can access with my account but my wife account has problem accessing it, same 500 error. We are working on identifying the cause for a hot fix
Author
Owner

@jrasm91 commented on GitHub (Mar 21, 2023):

Pretty sure this is caused by some of the data having spaces or parens in it. Will probably need to escape those in the query to typesense. Should be easy enough to fix later tonight.

@jrasm91 commented on GitHub (Mar 21, 2023): Pretty sure this is caused by some of the data having spaces or parens in it. Will probably need to escape those in the query to typesense. Should be easy enough to fix later tonight.
Author
Owner

@alextran1502 commented on GitHub (Mar 21, 2023):

Let me know if the release 1.51.1 help fix this issue.

@alextran1502 commented on GitHub (Mar 21, 2023): Let me know if the release 1.51.1 help fix this issue.
Author
Owner

@JosiahBull commented on GitHub (Mar 21, 2023):

Upgrading to 1.51.1 has not solved this issue for me.

Please find screenshot attached of errors in the log:
image

image

@JosiahBull commented on GitHub (Mar 21, 2023): Upgrading to 1.51.1 has not solved this issue for me. Please find screenshot attached of errors in the log: ![image](https://user-images.githubusercontent.com/29187591/226522000-13906511-72bb-43d9-bc37-45bff3f65484.png) ![image](https://user-images.githubusercontent.com/29187591/226522703-939ea010-57a0-4bf0-bdb0-606b85c14040.png)
Author
Owner

@bertmelis commented on GitHub (Mar 21, 2023):

1.51.1 did solve the issue for me. 👍

@bertmelis commented on GitHub (Mar 21, 2023): 1.51.1 did solve the issue for me. 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#756