Open pulsar895 opened 2 days ago
I've just seen that when generating thumbnails, it fetches certain images from the upload/library/admin
folder instead of upload/library/<user>
:
[Nest] 7 - 11/20/2024, 3:19:33 PM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file is missing: upload/library/admin/2024-05/7743609a-4911-418f-bcc6-30593ed3d425.png
[Nest] 7 - 11/20/2024, 3:19:33 PM ERROR [Microservices:JobService] Error: Input file is missing: upload/library/admin/2024-05/7743609a-4911-418f-bcc6-30593ed3d425.png
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:151:28)
at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:122: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 - 11/20/2024, 3:19:33 PM ERROR [Microservices:JobService] Object:
{
"id": "7743609a-4911-418f-bcc6-30593ed3d425"
}
On the initial post, the errors were about files in thumbs/
while the files you were showing to exist were in library/
. For the second post, I assume you ran the job to regenerate all thumbnails? So it would be expected to also see jobs run for the admin user.
I've actually restarted thumbnail generation but I'm getting several errors. I think there was a problem applying the Storage Template configuration. Some elements are still being searched for in the wrong places. Example:
[Nest] 7 - 11/20/2024, 3:48:53 PM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file is missing: upload/library/alegall/2015/2015-10/4275a9e4-5110-47dc-b5cf-9e39053fd42b.jpg
The file is actually in another folder:
# find . -name "*4275a9e4-5110-47dc-b5cf-9e39053fd42b*"
./library/alegall/2015-10/4275a9e4-5110-47dc-b5cf-9e39053fd42b.jpg
Maybe I'll play with the database to fix that. Unless there's a better solution...
I solved problem with some photos by doing a lot of DIY.
Display container logs during template migration:
$ sudo docker logs 7fadcf48b0c7 --follow --tail 0 | grep --line-buffered -i -E --color "Attempting to finish incomplete move:" | tee /tmp/immich.log
Use a script to correct the problem on SQL dump (dump create like that):
while read line; do
origin=$(echo $line | awk -F'move: ' '{print $2}' | awk -F' => ' '{print $1}')
target=$(echo $line | awk -F'move: ' '{print $2}' | awk -F' => ' '{print $2}')
sed -i "s#${origin}#${target}#g" /mnt/immich/pgbackup/immich_2024-11-20_15-02-34.sql
done < /tmp/immich.log
Import dump into database. Display container logs during a new template migration:
$ sudo docker logs 7fadcf48b0c7 --follow --tail 0
[Nest] 66 - 11/20/2024, 4:08:57 PM LOG [Api:EventRepository] Websocket Disconnect: qOeyku7_qXKNK7toAAAF
[Nest] 66 - 11/20/2024, 4:08:57 PM LOG [Api:EventRepository] Websocket Connect: esgNrBuKWPFNZrKuAAAH
[Nest] 7 - 11/20/2024, 4:09:00 PM LOG [Microservices:StorageTemplateService] Starting storage template migration
[Nest] 7 - 11/20/2024, 4:09:16 PM LOG [Microservices:StorageTemplateService] Finished storage template migration
This fixes many of the problems associated with thumbnail creation. I'll keep you posted.
Others errors concern files that I cannot find on my filesystem with +1
suffix and some preview:
$ sudo docker logs 7fadcf48b0c7 --since 2024-11-20T16:27:00 2>&1 | grep "[Microservices:JobService] Error: Input file is missing:" | awk '{print $NF}' | tee /tmp/immich.log
[sudo] password for alegall:
upload/library/alegall/2013-07/ada5d46b-ce6e-4ee2-8934-ab5308a5a200+1.JPG
upload/library/alegall/2024-05/a629c71e-149a-485e-9050-6cdf484c9636+1.jpeg
[...]
upload/thumbs/bde8ed12-7146-4421-aaf2-3176b461ae40/b5/11/b511ae5d-2e93-4609-8556-f2f43c7325f2-preview.jpeg
upload/thumbs/bde8ed12-7146-4421-aaf2-3176b461ae40/b5/11/b511ae5d-2e93-4609-8556-f2f43c7325f2-preview.jpeg
This is all pretty odd. Have you messed with the database in the past?
This is all pretty odd. Have you messed with the database in the past?
I had to restore the database not long ago, but I didn't have any errors at the time.
I've tried to generate thumbnails again and I'm still having problems with files that I can't find on my filesystem:
$ sudo docker logs 7fadcf48b0c7 --since 2024-11-20T16:27:00 2>&1 | grep "[Microservices:JobService] Error: Input file is missing:" | awk '{print $NF}' | tee /tmp/immich.log
[sudo] password for <user>:
upload/library/<user>/2013-07/ada5d46b-ce6e-4ee2-8934-ab5308a5a200+1.JPG
upload/library/<user>/2024-05/a629c71e-149a-485e-9050-6cdf484c9636+1.jpeg
[...]
upload/thumbs/bde8ed12-7146-4421-aaf2-3176b461ae40/b5/11/b511ae5d-2e93-4609-8556-f2f43c7325f2-preview.jpeg
upload/thumbs/bde8ed12-7146-4421-aaf2-3176b461ae40/b5/11/b511ae5d-2e93-4609-8556-f2f43c7325f2-preview.jpeg
The bug
Hello,
I'm having a problem generating thumbnails for some of my photos.
For an jpg photo:
On filesystem:
For an heic photo:
Here too I can find all the files in the filesystem :
I've already tried to regenerate the thumbnails by deleting the current folders and running the task via the webUI, but that didn't solve the problem.
Thank you for your help.
May the force be with you.
The OS that Immich Server is running on
TrueNAS 24.10/apps (docker)
Version of Immich Server
v1.120.2
Version of Immich Mobile App
v1.120.2build.2167
Platform with the issue