Cannot read properties of undefined (reading '0') (500) #2257

Closed
opened 2026-02-05 05:54:24 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @iamdaaan on GitHub (Feb 25, 2024).

The bug

I recently updated to 1.95.1 from 1.94.1, I struggled to get everything to connect to the database, but after following the steps in the 1.95 release notes everything seems to be up apart from the web image.

It reads 'Cannot read properties of undefined (reading '0') (500)' with the stacktrace on the web portal:
Cannot read properties of undefined (reading '0') - 500
TypeError: Cannot read properties of undefined (reading '0')
at file:///usr/src/app/build/server/chunks/user-avatar-a778373a.js:62:43
at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)
at file:///usr/src/app/build/server/chunks/user-page-layout-4dc14ea3.js:87:112
at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)
at file:///usr/src/app/build/server/chunks/user-page-layout-4dc14ea3.js:423:90
at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)
at file:///usr/src/app/build/server/chunks/_page.svelte-da8f5532.js:171:70
at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)
at Object.default (file:///usr/src/app/build/server/chunks/index-71abf9b6.js:66:98)
at file:///usr/src/app/build/server/chunks/_layout.svelte-aeb5420d.js:344:52

When looking in the Docker logs, the immich-web container keeps repeating the error:
[hooks.server.ts]:handleError Not found: /api/socket.io/
or variations thereof, such as Not found: /api/server-info/version, /api/server-info/config, and /api/server-info/features, at the beginning of the log.

All other services are showing as up and ready for connections.

The OS that Immich Server is running on

Windows 11 Docker Desktop

Version of Immich Server

v1.95.1

Version of Immich Mobile App

v1.95.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION}
    entrypoint: ["/bin/sh", "./start-server.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    environment:
      DB_HOSTNAME: ${DB_HOSTNAME}
      DB_PASSWORD: ${DB_PASSWORD}
      DB_USERNAME: ${DB_USERNAME}
      DB_DATABASE_NAME: ${DB_DATABASE_NAME}
      TYPESENSE_API_KEY: ${TYPESENSE_API_KEY}
    depends_on:
      - redis
      - database
      - typesense
    restart: unless-stopped
    networks:
      - immich

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION}
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities:
                - gpu
                - compute
                - video
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    environment:
      DB_HOSTNAME: ${DB_HOSTNAME}
      DB_PASSWORD: ${DB_PASSWORD}
      DB_USERNAME: ${DB_USERNAME}
      DB_DATABASE_NAME: ${DB_DATABASE_NAME}
    depends_on:
      - redis
      - database
      - typesense
    restart: unless-stopped
    networks:
      - immich

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION}-cuda
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities:
                - gpu
                - compute
                - video
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${MODEL_CACHE_LOCATION}:/cache
    restart: unless-stopped
    networks:
      - immich

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    ports:
      - 2283:3000
    restart: unless-stopped
    networks:
      - immich

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.0
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    volumes:
      - ${TYPESENSE_DATA_LOCATION}:/data
    restart: unless-stopped
    networks:
      - immich

  redis:
    container_name: immich_redis
    image: redis:6.2
    restart: unless-stopped
    networks:
      - immich

  database:
    container_name: database
    image: tensorchord/pgvecto-rs:pg14-v0.2.0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ${POSTGRES_DATA_LOCATION}:/var/lib/postgresql/data
    restart: unless-stopped
    networks:
      - immich

networks:
  immich:
    driver: bridge

Your .env content

DB_HOSTNAME=database
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
UPLOAD_LOCATION="B:/Pictures/Immich"
MODEL_CACHE_LOCATION="C:/Users/Server/Docker Volumes/immich/model-cache"
POSTGRES_DATA_LOCATION="C:/Users/Server/Docker Volumes/immich/postgres"
TYPESENSE_DATA_LOCATION="C:/Users/Server/Docker Volumes/immich/typesense"
TYPESENSE_API_KEY=Ol1mT2dkqQzElxbQ5GjNxH0OR1MwBbTZ
IMMICH_VERSION=release

Reproduction steps

1. Updated to v1.95.1
2. Followed upgrade steps in v1.95.1 release notes.
3. Had to change postgres password back to default of 'postgres' as authentication failed
4. Cannot log into web portal on http://localhost:2283

Additional information

