TypeError: Cannot read properties of undefined (reading 'dimsize') #5754

Closed
opened 2026-02-05 11:43:14 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @YowFung on GitHub (Apr 2, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I am using two containers: immich-server and immich-microservices. I can access the web page but cannot perform tasks such as thumbnail generation and facial recognition.

Here is the critical error message from the immich-microservices container:

TypeError: Cannot read properties of undefined (reading 'dimsize')

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.131.1

Version of Immich Mobile App

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

sudo docker run -d -it \
  --name immich-microservices \
  --restart always \
  --network prod \
  --group-add 44 \
  --group-add 109 \
  --device /dev/dri:/dev/dri \
  -v /etc/localtime:/etc/localtime:ro \
  -v /docker/immich-server:/usr/src/app/upload \
  -e DB_HOSTNAME=postgres14 \
  -e DB_USERNAME=xxxx \
  -e DB_PASSWORD=xxxx \
  -e DB_DATABASE_NAME=immich \
  -e REDIS_HOSTNAME=redis \
  -e IMMICH_WORKERS_EXCLUDE=api \
  -e TZ=Asia/Shanghai \
  ghcr.io/immich-app/immich-server:release

Your .env content

-e DB_HOSTNAME=postgres14 \
  -e DB_USERNAME=xxxx \
  -e DB_PASSWORD=xxxx \
  -e DB_DATABASE_NAME=immich \
  -e REDIS_HOSTNAME=redis \
  -e IMMICH_WORKERS_EXCLUDE=api \
  -e TZ=Asia/Shanghai \

Reproduction steps

  1. Run docker run... command.
  2. Watch the logs.
  3. Container can't start and get the error in logs.

Relevant log output

$ docker logs immich-microservices
Initializing Immich v1.131.1
Detected CPU Cores: 4
Starting microservices worker
[Nest] 7  - 04/02/2025, 1:30:41 PM     LOG [Microservices:EventRepository] Initialized websocket server
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:DatabaseRepository] Running migrations, this may take a while
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:MetadataService] Bootstrapping metadata service
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:MetadataService] Initializing metadata service
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:MapRepository] Initializing metadata repository
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:MetadataService] Initialized local reverse geocoder
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:ServerService] Feature Flags: {
  "smartSearch": true,
  "facialRecognition": true,
  "duplicateDetection": true,
  "map": true,
  "reverseGeocoding": true,
  "importFaces": true,
  "sidecar": true,
  "search": true,
  "trash": true,
  "oauth": false,
  "oauthAutoLaunch": false,
  "passwordLogin": true,
  "configFile": false,
  "email": true
}
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:StorageService] Successfully verified system mount folder checks
[Nest] 7  - 04/02/2025, 1:30:42 PM     LOG [Microservices:LibraryService] Starting to watch library 8ad1cd63-8fa6-4d20-ace9-57de99c11b2f with import path(s) /usr/src/app/external-library/
[Nest] 7  - 04/02/2025, 1:30:43 PM     LOG [Microservices:LibraryService] Starting to watch library 5e40e5da-b5b2-4821-98bd-f613cb56efc9 with import path(s) /usr/src/app/external-library
TypeError: Cannot read properties of undefined (reading 'dimsize')
    at SearchRepository.getDimensionSize (/usr/src/app/dist/repositories/search.repository.js:197:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /usr/src/app/dist/services/smart-info.service.js:43:31
    at async /usr/src/app/dist/repositories/database.repository.js:231:27
    at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:413:20
    at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)
    at async /usr/src/app/dist/repositories/database.repository.js:228:13
microservices worker error: TypeError: Cannot read properties of undefined (reading 'dimsize'), stack: TypeError: Cannot read properties of undefined (reading 'dimsize')
    at SearchRepository.getDimensionSize (/usr/src/app/dist/repositories/search.repository.js:197:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /usr/src/app/dist/services/smart-info.service.js:43:31
    at async /usr/src/app/dist/repositories/database.repository.js:231:27
    at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:413:20
    at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)
    at async /usr/src/app/dist/repositories/database.repository.js:228:13
microservices worker exited with code 1

Additional information

A few days ago, I suddenly couldn't access my immich-server. After troubleshooting, I found it was related to a PostgreSQL issue. Later, I upgraded immich-server and manually dropped then recreated the indexes in the database, which restored access to immich-server. However, immich-microservices then started throwing the current error.

