Thumbnails can't be generated anymore #4919

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

Originally created by @pburndorfer on GitHub (Dec 11, 2024).

The bug

Since a few weeks thumbnail generation doesn't work anymore on my instance. I use external libraries which are mounted via Onedrive to my rootserver. This has worked perfectly in the past but since a few weeks that seems to be broken. Files can be indexed no matter what but the thumbnail generation fails.

In the past I mounted my Onedrive shares as read-only, I even tried mounting them as rw, but that didn't make any difference.
I also tried re-creating all thumbnails via the "All" button but that also won't work even for images that already worked in the past (no thumbnail generation is working at all at the moment).

The OS that Immich Server is running on

Ubuntu 22.04.5

Version of Immich Server

v1.122.2

Version of Immich Mobile App

v1.122.2

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /home/x/onedriveMount/Share1:/usr/src/app/Share1
      - /home/x/onedriveMount/Share2:/usr/src/app/Share2
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.immich.entrypoints=websecure"
      - "traefik.http.routers.immich.rule=Host(`immich.mydomain.dev`)"
      - "traefik.http.routers.immich.tls.certresolver=myresolver"
      - "traefik.http.services.immich.loadbalancer.server.port=2283"

#  immich-machine-learning:
#    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
#    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
#    volumes:
#      - model-cache:/cache
#    env_file:
#      - .env
#    restart: unless-stopped

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
    healthcheck:
      test: redis-cli ping || exit 1
    restart: unless-stopped

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --comman>      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",>    restart: unless-stopped
                                                                                                                                                                              volumes:
  model-cache:

Your .env content

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

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=Europe/Vienna

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

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=xxx

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

Reproduction steps

  1. Upload new photos
  2. Generate thumbnails

Relevant log output

[Nest] 7  - 12/11/2024, 10:03:04 AM   ERROR [Microservices:JobService] Error: ffprobe exited with code 1
ffprobe version 7.0.2-Jellyfin Copyright (c) 2007-2024 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
/usr/src/app/Handyfotos/VID_20161204_162633.mp4: Input/output error

    at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/ffprobe.js:233:22)
    at ChildProcess.emit (node:events:518:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)
[Nest] 7  - 12/11/2024, 10:03:04 AM   ERROR [Microservices:JobService] Object:
{
  "id": "e159a795-4cee-4880-a624-1ae73d132516"
}

[Nest] 7  - 12/11/2024, 10:03:10 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file contains unsupported image format
[Nest] 7  - 12/11/2024, 10:03:10 AM   ERROR [Microservices:JobService] Error: Input file contains unsupported image format
    at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17)
    at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68)
    at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:158:63)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:108:25)
    at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:148:28)
    at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:134:13)
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 12/11/2024, 10:03:10 AM   ERROR [Microservices:JobService] Object:
{
  "id": "7169b8da-3060-46b6-9b91-016cd60e2a7b"
}

[Nest] 7  - 12/11/2024, 10:03:29 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file contains unsupported image format
[Nest] 7  - 12/11/2024, 10:03:29 AM   ERROR [Microservices:JobService] Error: Input file contains unsupported image format
    at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17)
    at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68)
    at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:158:63)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:108:25)
    at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:148:28)
    at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:134:13)
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 12/11/2024, 10:03:29 AM   ERROR [Microservices:JobService] Object:
{
  "id": "ced1e3f5-7888-468e-8f6b-40c259a1c187"
}

Additional information

In the logs it is always complaining that input file has an unsupported image format. That however can't be the case. It worked before and my images didn't change. My image sources are mostly a Pixel device, some pictures shot on a Canon camera and some different other mobile phones. All of them are JPGs.

Originally created by @pburndorfer on GitHub (Dec 11, 2024). ### The bug Since a few weeks thumbnail generation doesn't work anymore on my instance. I use external libraries which are mounted via Onedrive to my rootserver. This has worked perfectly in the past but since a few weeks that seems to be broken. Files can be indexed no matter what but the thumbnail generation fails. In the past I mounted my Onedrive shares as read-only, I even tried mounting them as rw, but that didn't make any difference. I also tried re-creating all thumbnails via the "All" button but that also won't work even for images that already worked in the past (no thumbnail generation is working at all at the moment). ### The OS that Immich Server is running on Ubuntu 22.04.5 ### Version of Immich Server v1.122.2 ### Version of Immich Mobile App v1.122.2 ### Platform with the issue - [X] Server - [X] Web - [X] Mobile ### Your docker-compose.yml content ```YAML name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /home/x/onedriveMount/Share1:/usr/src/app/Share1 - /home/x/onedriveMount/Share2:/usr/src/app/Share2 - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:2283 depends_on: - redis - database restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.immich.entrypoints=websecure" - "traefik.http.routers.immich.rule=Host(`immich.mydomain.dev`)" - "traefik.http.routers.immich.tls.certresolver=myresolver" - "traefik.http.services.immich.loadbalancer.server.port=2283" # immich-machine-learning: # container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda # image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable # volumes: # - model-cache:/cache # env_file: # - .env # restart: unless-stopped redis: container_name: immich_redis image: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900 healthcheck: test: redis-cli ping || exit 1 restart: unless-stopped database: container_name: immich_postgres image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data healthcheck: test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --comman> 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",> restart: unless-stopped volumes: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The location where your database files are stored DB_DATA_LOCATION=./postgres # To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List TZ=Europe/Vienna # The Immich version to use. You can pin this to a specific version like "v1.71.0" #IMMICH_VERSION=release IMMICH_VERSION=v1.122.2 # Connection secret for postgres. You should change it to a random password DB_PASSWORD=xxx # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps 1. Upload new photos 2. Generate thumbnails ### Relevant log output ```shell [Nest] 7 - 12/11/2024, 10:03:04 AM ERROR [Microservices:JobService] Error: ffprobe exited with code 1 ffprobe version 7.0.2-Jellyfin Copyright (c) 2007-2024 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100 /usr/src/app/Handyfotos/VID_20161204_162633.mp4: Input/output error at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/ffprobe.js:233:22) at ChildProcess.emit (node:events:518:28) at ChildProcess._handle.onexit (node:internal/child_process:293:12) [Nest] 7 - 12/11/2024, 10:03:04 AM ERROR [Microservices:JobService] Object: { "id": "e159a795-4cee-4880-a624-1ae73d132516" } [Nest] 7 - 12/11/2024, 10:03:10 AM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file contains unsupported image format [Nest] 7 - 12/11/2024, 10:03:10 AM ERROR [Microservices:JobService] Error: Input file contains unsupported image format at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68) at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:158:63) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:108:25) at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:148:28) at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:134:13) at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) [Nest] 7 - 12/11/2024, 10:03:10 AM ERROR [Microservices:JobService] Object: { "id": "7169b8da-3060-46b6-9b91-016cd60e2a7b" } [Nest] 7 - 12/11/2024, 10:03:29 AM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file contains unsupported image format [Nest] 7 - 12/11/2024, 10:03:29 AM ERROR [Microservices:JobService] Error: Input file contains unsupported image format at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68) at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:158:63) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:108:25) at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:148:28) at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:134:13) at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) [Nest] 7 - 12/11/2024, 10:03:29 AM ERROR [Microservices:JobService] Object: { "id": "ced1e3f5-7888-468e-8f6b-40c259a1c187" } ``` ### Additional information In the logs it is always complaining that input file has an unsupported image format. That however can't be the case. It worked before and my images didn't change. My image sources are mostly a Pixel device, some pictures shot on a Canon camera and some different other mobile phones. All of them are JPGs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4919