I
Immich•3mo ago
timepasteque

Smart search / facial recog. error : embedding.join() is not a function

Hello all, hope you are well. Firstly, I am a newbie in unix and self hosting overall. I recently installed immich-server on my Rasp 4, working really good with the interface and uploads etc. Until then, I had deactivated immich machine learning as my poor RPI 4 wouldnt be able to handle it. Instead, I chose to install it on my big gaming setup rolling on RTX 3060 ti, i7-10700K Win 11. Right now, Immich-ML is running on docker on windows with WSL, logs seem fine. It downloaded the models requiered as set on immich server on its own. As I try to load it with facial recognition tasks, I see that it receives a consequent amount of data and also returns some, which makes me believe that the immich ML side works properly. However, as I trigger a smart search or a facial recognition from the interface (so from immich server), nothing happens back (search fails, facial recognition shows no change) even though packages were sent and the process seem to have happened immich ML side. logs, docker compose and env down below
15 Replies
Immich
Immich•3mo ago
:wave: Hey @timepasteque, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
timepasteque
timepastequeOP•3mo ago
Immich server logs DEBUG level. Action : from a picture, I clicked "update faces" to trigger facial recognition. Immich ML received data. Imich ML returned the data. Immich server logged this :
[Nest] 7 - 02/06/2025, 6:45:35 PM DEBUG [Microservices:PersonService] 1 faces detected in upload/thumbs/460c6715-cf19-4ced-adcf-96111f71f45e/32/e6/32e68bc1-c16c-4765-8e9c-836fe23965a4-preview.jpeg
[Nest] 7 - 02/06/2025, 6:45:35 PM ERROR [Microservices:JobService] Unable to run job handler (faceDetection/face-detection): TypeError: embedding.join is not a function
[Nest] 7 - 02/06/2025, 6:45:35 PM ERROR [Microservices:JobService] TypeError: embedding.join is not a function
at asVector (/usr/src/app/dist/utils/database.js:23:101)
at (/usr/src/app/dist/entities/face-search.entity.js:40:87)
at ApplyValueTransformers.transformTo (/usr/src/app/node_modules/typeorm/util/ApplyValueTransformers.js:20:28)
at PostgresDriver.preparePersistentValue (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresDriver.js:415:69)
at /usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:500:56
at Array.forEach (<anonymous>)
at /usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:476:25
at Array.forEach (<anonymous>)
at InsertQueryBuilder.createValuesExpression (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:475:23)
at InsertQueryBuilder.createInsertExpression (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:248:39)
[Nest] 7 - 02/06/2025, 6:45:35 PM ERROR [Microservices:JobService]
Object: { "id": "32e68bc1-c16c-4765-8e9c-836fe23965a4" }
[Nest] 7 - 02/06/2025, 6:45:35 PM DEBUG [Microservices:PersonService] 1 faces detected in upload/thumbs/460c6715-cf19-4ced-adcf-96111f71f45e/32/e6/32e68bc1-c16c-4765-8e9c-836fe23965a4-preview.jpeg
[Nest] 7 - 02/06/2025, 6:45:35 PM ERROR [Microservices:JobService] Unable to run job handler (faceDetection/face-detection): TypeError: embedding.join is not a function
[Nest] 7 - 02/06/2025, 6:45:35 PM ERROR [Microservices:JobService] TypeError: embedding.join is not a function
at asVector (/usr/src/app/dist/utils/database.js:23:101)
at (/usr/src/app/dist/entities/face-search.entity.js:40:87)
at ApplyValueTransformers.transformTo (/usr/src/app/node_modules/typeorm/util/ApplyValueTransformers.js:20:28)
at PostgresDriver.preparePersistentValue (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresDriver.js:415:69)
at /usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:500:56
at Array.forEach (<anonymous>)
at /usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:476:25
at Array.forEach (<anonymous>)
at InsertQueryBuilder.createValuesExpression (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:475:23)
at InsertQueryBuilder.createInsertExpression (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:248:39)
[Nest] 7 - 02/06/2025, 6:45:35 PM ERROR [Microservices:JobService]
Object: { "id": "32e68bc1-c16c-4765-8e9c-836fe23965a4" }
docker-compose file
name: immich

services:
immich-server:
container_name: immich_server
image:
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false

# Immich interface runs through reverse proxy Traefik.
networks:
- "traefik"
- "immich"

redis:
container_name: immich_redis
image:
healthcheck:
test: redis-cli ping || exit 1
restart: always

networks:
- "immich"

database:
container_name: immich_postgres
image:
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
name: immich

services:
immich-server:
container_name: immich_server
image:
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false

# Immich interface runs through reverse proxy Traefik.
networks:
- "traefik"
- "immich"

redis:
container_name: immich_redis
image:
healthcheck:
test: redis-cli ping || exit 1
restart: always

networks:
- "immich"