Originally created by @YowFung on GitHub (Apr 2, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I am using two containers: `immich-server` and `immich-microservices`. I can access the web page but cannot perform tasks such as thumbnail generation and facial recognition. Here is the critical error message from the `immich-microservices` container: ```log TypeError: Cannot read properties of undefined (reading 'dimsize') ``` ### The OS that Immich Server is running on Debian ### Version of Immich Server v1.131.1 ### Version of Immich Mobile App - ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML sudo docker run -d -it \ --name immich-microservices \ --restart always \ --network prod \ --group-add 44 \ --group-add 109 \ --device /dev/dri:/dev/dri \ -v /etc/localtime:/etc/localtime:ro \ -v /docker/immich-server:/usr/src/app/upload \ -e DB_HOSTNAME=postgres14 \ -e DB_USERNAME=xxxx \ -e DB_PASSWORD=xxxx \ -e DB_DATABASE_NAME=immich \ -e REDIS_HOSTNAME=redis \ -e IMMICH_WORKERS_EXCLUDE=api \ -e TZ=Asia/Shanghai \ ghcr.io/immich-app/immich-server:release ``` ### Your .env content ```Shell -e DB_HOSTNAME=postgres14 \ -e DB_USERNAME=xxxx \ -e DB_PASSWORD=xxxx \ -e DB_DATABASE_NAME=immich \ -e REDIS_HOSTNAME=redis \ -e IMMICH_WORKERS_EXCLUDE=api \ -e TZ=Asia/Shanghai \ ``` ### Reproduction steps 1. Run `docker run...` command. 2. Watch the logs. 3. Container can't start and get the error in logs. ### Relevant log output ```shell $ docker logs immich-microservices Initializing Immich v1.131.1 Detected CPU Cores: 4 Starting microservices worker [Nest] 7 - 04/02/2025, 1:30:41 PM LOG [Microservices:EventRepository] Initialized websocket server [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:DatabaseRepository] Running migrations, this may take a while [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:MetadataService] Bootstrapping metadata service [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:MetadataService] Initializing metadata service [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:MapRepository] Initializing metadata repository [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:MetadataService] Initialized local reverse geocoder [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:ServerService] Feature Flags: { "smartSearch": true, "facialRecognition": true, "duplicateDetection": true, "map": true, "reverseGeocoding": true, "importFaces": true, "sidecar": true, "search": true, "trash": true, "oauth": false, "oauthAutoLaunch": false, "passwordLogin": true, "configFile": false, "email": true } [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}} [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:StorageService] Successfully verified system mount folder checks [Nest] 7 - 04/02/2025, 1:30:42 PM LOG [Microservices:LibraryService] Starting to watch library 8ad1cd63-8fa6-4d20-ace9-57de99c11b2f with import path(s) /usr/src/app/external-library/ [Nest] 7 - 04/02/2025, 1:30:43 PM LOG [Microservices:LibraryService] Starting to watch library 5e40e5da-b5b2-4821-98bd-f613cb56efc9 with import path(s) /usr/src/app/external-library TypeError: Cannot read properties of undefined (reading 'dimsize') at SearchRepository.getDimensionSize (/usr/src/app/dist/repositories/search.repository.js:197:32) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async /usr/src/app/dist/services/smart-info.service.js:43:31 at async /usr/src/app/dist/repositories/database.repository.js:231:27 at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:413:20 at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20) at async /usr/src/app/dist/repositories/database.repository.js:228:13 microservices worker error: TypeError: Cannot read properties of undefined (reading 'dimsize'), stack: TypeError: Cannot read properties of undefined (reading 'dimsize') at SearchRepository.getDimensionSize (/usr/src/app/dist/repositories/search.repository.js:197:32) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async /usr/src/app/dist/services/smart-info.service.js:43:31 at async /usr/src/app/dist/repositories/database.repository.js:231:27 at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:413:20 at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20) at async /usr/src/app/dist/repositories/database.repository.js:228:13 microservices worker exited with code 1 ``` ### Additional information A few days ago, I suddenly couldn't access my immich-server. After troubleshooting, I found it was related to a PostgreSQL issue. Later, I upgraded immich-server and manually dropped then recreated the indexes in the database, which restored access to immich-server. However, immich-microservices then started throwing the current error.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#5754