Facial Recognition fails with "could not find function 'vector_in_wrapper'" #2091

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

Originally created by @jesta030 on GitHub (Jan 31, 2024).

The bug

Running facial recognition yields no results. The logs show this error:

[Nest] 222  - 01/31/2024, 3:14:36 PM   ERROR [JobService] Unable to run job handler (faceDetection/face-detection): QueryFailedError: could not find function "vector_in_wrapper" in file "/usr/lib/postgresql/15/lib/vectors.so"
[Nest] 222  - 01/31/2024, 3:14:36 PM   ERROR [JobService] QueryFailedError: could not find function "vector_in_wrapper" in file "/usr/lib/postgresql/15/lib/vectors.so"
    at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async InsertQueryBuilder.execute (/app/immich/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
    at async PersonRepository.createFace (/app/immich/server/dist/infra/repositories/person.repository.js:176:9)
    at async PersonService.handleDetectFaces (/app/immich/server/dist/domain/person/person.service.js:259:13)
    at async /app/immich/server/dist/domain/job/job.service.js:116:37
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 222  - 01/31/2024, 3:14:36 PM   ERROR [JobService] Object:
{
  "id": "099e1014-382a-4fe3-a3b9-edf51e623c80"
}

The OS that Immich Server is running on

Unraid

Version of Immich Server

1.93.3

Version of Immich Mobile App

v.1.0.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Using regular docker containers on Unraid with PostreSQL15 and Redis in the same docker network.

Docker run command for Immich:
docker run
  -d
  --name='immich'
  --net='immich'
  -e TZ="Europe/Berlin"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Tower"
  -e HOST_CONTAINERNAME="immich"
  -e 'DB_HOSTNAME'='postgresql15'
  -e 'DB_USERNAME'='redacted'
  -e 'DB_PASSWORD'='redacted'
  -e 'DB_DATABASE_NAME'='redacted'
  -e 'REDIS_HOSTNAME'='redis'
  -e 'DISABLE_MACHINE_LEARNING'='false'
  -e 'DISABLE_TYPESENSE'='false'
  -e 'DB_PORT'='5432'
  -e 'REDIS_PORT'='6379'
  -e 'REDIS_PASSWORD'='redacted'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8002]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
  -p '8002:8080/tcp'
  -v '/mnt/user/photo/upload':'/photos':'rw'
  -v '/mnt/user/photo/library':'/library':'ro'
  -v '/mnt/user/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich'

Your .env content

See above

Reproduction steps

1. Run or rerun facial recognition
2. Watch logs scroll by

Additional information

This used to work in a prior version about half a year ago with this setup.

Originally created by @jesta030 on GitHub (Jan 31, 2024). ### The bug Running facial recognition yields no results. The logs show this error: ``` [Nest] 222 - 01/31/2024, 3:14:36 PM ERROR [JobService] Unable to run job handler (faceDetection/face-detection): QueryFailedError: could not find function "vector_in_wrapper" in file "/usr/lib/postgresql/15/lib/vectors.so" [Nest] 222 - 01/31/2024, 3:14:36 PM ERROR [JobService] QueryFailedError: could not find function "vector_in_wrapper" in file "/usr/lib/postgresql/15/lib/vectors.so" at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async InsertQueryBuilder.execute (/app/immich/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33) at async PersonRepository.createFace (/app/immich/server/dist/infra/repositories/person.repository.js:176:9) at async PersonService.handleDetectFaces (/app/immich/server/dist/domain/person/person.service.js:259:13) at async /app/immich/server/dist/domain/job/job.service.js:116:37 at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) [Nest] 222 - 01/31/2024, 3:14:36 PM ERROR [JobService] Object: { "id": "099e1014-382a-4fe3-a3b9-edf51e623c80" } ``` ### The OS that Immich Server is running on Unraid ### Version of Immich Server 1.93.3 ### Version of Immich Mobile App v.1.0.0 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML Using regular docker containers on Unraid with PostreSQL15 and Redis in the same docker network. Docker run command for Immich: docker run -d --name='immich' --net='immich' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="immich" -e 'DB_HOSTNAME'='postgresql15' -e 'DB_USERNAME'='redacted' -e 'DB_PASSWORD'='redacted' -e 'DB_DATABASE_NAME'='redacted' -e 'REDIS_HOSTNAME'='redis' -e 'DISABLE_MACHINE_LEARNING'='false' -e 'DISABLE_TYPESENSE'='false' -e 'DB_PORT'='5432' -e 'REDIS_PORT'='6379' -e 'REDIS_PASSWORD'='redacted' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='022' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8002]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png' -p '8002:8080/tcp' -v '/mnt/user/photo/upload':'/photos':'rw' -v '/mnt/user/photo/library':'/library':'ro' -v '/mnt/user/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich' ``` ### Your .env content ```Shell See above ``` ### Reproduction steps ```bash 1. Run or rerun facial recognition 2. Watch logs scroll by ``` ### Additional information This used to work in a prior version about half a year ago with this setup.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2091