Websocket connect error after updating to 1.95.1 #2201

Closed
opened 2026-02-05 05:38:19 +03:00 by OVERLORD · 20 comments
Owner

Originally created by @eygraber on GitHub (Feb 21, 2024).

The bug

Websocket Connect Error Error: websocket error
    at Nt.onError (full-screen-modal.9WfeJgNa.js:1:9514)
    at ws.onerror (full-screen-modal.9WfeJgNa.js:1:16091)
23:33:04.049 full-screen-modal.9WfeJgNa.js:1 WebSocket connection to 'wss://<my host>/api/socket.io/?EIO=4&transport=websocket' failed: 
doOpen @ full-screen-modal.9WfeJgNa.js:1
open @ full-screen-modal.9WfeJgNa.js:1
open @ full-screen-modal.9WfeJgNa.js:1
v @ full-screen-modal.9WfeJgNa.js:1
open @ full-screen-modal.9WfeJgNa.js:1
(anonymous) @ full-screen-modal.9WfeJgNa.js:1
23:33:04.049 

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.95.1

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    user: 1000:1001
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    ports:
      - "2283:3001"
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    user: 1000:1001
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - /disks/storage/immich/volumes/geocoding:/usr/src/app/.reverse-geocoding-dump
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    user: 1000:1001
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - /disks/storage/immich/volumes/model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    user: 1000:1001
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /disks/storage/immich/volumes/pgdata:/var/lib/postgresql/data
    restart: always

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

PUID=1000
GUID=1001

# The location where your uploaded files are stored
UPLOAD_LOCATION=/disks/storage/immich/library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
DB_PASSWORD=...

TZ=America/New_York

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Open the website

Additional information

No response

Originally created by @eygraber on GitHub (Feb 21, 2024). ### The bug ``` Websocket Connect Error Error: websocket error at Nt.onError (full-screen-modal.9WfeJgNa.js:1:9514) at ws.onerror (full-screen-modal.9WfeJgNa.js:1:16091) 23:33:04.049 full-screen-modal.9WfeJgNa.js:1 WebSocket connection to 'wss://<my host>/api/socket.io/?EIO=4&transport=websocket' failed: doOpen @ full-screen-modal.9WfeJgNa.js:1 open @ full-screen-modal.9WfeJgNa.js:1 open @ full-screen-modal.9WfeJgNa.js:1 v @ full-screen-modal.9WfeJgNa.js:1 open @ full-screen-modal.9WfeJgNa.js:1 (anonymous) @ full-screen-modal.9WfeJgNa.js:1 23:33:04.049 ``` ### The OS that Immich Server is running on Ubuntu 22.04 ### Version of Immich Server v1.95.1 ### Version of Immich Mobile App N/A ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: user: 1000:1001 container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env ports: - "2283:3001" depends_on: - redis - database restart: always immich-microservices: user: 1000:1001 container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - /disks/storage/immich/volumes/geocoding:/usr/src/app/.reverse-geocoding-dump - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: user: 1000:1001 container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - /disks/storage/immich/volumes/model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: user: 1000:1001 container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - /disks/storage/immich/volumes/pgdata:/var/lib/postgresql/data restart: always ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables PUID=1000 GUID=1001 # The location where your uploaded files are stored UPLOAD_LOCATION=/disks/storage/immich/library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords DB_PASSWORD=... TZ=America/New_York # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ``` 1. Open the website ``` ### Additional information _No response_
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

Not sure if related, but the following warning shows up in the logs:

WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses
@eygraber commented on GitHub (Feb 21, 2024): Not sure if related, but the following warning shows up in the logs: ``` WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses ```
Author
Owner

@alextran1502 commented on GitHub (Feb 21, 2024):

Does it happen if you use local IP?

@alextran1502 commented on GitHub (Feb 21, 2024): Does it happen if you use local IP?
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

No, it doesn't happen is I use local IP

@eygraber commented on GitHub (Feb 21, 2024): No, it doesn't happen is I use local IP
Author
Owner