No response

Originally created by @iamdaaan on GitHub (Feb 25, 2024). ### The bug I recently updated to 1.95.1 from 1.94.1, I struggled to get everything to connect to the database, but after following the steps in the 1.95 release notes everything seems to be up apart from the web image. It reads 'Cannot read properties of undefined (reading '0') (500)' with the stacktrace on the web portal: `Cannot read properties of undefined (reading '0') - 500` `TypeError: Cannot read properties of undefined (reading '0')` ` at file:///usr/src/app/build/server/chunks/user-avatar-a778373a.js:62:43` ` at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)` ` at file:///usr/src/app/build/server/chunks/user-page-layout-4dc14ea3.js:87:112` ` at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)` ` at file:///usr/src/app/build/server/chunks/user-page-layout-4dc14ea3.js:423:90` ` at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)` ` at file:///usr/src/app/build/server/chunks/_page.svelte-da8f5532.js:171:70` ` at Object.$$render (file:///usr/src/app/build/server/chunks/ssr-73b2a7c2.js:264:18)` ` at Object.default (file:///usr/src/app/build/server/chunks/index-71abf9b6.js:66:98)` ` at file:///usr/src/app/build/server/chunks/_layout.svelte-aeb5420d.js:344:52` When looking in the Docker logs, the immich-web container keeps repeating the error: `[hooks.server.ts]:handleError Not found: /api/socket.io/` or variations thereof, such as Not found: `/api/server-info/version`, `/api/server-info/config`, and `/api/server-info/features`, at the beginning of the log. All other services are showing as up and ready for connections. ### The OS that Immich Server is running on Windows 11 Docker Desktop ### Version of Immich Server v1.95.1 ### Version of Immich Mobile App v1.95.1 ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION} entrypoint: ["/bin/sh", "./start-server.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload environment: DB_HOSTNAME: ${DB_HOSTNAME} DB_PASSWORD: ${DB_PASSWORD} DB_USERNAME: ${DB_USERNAME} DB_DATABASE_NAME: ${DB_DATABASE_NAME} TYPESENSE_API_KEY: ${TYPESENSE_API_KEY} depends_on: - redis - database - typesense restart: unless-stopped networks: - immich immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION} deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu - compute - video entrypoint: ["/bin/sh", "./start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload environment: DB_HOSTNAME: ${DB_HOSTNAME} DB_PASSWORD: ${DB_PASSWORD} DB_USERNAME: ${DB_USERNAME} DB_DATABASE_NAME: ${DB_DATABASE_NAME} depends_on: - redis - database - typesense restart: unless-stopped networks: - immich immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION}-cuda deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu - compute - video volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - ${MODEL_CACHE_LOCATION}:/cache restart: unless-stopped networks: - immich immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:release entrypoint: ["/bin/sh", "./entrypoint.sh"] ports: - 2283:3000 restart: unless-stopped networks: - immich typesense: container_name: immich_typesense image: typesense/typesense:0.24.0 environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data volumes: - ${TYPESENSE_DATA_LOCATION}:/data restart: unless-stopped networks: - immich redis: container_name: immich_redis image: redis:6.2 restart: unless-stopped networks: - immich database: container_name: database image: tensorchord/pgvecto-rs:pg14-v0.2.0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - ${POSTGRES_DATA_LOCATION}:/var/lib/postgresql/data restart: unless-stopped networks: - immich networks: immich: driver: bridge ``` ### Your .env content ```Shell DB_HOSTNAME=database DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis UPLOAD_LOCATION="B:/Pictures/Immich" MODEL_CACHE_LOCATION="C:/Users/Server/Docker Volumes/immich/model-cache" POSTGRES_DATA_LOCATION="C:/Users/Server/Docker Volumes/immich/postgres" TYPESENSE_DATA_LOCATION="C:/Users/Server/Docker Volumes/immich/typesense" TYPESENSE_API_KEY=Ol1mT2dkqQzElxbQ5GjNxH0OR1MwBbTZ IMMICH_VERSION=release ``` ### Reproduction steps ```bash 1. Updated to v1.95.1 2. Followed upgrade steps in v1.95.1 release notes. 3. Had to change postgres password back to default of 'postgres' as authentication failed 4. Cannot log into web portal on http://localhost:2283 ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2257