Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run job handler (thumbnailGeneration/generate-person-thumbnail) #15162

Open
1 of 3 tasks
shelltar opened this issue Jan 8, 2025 · 3 comments
Open
1 of 3 tasks

Comments

@shelltar
Copy link

shelltar commented Jan 8, 2025

The bug

After updating to v1.124.0, I started seeing error while generating missing thumbnails.

The OS that Immich Server is running on

Ubuntu 20.04.6 LTS

Version of Immich Server

v1.124.0

Version of Immich Mobile App

v1.123.0

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:release
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - stack.env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: unless-stopped
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:release
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: unless-stopped
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    volumes:
      - redis:/data
    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="$${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: unless-stopped

volumes:
  model-cache:
  redis:

Your .env content

UPLOAD_LOCATION=/home/ubuntu/.immich/upload
DB_DATA_LOCATION=/home/ubuntu/.immich/database
TZ=Europe/Warsaw
DB_PASSWORD=[REDACTED]
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
IMMICH_LOG_LEVEL=warn

Reproduction steps

Go to Admin -> Jobs -> Generate missing thumbnails.

Relevant log output

Initializing Immich v1.124.0
Detected CPU Cores: 4
Starting api worker
Starting microservices worker
[Nest] 7  - 01/08/2025, 11:34:35 AM     LOG [Microservices:EventRepository] Initialized websocket server
[Nest] 7  - 01/08/2025, 11:34:35 AM     LOG [Microservices:MetadataService] Bootstrapping metadata service
[Nest] 7  - 01/08/2025, 11:34:35 AM     LOG [Microservices:MetadataService] Initializing metadata service
[Nest] 7  - 01/08/2025, 11:34:35 AM     LOG [Microservices:MapRepository] Initializing metadata repository
[Nest] 7  - 01/08/2025, 11:34:35 AM     LOG [Microservices:MetadataService] Initialized local reverse geocoder
[Nest] 7  - 01/08/2025, 11:34:35 AM     LOG [Microservices:ServerService] Feature Flags: {
  "smartSearch": true,
  "facialRecognition": true,
  "duplicateDetection": true,
  "map": true,
  "reverseGeocoding": true,
  "importFaces": false,
  "sidecar": true,
  "search": true,
  "trash": true,
  "oauth": false,
  "oauthAutoLaunch": false,
  "passwordLogin": true,
  "configFile": false,
  "email": false
}
[Nest] 7  - 01/08/2025, 11:34:35 AM     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  - 01/08/2025, 11:34:35 AM     LOG [Microservices:StorageService] Successfully verified system mount folder checks
[Nest] 19  - 01/08/2025, 11:34:35 AM     LOG [Api:EventRepository] Initialized websocket server
[Nest] 19  - 01/08/2025, 11:34:35 AM     LOG [Api:ServerService] Feature Flags: {
  "smartSearch": true,
  "facialRecognition": true,
  "duplicateDetection": true,
  "map": true,
  "reverseGeocoding": true,
  "importFaces": false,
  "sidecar": true,
  "search": true,
  "trash": true,
  "oauth": false,
  "oauthAutoLaunch": false,
  "passwordLogin": true,
  "configFile": false,
  "email": false
}
[Nest] 19  - 01/08/2025, 11:34:35 AM     LOG [Api:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 19  - 01/08/2025, 11:34:35 AM     LOG [Api:StorageService] Successfully verified system mount folder checks
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: Expected integer for width but received -2 of type number
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Error: Expected integer for width but received -2 of type number
    at Object.invalidParameterError (/usr/src/app/node_modules/sharp/lib/is.js:135:10)
    at Sharp.<anonymous> (/usr/src/app/node_modules/sharp/lib/resize.js:483:16)
    at Array.forEach (<anonymous>)
    at Sharp.extract (/usr/src/app/node_modules/sharp/lib/resize.js:478:38)
    at MediaRepository.getImageDecodingPipeline (/usr/src/app/dist/repositories/media.repository.js:86:33)
    at MediaRepository.generateThumbnail (/usr/src/app/dist/repositories/media.repository.js:60:20)
    at PersonService.handleGeneratePersonThumbnail (/usr/src/app/dist/services/person.service.js:444:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    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)
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Object:
{
  "id": "458ee1a6-8a27-4fe8-bc3d-41c3991cba53"
}

[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: Expected integer for width but received -2 of type number
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Error: Expected integer for width but received -2 of type number
    at Object.invalidParameterError (/usr/src/app/node_modules/sharp/lib/is.js:135:10)
    at Sharp.<anonymous> (/usr/src/app/node_modules/sharp/lib/resize.js:483:16)
    at Array.forEach (<anonymous>)
    at Sharp.extract (/usr/src/app/node_modules/sharp/lib/resize.js:478:38)
    at MediaRepository.getImageDecodingPipeline (/usr/src/app/dist/repositories/media.repository.js:86:33)
    at MediaRepository.generateThumbnail (/usr/src/app/dist/repositories/media.repository.js:60:20)
    at PersonService.handleGeneratePersonThumbnail (/usr/src/app/dist/services/person.service.js:444:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    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)
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Object:
{
  "id": "34d04c0e-df23-4b7b-ac03-eb11098f938a"
}

[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: Expected integer for width but received -6 of type number
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Error: Expected integer for width but received -6 of type number
    at Object.invalidParameterError (/usr/src/app/node_modules/sharp/lib/is.js:135:10)
    at Sharp.<anonymous> (/usr/src/app/node_modules/sharp/lib/resize.js:483:16)
    at Array.forEach (<anonymous>)
    at Sharp.extract (/usr/src/app/node_modules/sharp/lib/resize.js:478:38)
    at MediaRepository.getImageDecodingPipeline (/usr/src/app/dist/repositories/media.repository.js:86:33)
    at MediaRepository.generateThumbnail (/usr/src/app/dist/repositories/media.repository.js:60:20)
    at PersonService.handleGeneratePersonThumbnail (/usr/src/app/dist/services/person.service.js:444:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    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)
[Nest] 7  - 01/08/2025, 11:38:06 AM   ERROR [Microservices:JobService] Object:
{
  "id": "139be5aa-7eb4-49ea-b23d-6c62099583af"
}

Additional information

No response

@maekawatoshiki
Copy link

Same here.

@shelltar shelltar closed this as completed Jan 9, 2025
@shelltar
Copy link
Author

shelltar commented Jan 9, 2025

Never mind, thought it was fixed in v141.2, but still getting this error.

@shelltar shelltar reopened this Jan 9, 2025
@alextran1502
Copy link
Contributor

@mertalev Do you have any thought on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants