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

import HEIF photo failure on 1.109.x immich server #11247

Open
1 of 3 tasks
LoadingZhang opened this issue Jul 20, 2024 · 19 comments
Open
1 of 3 tasks

import HEIF photo failure on 1.109.x immich server #11247

LoadingZhang opened this issue Jul 20, 2024 · 19 comments

Comments

@LoadingZhang
Copy link

LoadingZhang commented Jul 20, 2024

i got error after update from 108 -> 109 in website, rollback 108 then get back to normal.

[Nest] 7  - 07/20/2024, 10:08:29 PM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-preview): Error: Input file has corrupt header: magickload: Magick: UnableToLoadModule '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.la': file not found @ error/module.c/OpenModule/1293 (null)
[Nest] 7  - 07/20/2024, 10:08:29 PM   ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: UnableToLoadModule '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.la': file not found @ error/module.c/OpenModule/1293 (null)
    at Sharp.toFile (/usr/src/app/node_modules/sharp/lib/output.js:89:19)
    at MediaRepository.generateThumbnail (/usr/src/app/dist/repositories/media.repository.js:69:14)
    at MediaService.generateThumbnail (/usr/src/app/dist/services/media.service.js:164:48)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MediaService.handleGeneratePreview (/usr/src/app/dist/services/media.service.js:135:29)
    at async /usr/src/app/dist/services/job.service.js:148:36
    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  - 07/20/2024, 10:08:29 PM   ERROR [Microservices:JobService] Object:
{
  "id": "6797f51d-30bc-4d82-b950-463f62729377",
  "source": "upload"
}

file:
IMG_20240720_230151.zip

The OS that Immich Server is running on

Debian WSL2

Version of Immich Server

v1.109.x

Version of Immich Mobile App

null

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.transcoding.yml
      service: vaapi-wsl # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    devices: ["/dev/dri"]
    env_file: [".env"]
    ports: ["2283:3001"]
    depends_on:
      - redis
      - database
    restart: on-failure

Your .env content

Upload again if you need to

Reproduction steps

upload HEIF file from web or app

Relevant log output

No response

Additional information

No response

@ebrearley
Copy link

I think I'm experiencing the same problem, but going back to 108 doesn't resolve the problem for me. For each upload, I see an error like this:

[Nest] 8  - 07/24/2024, 6:23:53 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-preview): Error: Input file has corrupt header: magickload: Magick: UnableToLoadModule '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.la': file not found @ error/module.c/OpenModule/1293 (null)
[Nest] 8  - 07/24/2024, 6:23:53 AM   ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: UnableToLoadModule '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.la': file not found @ error/module.c/OpenModule/1293 (null)
    at Sharp.toFile (/usr/src/app/node_modules/sharp/lib/output.js:89:19)
    at MediaRepository.generateThumbnail (/usr/src/app/dist/repositories/media.repository.js:69:14)
    at MediaService.generateThumbnail (/usr/src/app/dist/services/media.service.js:164:48)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MediaService.handleGeneratePreview (/usr/src/app/dist/services/media.service.js:135:29)
    at async /usr/src/app/dist/services/job.service.js:148:36
    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] 8  - 07/24/2024, 6:23:53 AM   ERROR [Microservices:JobService] Object:
{
  "id": "e097f3c9-a6a4-48c1-9fb6-a273599be169"
}

@zprde
Copy link

zprde commented Jul 25, 2024

I met the same problem with the same config and version.

@alextran1502
Copy link
Contributor

If you guys temporarily disable hardware acceleration, does it work normally?

@zprde
Copy link

zprde commented Jul 26, 2024

If you guys temporarily disable hardware acceleration, does it work normally?

Yes, it works for me by remobving the hardware acceleration.

@w00tlarr
Copy link

w00tlarr commented Jul 27, 2024

I met the same problem with the same config and version.

I'm also hit with this issue :-(
Removed all my HW acceleration config in the immich-server docker-compose and that worked.

@mertalev
Copy link
Contributor

The vaapi-wsl config sets LD_LIBRARY_PATH=/usr/lib/wsl/lib, so this is probably messing with other libraries.

@dodg3r
Copy link

dodg3r commented Jul 29, 2024

If you guys temporarily disable hardware acceleration, does it work normally?

Hi.

I´m facing the same problem but I´m not using HW acceleration.
Do you want more info from me or do you already have a solution :)

I´m running v1.110.0

@alextran1502
Copy link
Contributor

@dodg3r if you can include a sample file, that would be great

@dodg3r
Copy link

dodg3r commented Jul 30, 2024

It seems that about 20 of my uploaded files are corrupt.
I need to investigate where in the process they became corrupt.

@w00tlarr
Copy link

I met the same problem with the same config and version.

I'm also hit with this issue :-( Removed all my HW acceleration config in the immich-server docker-compose and that worked.

I fixed my issue. My docker compose has this:
environment:
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/dri
- LIBVA_DRIVER_NAME=iHD

Works now after removing that.

@LoadingZhang
Copy link
Author

If you guys temporarily disable hardware acceleration, does it work normally?

remove vaapi in docker compose worked.

@jakub-antos
Copy link

jakub-antos commented Aug 5, 2024

1.111.0 with iOS 18 beta 4 and latest app.

No thumbnails no image in Web (HEIC only)

2024-08-05 14:58:27 [Nest] 7 - 08/05/2024, 12:58:27 PM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-preview): Error: Input file has corrupt header: magickload: Magick: UnableToLoadModule '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.la': file not found @ error/module.c/OpenModule/1293 (null) 2024-08-05 14:58:27 [Nest] 7 - 08/05/2024, 12:58:27 PM ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: UnableToLoadModule '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.la': file not found @ error/module.c/OpenModule/1293 (null)

@alextran1502
Copy link
Contributor

@jakub-antos are you using any hardware acceleration? Look like they are not compatible with the newer version of HEIC

@jakub-antos
Copy link

jakub-antos commented Aug 5, 2024

@alextran1502 No im not using HW acceleration, pure CPU AMD Ryzen Embedded R1505G, disabled HW Accel in Transcoding, no additional options in

immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
extends:
file: hwaccel.yml
service: hwaccel
command: [ "start.sh", "microservices" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
restart: always

Latest Docker Desktop / Win 11

@alextran1502
Copy link
Contributor

@jakub-antos your docker compose file is out of date, there is no microservices anymore. I assume any photo you upload will not have thumbnail generated, not just HEIC

@jakub-antos
Copy link

@alextran1502 Thank you so much! It works perfectly, and everything is back to normal!

@akropp
Copy link

akropp commented Aug 21, 2024

Why is this closed? It still doesn't work with hardware acceleration. Shouldn't the solution be to fix the path issue?

@mertalev mertalev reopened this Aug 22, 2024
@mertalev
Copy link
Contributor

You're right, the issue is still present. I think changing the LD_LIBRARY_PATH env in the vaapi-wsl config to /usr/lib/jellyfin-ffmpeg/lib:/usr/lib/wsl/lib should fix it.

@akropp
Copy link

akropp commented Aug 22, 2024 via email

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

9 participants