database:
container_name: immich_postgres
image:
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
(ct'd)
healthcheck:
test: >-
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
--command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
echo "checksum failure count is $$Chksum";
[ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
command: >-
postgres
-c shared_preload_libraries=vectors.so
-c 'search_path="$$user", public, vectors'
-c logging_collector=on
-c max_wal_size=2GB
-c shared_buffers=512MB
-c wal_compression=on
restart: always

networks:
- "immich"

networks:
immich:
name: immich
traefik:
external: true

volumes:
model-cache:
healthcheck:
test: >-
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
--command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
echo "checksum failure count is $$Chksum";
[ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
command: >-
postgres
-c shared_preload_libraries=vectors.so
-c 'search_path="$$user", public, vectors'
-c logging_collector=on
-c max_wal_size=2GB
-c shared_buffers=512MB
-c wal_compression=on
restart: always

networks:
- "immich"

networks:
immich:
name: immich
traefik:
external: true

volumes:
model-cache:
##.env variables
name
UPLOAD_LOCATION
value
*(drive location)*

name
DB_DATA_LOCATION
value
/home/user/immich/db/

name
IMMICH_VERSION
value
release

name
DB_PASSWORD
value
*(redacted)*

name
DB_USERNAME
value
*(redacted)*

name
DB_DATABASE_NAME
value
immich-db
name
UPLOAD_LOCATION
value
*(drive location)*

name
DB_DATA_LOCATION
value
/home/user/immich/db/

name
IMMICH_VERSION
value
release

name
DB_PASSWORD
value
*(redacted)*

name
DB_USERNAME
value
*(redacted)*

name
DB_DATABASE_NAME
value
immich-db
Immich
Immich•3mo ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
timepasteque
timepastequeOP•3mo ago
Thank you for your help
bo0tzz
bo0tzz•3mo ago
Make sure the remote ml container is on the same version as the server
timepasteque
timepastequeOP•3mo ago
Okay, is there a command to execute in immich ML to check this ?
bo0tzz
bo0tzz•3mo ago
No, but you can use docker inspect to view what version of the image it's running
timepasteque
timepastequeOP•3mo ago
Seems like it might be the pb Here is some details of the inspect of immich ML
"Labels": {
"com.docker.compose.config-hash": "b4d559e695c0506e1bfcfcb65363f66e794127ef524cba3168c8dc7c9a78c3b3",
"com.docker.compose.container-number": "1",
"com.docker.compose.depends_on": "",
"com.docker.compose.image": "sha256:a65eb60f28b43c57aa775314d2ad40f4f6363759fb454258c9946f96c1d21be1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "immich_remote_ml",
"com.docker.compose.service": "immich-machine-learning",
"com.docker.compose.version": "2.31.0",
"maintainer": "NVIDIA CORPORATION <[email protected]>",
"org.opencontainers.image.created": "2025-01-29T18:25:45.449Z",
"org.opencontainers.image.description": "High performance self-hosted photo and video management solution.",
"org.opencontainers.image.licenses": "AGPL-3.0",
"org.opencontainers.image.ref.name": "ubuntu",
"org.opencontainers.image.revision": "4fd8c1b3c1b4eaf5be7c01c2a87bb6e80117415e",
"org.opencontainers.image.source": "https://github.com/immich-app/immich",
"org.opencontainers.image.title": "immich",
"org.opencontainers.image.url": "https://github.com/immich-app/immich",
"org.opencontainers.image.version": "v1.125.7-cuda"
}
"Labels": {
"com.docker.compose.config-hash": "b4d559e695c0506e1bfcfcb65363f66e794127ef524cba3168c8dc7c9a78c3b3",
"com.docker.compose.container-number": "1",
"com.docker.compose.depends_on": "",
"com.docker.compose.image": "sha256:a65eb60f28b43c57aa775314d2ad40f4f6363759fb454258c9946f96c1d21be1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "immich_remote_ml",
"com.docker.compose.service": "immich-machine-learning",
"com.docker.compose.version": "2.31.0",
"maintainer": "NVIDIA CORPORATION <[email protected]>",
"org.opencontainers.image.created": "2025-01-29T18:25:45.449Z",
"org.opencontainers.image.description": "High performance self-hosted photo and video management solution.",
"org.opencontainers.image.licenses": "AGPL-3.0",
"org.opencontainers.image.ref.name": "ubuntu",
"org.opencontainers.image.revision": "4fd8c1b3c1b4eaf5be7c01c2a87bb6e80117415e",
"org.opencontainers.image.source": "https://github.com/immich-app/immich",
"org.opencontainers.image.title": "immich",
"org.opencontainers.image.url": "https://github.com/immich-app/immich",
"org.opencontainers.image.version": "v1.125.7-cuda"
}
bo0tzz
bo0tzz•3mo ago
"org.opencontainers.image.version": "v1.125.7-cuda"
Seems correct
timepasteque
timepastequeOP•3mo ago
1.125.7 on the interface, it semes like ver is 1.124.2 My immich is setup from portainer; I tried repulling but didnt seem to update to 1.125
bo0tzz
bo0tzz•3mo ago
Ah, there's the problem then There was a breaking change between ML and server in the 1.125 updates, but you've got it the other way around from what I've seen so far so that confused me :P I don't know anything about portainer; but updating the server should fix this
timepasteque
timepastequeOP•3mo ago
okay i might be missing the basics about keeping a container up to date 💀 maybe from watchtower it is possible to update also ?
bo0tzz
bo0tzz•3mo ago
You shouldn't use watchtower for Immich right now
timepasteque
timepastequeOP•3mo ago
huh :monakS: Finally managed to update, it seems to work ! omg I was planning on using watchtower to auto update everything
schuhbacca
schuhbacca•3mo ago
Don't do that, you need to read the release notes before updates or can brick something if there's a breaking change

Did you find this page helpful?