@alextran1502 commented on GitHub (Feb 21, 2024):

Try restart your proxy, it probably caches something

@alextran1502 commented on GitHub (Feb 21, 2024): Try restart your proxy, it probably caches something
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

I restarted it, and the issue still happens. Nothing suspicious in the proxy logs either.

@eygraber commented on GitHub (Feb 21, 2024): I restarted it, and the issue still happens. Nothing suspicious in the proxy logs either.
Author
Owner

@alextran1502 commented on GitHub (Feb 21, 2024):

Then try clear your browser cache

@alextran1502 commented on GitHub (Feb 21, 2024): Then try clear your browser cache
Author
Owner

@michelheusschen commented on GitHub (Feb 21, 2024):

Maybe your reverse proxy isn't configured to correctly forward websocket connections. Are you using nginx by chance? If so, please take a look at the nginx example config and make sure your configuration is correct.

@michelheusschen commented on GitHub (Feb 21, 2024): Maybe your reverse proxy isn't configured to correctly forward websocket connections. Are you using nginx by chance? If so, please take a look at the [nginx example config](https://immich.app/docs/administration/reverse-proxy#nginx-example-config) and make sure your configuration is correct.
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

It should be. It was working fine until I updated Immich.

@eygraber commented on GitHub (Feb 21, 2024): It should be. It was working fine until I updated Immich.
Author
Owner

@dwiprawira commented on GitHub (Feb 21, 2024):

I don't know whether it is related or not. But I cannot access Immich, and the Docker Compose logs show this error:

