imagegenius / docker-immich

Monolithic (Single) Docker Container for Immich
GNU General Public License v3.0
633 stars 29 forks source link

HEIC thumbnails not generating (iOS 18) #375

Open pducharme opened 5 months ago

pducharme commented 5 months ago

Since couple of versions (can't really tell wich one break that), all my Uploaded photos that are in the HEIC format are not showing up and display the black logo with the generic picture thumbnail. If I click it, it still doesn't display it, but if I download it, the file downloaded is OK and show the image correctly.

Running Latest, 1.106.4, on UNRAID 6.2.10.

The Docker LOG is showing this (for each image) :

[Nest] 1455 - 06/17/2024, 8:57:39 PM ERROR [Microservices:JobService] Error: Input file has corrupt header: /photos/upload/24ca4cc0-abf9-404c-9050-f64d4720dc43/a5/02/a502336c-d773-4bfb-b238-f194410e1d07.HEIC: bad seek to 2218037 heif: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) at Sharp.toFile (/app/immich/server/node_modules/sharp/lib/output.js:89:19) at MediaRepository.generateThumbnail (/app/immich/server/dist/repositories/media.repository.js:69:14) at MediaService.generateThumbnail (/app/immich/server/dist/services/media.service.js:158:48) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async MediaService.handleGeneratePreview (/app/immich/server/dist/services/media.service.js:135:29) at async /app/immich/server/dist/services/job.service.js:148:36 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] 1455 - 06/17/2024, 8:57:39 PM ERROR [Microservices:JobService] Object: { "id": "ac1ba93a-5b65-4a1d-9075-72f7bd049d9a" }

martabal commented 5 months ago

Can you share your config ?

pducharme commented 5 months ago

Hi, yes, here it is @martabal

Running on Unraid 6.2.10, here is my docker configuration. I haven't change it since installation a while ago, and just did the Updates once available. I would add that I did follow "SpaceInvaderOne" tutorial (multipart YouTube Video). Not sure my Nvidia working OK, but haven't touch it more. One thing I find strange is that at each docker start, it will install bunch of Nvidia/cuda stuff, then remove them, and then reinstall them. So each restart takes about 10-15 minutes because of that.

immich_config1 immich_config2
pducharme commented 5 months ago

Any Update on this issue @martabal ? Every new version, I just wish that get fix, but it's not. Still same errors + no Thumbnails or image previews.

martabal commented 5 months ago

Are you using ios 18 ?

pducharme commented 5 months ago

Yes, but issue started before that.

martabal commented 5 months ago

Upstream has the same issue, that's error is caused by a dependency https://github.com/immich-app/immich/issues/10464

pducharme commented 5 months ago

I will check when it started to see if it is at the same time. Also, running missing thumbnail jobs doesn’t resolve it as mentioned in the linked thread. If I click on an image that doesn’t have the thumbnail to see it, it still doesn’t have an image. If I download it the file is fine.

martabal commented 5 months ago

Runnning that job won't solve your issue until the libheif dependency has fixed that issue

pducharme commented 5 months ago

En effet! c'est juste que dans le Thread qui était en réf, quelqu'un disait que la regénération des thumbnails corrigeait le problème. J'ai essayé plusieurs fois, sans succès. Mais maintenant je comprend que tant que libheif ne sera pas corrigé, le problème persistera. Au moins, ma crainte que les images soient perdues n'est plus, puisqu'en téléchargeant, les fichiers sont intacts et s'ouvrent normalement sur Mac ou PC (avec plugin HEIC).

martabal commented 5 months ago

(I'm responding in english so everyone who read that comment can understand the situation)

The solution on that thread is not really clear: Yes, running the "Generate Thumbnails" job will fix your issue, but only after the libheif dependency fixes the issue and releases a new version.

martabal commented 5 months ago

The thumbnails generated by Immich are the images you see on your timeline, photos of people or the preview photo. Immich never touches your original photos, which is why downloading and opening photos works as expected.

pducharme commented 5 months ago

Good. I'll wait for the libheif depedencies to be fixed. Hopefully, it won't take long.