I
Immich•2y ago
sick0

Grey default thumbnails/images after upload via web, files on disk seem corrupted?

I just deployed Immich through portainer and everything went very smoothly, i set UPLOAD_LOCATION to a dir on my NAS and i can see folders and image files being created there correctly (so perms seem ok), i can't open the images from disk though and they don't seem to have correct headers, they display as the default grey icon in the web app too, any ideas? (docker compose and env straight from repo)
No description
17 Replies
sick0
sick0OP•2y ago
Which log should it be looking at?
[Nest] 6 - 10/07/2023, 10:15:48 AM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 6 - 10/07/2023, 10:15:48 AM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 6 - 10/07/2023, 10:15:48 AM ERROR [JobService] Object:
{
"id": "a1d02452-2300-4cb5-afb7-647c98978210",
"source": "upload"
}
[Nest] 6 - 10/07/2023, 10:15:48 AM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 6 - 10/07/2023, 10:15:48 AM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 6 - 10/07/2023, 10:15:48 AM ERROR [JobService] Object:
{
"id": "a1d02452-2300-4cb5-afb7-647c98978210",
"source": "upload"
}
from microservices i just tested uploading from the android app, same thing Ok i narrowed it down some more UPLOAD_LOCATION = "./Library" works but "/mnt/cryp2" doesn't... still no luck, i played with permissions and everything, moved immich to a different server, if i try to save to that certain path mounted on the docker host, images get corrupted (no JFIF header in the jpg), although for some reason it sometimes seems to work, like 1 out of 10 tries
[Nest] 7 - 10/07/2023, 11:06:02 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:06:02 PM ERROR [JobService] Object:
{
"id": "04ccc487-9e3f-4a54-bbfd-ab46fba720e9",
"source": "upload"
}

[Nest] 7 - 10/07/2023, 11:06:11 PM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:06:11 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:06:11 PM ERROR [JobService] Object:
{
"id": "ae6e84a7-7f1a-4d3e-b9c4-665d24b4c673",
"source": "upload"
}

[Nest] 7 - 10/07/2023, 11:07:00 PM LOG [MediaService] Successfully generated JPEG image thumbnail for asset 79520efe-8a1e-4540-a853-5f28ec49190c
[Nest] 7 - 10/07/2023, 11:07:00 PM LOG [MediaService] Successfully generated WEBP image thumbnail for asset 79520efe-8a1e-4540-a853-5f28ec49190c
[Nest] 7 - 10/07/2023, 11:08:14 PM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:08:14 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:08:14 PM ERROR [JobService] Object:
{
"id": "af0ba54d-7e4c-497c-9093-a35af2105d07",
"source": "upload"
}
[Nest] 7 - 10/07/2023, 11:06:02 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:06:02 PM ERROR [JobService] Object:
{
"id": "04ccc487-9e3f-4a54-bbfd-ab46fba720e9",
"source": "upload"
}

[Nest] 7 - 10/07/2023, 11:06:11 PM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:06:11 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:06:11 PM ERROR [JobService] Object:
{
"id": "ae6e84a7-7f1a-4d3e-b9c4-665d24b4c673",
"source": "upload"
}