immich_microservices     | [Nest] 7  - 02/21/2024, 6:29:35 AM     LOG [CommunicationRepository] Initialized websocket server
immich_microservices     | /usr/src/app/dist/domain/database/database.service.js:137
immich_microservices     |             throw new Error(`
immich_microservices     |                   ^
immich_microservices     |
immich_microservices     | Error:
immich_microservices     |         The pgvecto.rs extension version is 0.1.11, but Immich only supports 0.2.0 and later minor releases.
immich_microservices     |
immich_microservices     |         If the Postgres instance already has a compatible version installed, Immich may not have the necessary permissions to activate it.
immich_microservices     |         In this case, please run 'ALTER EXTENSION UPDATE vectors' manually as a superuser.
immich_microservices     |         See https://immich.app/docs/guides/database-queries for how to query the database.
immich_microservices     |
immich_microservices     |         Otherwise, please update the version of pgvecto.rs in the Postgres instance to a compatible version.
immich_microservices     |     at DatabaseService.assertVectorExtension (/usr/src/app/dist/domain/database/database.service.js:137:19)
immich_microservices     |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices     |     at async /usr/src/app/dist/domain/database/database.service.js:39:13
immich_microservices     |     at async /usr/src/app/dist/infra/repositories/database.repository.js:185:23
immich_microservices     |
immich_microservices     | Node.js v20.11.0
@dwiprawira commented on GitHub (Feb 21, 2024): I don't know whether it is related or not. But I cannot access Immich, and the Docker Compose logs show this error: ``` immich_microservices | [Nest] 7 - 02/21/2024, 6:29:35 AM LOG [CommunicationRepository] Initialized websocket server immich_microservices | /usr/src/app/dist/domain/database/database.service.js:137 immich_microservices | throw new Error(` immich_microservices | ^ immich_microservices | immich_microservices | Error: immich_microservices | The pgvecto.rs extension version is 0.1.11, but Immich only supports 0.2.0 and later minor releases. immich_microservices | immich_microservices | If the Postgres instance already has a compatible version installed, Immich may not have the necessary permissions to activate it. immich_microservices | In this case, please run 'ALTER EXTENSION UPDATE vectors' manually as a superuser. immich_microservices | See https://immich.app/docs/guides/database-queries for how to query the database. immich_microservices | immich_microservices | Otherwise, please update the version of pgvecto.rs in the Postgres instance to a compatible version. immich_microservices | at DatabaseService.assertVectorExtension (/usr/src/app/dist/domain/database/database.service.js:137:19) immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_microservices | at async /usr/src/app/dist/domain/database/database.service.js:39:13 immich_microservices | at async /usr/src/app/dist/infra/repositories/database.repository.js:185:23 immich_microservices | immich_microservices | Node.js v20.11.0 ```
Author
Owner

@AirP0WeR commented on GitHub (Feb 21, 2024):

Same issue for me, Docker compose.

[Nest] 7  - 02/21/2024, 6:44:13 AM     LOG [CommunicationRepository] Initialized websocket server
/usr/src/app/dist/domain/database/database.service.js:137
            throw new Error(`

In DB instance

2024-02-21 06:51:18.285 UTC [40] ERROR:  pgvecto.rs: The index is not existing in the background worker.
	ADVICE: Drop or rebuild the index.
2024-02-21 06:51:18.285 UTC [40] STATEMENT:  
	          SELECT idx_status
	          FROM pg_vector_index_stat
	          WHERE indexname = $1

Update:

Finaly I update my DB image to image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0

Restart all services an it works!

@AirP0WeR commented on GitHub (Feb 21, 2024): Same issue for me, Docker compose. ``` [Nest] 7 - 02/21/2024, 6:44:13 AM LOG [CommunicationRepository] Initialized websocket server /usr/src/app/dist/domain/database/database.service.js:137 throw new Error(` ``` In DB instance ``` 2024-02-21 06:51:18.285 UTC [40] ERROR: pgvecto.rs: The index is not existing in the background worker. ADVICE: Drop or rebuild the index. 2024-02-21 06:51:18.285 UTC [40] STATEMENT: SELECT idx_status FROM pg_vector_index_stat WHERE indexname = $1 ``` Update: Finaly I update my DB image to ```image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0``` Restart all services an it works!
Author
Owner

@njzhenghao commented on GitHub (Feb 21, 2024):

same problem ,help

@njzhenghao commented on GitHub (Feb 21, 2024): same problem ,help
Author
Owner

@Dominion0815 commented on GitHub (Feb 21, 2024):

same here?!?

I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config
Without apache2 as reverse proxy login is possible.

@Dominion0815 commented on GitHub (Feb 21, 2024): same here?!? I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible.
Author
Owner

@MikeDeltaHH commented on GitHub (Feb 21, 2024):

Same issue for me, Docker compose.

[Nest] 7  - 02/21/2024, 6:44:13 AM     LOG [CommunicationRepository] Initialized websocket server
/usr/src/app/dist/domain/database/database.service.js:137
            throw new Error(`

In DB instance

2024-02-21 06:51:18.285 UTC [40] ERROR:  pgvecto.rs: The index is not existing in the background worker.
	ADVICE: Drop or rebuild the index.
2024-02-21 06:51:18.285 UTC [40] STATEMENT:  
	          SELECT idx_status
	          FROM pg_vector_index_stat
	          WHERE indexname = $1

Update:

Finaly I update my DB image to image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0

Restart all services an it works!

Same error and offered solution to change the image and restart the both docker container works for me, thanks!

@MikeDeltaHH commented on GitHub (Feb 21, 2024): > Same issue for me, Docker compose. > > ``` > [Nest] 7 - 02/21/2024, 6:44:13 AM LOG [CommunicationRepository] Initialized websocket server > /usr/src/app/dist/domain/database/database.service.js:137 > throw new Error(` > ``` > > In DB instance > > ``` > 2024-02-21 06:51:18.285 UTC [40] ERROR: pgvecto.rs: The index is not existing in the background worker. > ADVICE: Drop or rebuild the index. > 2024-02-21 06:51:18.285 UTC [40] STATEMENT: > SELECT idx_status > FROM pg_vector_index_stat > WHERE indexname = $1 > ``` > > Update: > > Finaly I update my DB image to `image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0` > > Restart all services an it works! Same error and offered solution to change the image and restart the both docker container works for me, thanks!
Author
Owner

@hukoeth commented on GitHub (Feb 21, 2024):

same here?!?

I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible.

I had the same issue. In my apache configuration I had a directive to add HttpOnly to most cookies. PR #6765 adds some code to access cookies in JavaScript and so HttpOnly Cookies don't work.

@hukoeth commented on GitHub (Feb 21, 2024): > same here?!? > > I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible. I had the same issue. In my apache configuration I had a directive to add HttpOnly to most cookies. PR #6765 adds some code to access cookies in JavaScript and so HttpOnly Cookies don't work.
Author
Owner

@Dominion0815 commented on GitHub (Feb 21, 2024):

same here?!?
I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible.

I had the same issue. In my apache configuration I had a directive to add HttpOnly to most cookies. PR #6765 adds some code to access cookies in JavaScript and so HttpOnly Cookies don't work.

Deactivating "Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure" has helped ... thanks

@Dominion0815 commented on GitHub (Feb 21, 2024): > > same here?!? > > I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible. > > I had the same issue. In my apache configuration I had a directive to add HttpOnly to most cookies. PR #6765 adds some code to access cookies in JavaScript and so HttpOnly Cookies don't work. Deactivating "Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure" has helped ... thanks
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

None of those solutions address my issue. I had already updated the docker image, and I don't use Apache. Not sure why this was closed 🤔

@eygraber commented on GitHub (Feb 21, 2024): None of those solutions address my issue. I had already updated the docker image, and I don't use Apache. Not sure why this was closed 🤔
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

Looks like the nginx docs were updated - https://immich.app/docs/administration/reverse-proxy#nginx-example-config

It would be nice if stuff like this was called out in the release notes.

@eygraber commented on GitHub (Feb 21, 2024): Looks like the nginx docs were updated - https://immich.app/docs/administration/reverse-proxy#nginx-example-config It would be nice if stuff like this was called out in the release notes.
Author
Owner

@jrasm91 commented on GitHub (Feb 21, 2024):

Looks like the nginx docs were updated - https://immich.app/docs/administration/reverse-proxy#nginx-example-config

It would be nice if stuff like this was called out in the release notes.

https://github.com/immich-app/immich/releases/tag/v1.94.0

@jrasm91 commented on GitHub (Feb 21, 2024): > Looks like the nginx docs were updated - https://immich.app/docs/administration/reverse-proxy#nginx-example-config > > It would be nice if stuff like this was called out in the release notes. https://github.com/immich-app/immich/releases/tag/v1.94.0
Author
Owner

@eygraber commented on GitHub (Feb 21, 2024):

Huh interesting. Not sure how I missed that, and also missed the error in 1.94.0 ¯\_(ツ)_/¯

@eygraber commented on GitHub (Feb 21, 2024): Huh interesting. Not sure how I missed that, and also missed the error in 1.94.0 ¯\\\_(ツ)\_/¯
Author
Owner

@DragonQ commented on GitHub (Jun 9, 2025):

same here?!?
I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible.

I had the same issue. In my apache configuration I had a directive to add HttpOnly to most cookies. PR #6765 adds some code to access cookies in JavaScript and so HttpOnly Cookies don't work.

Deactivating "Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure" has helped ... thanks

Thanks so much, I was going crazy trying to work out why my Apache reverse proxy wouldn't work with Immich! Why is this not mentioned anywhere in the documentation??

@DragonQ commented on GitHub (Jun 9, 2025): > > > same here?!? > > > I cannot login with apache2 config https://immich.app/docs/administration/reverse-proxy/#apache-example-config Without apache2 as reverse proxy login is possible. > > > > > > I had the same issue. In my apache configuration I had a directive to add HttpOnly to most cookies. PR [#6765](https://github.com/immich-app/immich/pull/6765) adds some code to access cookies in JavaScript and so HttpOnly Cookies don't work. > > Deactivating "Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure" has helped ... thanks Thanks so much, I was going crazy trying to work out why my Apache reverse proxy wouldn't work with Immich! Why is this not mentioned anywhere in the documentation??
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2201