[Nest] 7 - 10/07/2023, 11:07:00 PM LOG [MediaService] Successfully generated JPEG image thumbnail for asset 79520efe-8a1e-4540-a853-5f28ec49190c
[Nest] 7 - 10/07/2023, 11:07:00 PM LOG [MediaService] Successfully generated WEBP image thumbnail for asset 79520efe-8a1e-4540-a853-5f28ec49190c
[Nest] 7 - 10/07/2023, 11:08:14 PM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:08:14 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 7 - 10/07/2023, 11:08:14 PM ERROR [JobService] Object:
{
"id": "af0ba54d-7e4c-497c-9093-a35af2105d07",
"source": "upload"
}
it seems to work better with small files, bigger ones always fail, there is no nginx or any other proxy in between browser and immich web though i also tried to use bind mounts, same problem.. i can save anything fine to the docker host's disk directly but if i specify a cifs mount or lxc mount point as UPLOAD_LOCATION, it won't work properly
Alex Tran
Alex Tran•2y ago
I think that one specific file is having a problem to get its thumbnail generated
sick0
sick0OP•2y ago
it's not only one though but basically all files
Alex Tran
Alex Tran•2y ago
then it seems like the mount on your UPLOAD_LOCATION isn't mounted correctly on your system
sick0
sick0OP•2y ago
if i set UPLOAD_LOCATION to a local dir on the docker host it works, but i'd like to point it to my NAS it's just a simple mountpoint in an lxc container actually
Alex Tran
Alex Tran•2y ago
yeah then it looks like permission on the mounted location from the NAS aren't set correctly 🤔
sick0
sick0OP•2y ago
immich can create dirs and files just fine, idk just the content of the files gets corrupted somehow i'm basically using the same setup for lots of other containers like nextcloud etc, they all seem ok
Alex Tran
Alex Tran•2y ago
Try nuke the instance and try again maybe?
sick0
sick0OP•2y ago
it's a CIFS mount on a proxmox host, that mount gets passed through to a lxc container (portainer) all the way to immich ill try that
Alex Tran
Alex Tran•2y ago
can it be format as ext4?
sick0
sick0OP•2y ago
it is ext4 yeah actually no, it's btrfs, but through CIFS/SMB maybe i should try NFS
Alex Tran
Alex Tran•2y ago
yeah I remember some issue reported with user use btrfs
sick0
sick0OP•2y ago
it's just so strange that uploading small images < 65kb work looking at immich_proxy for some reason all the file uploads cap out at 65kb too
Alex Tran
Alex Tran•2y ago
🤔
sick0
sick0OP•2y ago
root@7493911d1c9c:/usr/src/app# ls -lah upload/library/admin/2019/2019-04-01/chrome_2019-04-01_09-58-31.png
-rwxr-xr-x 1 1100 1100 538 Oct 8 03:46 upload/library/admin/2019/2019-04-01/chrome_2019-04-01_09-58-31.png
root@7493911d1c9c:/usr/src/app# od -bc upload/library/admin/2019/2019-04-01/chrome_2019-04-01_09-58-31.png | head
0000000 211 120 116 107 015 012 032 012 000 000 000 015 111 110 104 122
211 P N G \r \n 032 \n \0 \0 \0 \r I H D R
0000020 000 000 000 117 000 000 000 033 010 006 000 000 000 075 053 322
\0 \0 \0 O \0 \0 \0 033 \b 006 \0 \0 \0 = + 322
0000040 147 000 000 000 001 163 122 107 102 000 256 316 034 351 000 000
g \0 \0 \0 001 s R G B \0 256 316 034 351 \0 \0
0000060 000 004 147 101 115 101 000 000 261 217 013 374 141 005 000 000
\0 004 g A M A \0 \0 261 217 \v 374 a 005 \0 \0
0000100 000 011 160 110 131 163 000 000 016 303 000 000 016 303 001 307
\0 \t p H Y s \0 \0 016 303 \0 \0 016 303 001 307
root@7493911d1c9c:/usr/src/app# ls -lah upload/library/admin/2019/2019-04-01/chrome_2019-04-01_09-58-31.png
-rwxr-xr-x 1 1100 1100 538 Oct 8 03:46 upload/library/admin/2019/2019-04-01/chrome_2019-04-01_09-58-31.png
root@7493911d1c9c:/usr/src/app# od -bc upload/library/admin/2019/2019-04-01/chrome_2019-04-01_09-58-31.png | head
0000000 211 120 116 107 015 012 032 012 000 000 000 015 111 110 104 122
211 P N G \r \n 032 \n \0 \0 \0 \r I H D R
0000020 000 000 000 117 000 000 000 033 010 006 000 000 000 075 053 322
\0 \0 \0 O \0 \0 \0 033 \b 006 \0 \0 \0 = + 322
0000040 147 000 000 000 001 163 122 107 102 000 256 316 034 351 000 000
g \0 \0 \0 001 s R G B \0 256 316 034 351 \0 \0
0000060 000 004 147 101 115 101 000 000 261 217 013 374 141 005 000 000
\0 004 g A M A \0 \0 261 217 \v 374 a 005 \0 \0
0000100 000 011 160 110 131 163 000 000 016 303 000 000 016 303 001 307
\0 \t p H Y s \0 \0 016 303 \0 \0 016 303 001 307
correct png header
Alex Tran
Alex Tran•2y ago
is this NFS mount or still the older mount?
sick0
sick0OP•2y ago
still the old one
root@7493911d1c9c:/usr/src/app# ls -lah upload/library/admin/2020/2020-10-06/image\(195\).png
-rwxr-xr-x 1 1100 1100 64K Oct 8 03:50 'upload/library/admin/2020/2020-10-06/image(195).png'
root@7493911d1c9c:/usr/src/app# od -bc upload/library/admin/2020/2020-10-06/image\(195\).png | head
0000000 034 317 171 006 273 056 017 115 267 177 346 017 070 276 065 052
034 317 y 006 273 . 017 M 267 177 346 017 8 276 5 *
0000020 327 340 063 100 231 155 332 314 000 351 013 003 222 255 355 174
327 340 3 @ 231 m 332 314 \0 351 \v 003 222 255 355 |
0000040 171 060 356 327 130 153 100 163 214 175 207 325 264 246 071 306
y 0 356 327 X k @ s 214 } 207 325 264 246 9 306
0000060 276 067 246 331 077 333 057 316 000 064 355 347 353 243 062 042
276 7 246 331 ? 333 / 316 \0 4 355 347 353 243 2 "
0000100 103 334 200 172 016 240 357 324 147 133 013 032 345 301 255 372
C 334 200 z 016 240 357 324 g [ \v 032 345 301 255 372
root@7493911d1c9c:/usr/src/app# ls -lah upload/library/admin/2020/2020-10-06/image\(195\).png
-rwxr-xr-x 1 1100 1100 64K Oct 8 03:50 'upload/library/admin/2020/2020-10-06/image(195).png'
root@7493911d1c9c:/usr/src/app# od -bc upload/library/admin/2020/2020-10-06/image\(195\).png | head
0000000 034 317 171 006 273 056 017 115 267 177 346 017 070 276 065 052
034 317 y 006 273 . 017 M 267 177 346 017 8 276 5 *
0000020 327 340 063 100 231 155 332 314 000 351 013 003 222 255 355 174
327 340 3 @ 231 m 332 314 \0 351 \v 003 222 255 355 |
0000040 171 060 356 327 130 153 100 163 214 175 207 325 264 246 071 306
y 0 356 327 X k @ s 214 } 207 325 264 246 9 306
0000060 276 067 246 331 077 333 057 316 000 064 355 347 353 243 062 042
276 7 246 331 ? 333 / 316 \0 4 355 347 353 243 2 "
0000100 103 334 200 172 016 240 357 324 147 133 013 032 345 301 255 372
C 334 200 z 016 240 357 324 g [ \v 032 345 301 255 372
^ corrupt file, capped at 65kb with no valid png header

Did you find this page helpful?