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

Generate Thumbnails -> Missing let immich crash #10452

Closed
1 of 3 tasks
markussiebert opened this issue Jun 18, 2024 · 4 comments · Fixed by #10479
Closed
1 of 3 tasks

Generate Thumbnails -> Missing let immich crash #10452

markussiebert opened this issue Jun 18, 2024 · 4 comments · Fixed by #10479

Comments

@markussiebert
Copy link

markussiebert commented Jun 18, 2024

The bug

I can crash my Immich instance with just one click, if I click Administration -> Jobs -> Generate Thumbnails -> Missing

I then see the following errors in the log:

I think failing thumbnail generation can occur and is generally another topic, but Immich should not crash :-)

The OS that Immich Server is running on

Kubernetes/Helm

Version of Immich Server

v.1.106.4

Version of Immich Mobile App

v.1.106.4

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

not relevant imho

Your .env content

not relevant imho

Reproduction steps

click Administration -> Jobs -> Generate Thumbnails -> Missing

but I think you need to have my corrupted Images

Relevant log output

[Nest] 7  - 06/18/2024, 8:45:28 AM    WARN [Microservices:DuplicateService] Asset 58f1637d-de99-439f-9b91-d89f22ab822c is missing preview 
[Nest] 7  - 06/18/2024, 8:45:32 AM    WARN [Microservices:DuplicateService] Asset 43814ea7-4c91-4911-a4a7-48211fdf7b7d is missing preview 
[Nest] 7  - 06/18/2024, 8:45:32 AM    WARN [Microservices:DuplicateService] Asset 7b3ba833-bb3e-4b1a-95b2-70942ba9104d is missing preview 
[Nest] 7  - 06/18/2024, 8:45:38 AM    WARN [Microservices:DuplicateService] Asset 28f09590-fa9b-48fb-8d21-d71db15e6639 is missing preview 
[Nest] 7  - 06/18/2024, 8:45:48 AM    WARN [Microservices:DuplicateService] Asset 3e2a545d-d444-43c8-a2e2-892bbf372b4a is missing preview 
[Nest] 7  - 06/18/2024, 8:46:10 AM    WARN [Microservices:DuplicateService] Asset 7a4ce882-5e13-4e26-860a-26ebf41f83cb is missing preview 
[Nest] 17  - 06/18/2024, 9:21:44 AM     LOG [Api:EventRepository] Websocket Connect:    pVli8VQBEYNXwsu7AAAR                              
terminate called after throwing an instance of 'LibRaw_exceptions'                                                                        
Stream closed EOF for app-immich/immich-server-794c6cc48c-6wt8b (immich-server)   

... after restart .... 


Nest] 7  - 06/18/2024, 7:13:10 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-preview): Er
[Nest] 7  - 06/18/2024, 7:13:10 AM   ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: Input/outp
    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:158: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  - 06/18/2024, 7:13:10 AM   ERROR [Microservices:JobService] Object:                                                             
{                                                                                                                                         
  "id": "3e2a545d-d444-43c8-a2e2-892bbf372b4a"                                                                                            
}                                                                                                                                         
                                                                                                                                          
[Nest] 7  - 06/18/2024, 7:13:11 AM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-preview): Er
[Nest] 7  - 06/18/2024, 7:13:11 AM   ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: Input/outp
    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:158: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  - 06/18/2024, 7:13:11 AM   ERROR [Microservices:JobService] Object:                                                             
{                                                                                                                                         
  "id": "7a4ce882-5e13-4e26-860a-26ebf41f83cb"                                                                                            
}

Additional information

No response

@bo0tzz
Copy link
Member

bo0tzz commented Jun 18, 2024

Besides these errors, what else are you seeing? Does Immich actually stop working? These errors indicate corrupt files and are somewhat expected, but it shouldn't result in anything else breaking.

@markussiebert
Copy link
Author

Tailing the immich server logs when I click this button I see:

[Nest] 7  - 06/18/2024, 8:45:28 AM    WARN [Microservices:DuplicateService] Asset 58f1637d-de99-439f-9b91-d89f22ab822c is missing preview 
[Nest] 7  - 06/18/2024, 8:45:32 AM    WARN [Microservices:DuplicateService] Asset 43814ea7-4c91-4911-a4a7-48211fdf7b7d is missing preview 
[Nest] 7  - 06/18/2024, 8:45:32 AM    WARN [Microservices:DuplicateService] Asset 7b3ba833-bb3e-4b1a-95b2-70942ba9104d is missing preview 
[Nest] 7  - 06/18/2024, 8:45:38 AM    WARN [Microservices:DuplicateService] Asset 28f09590-fa9b-48fb-8d21-d71db15e6639 is missing preview 
[Nest] 7  - 06/18/2024, 8:45:48 AM    WARN [Microservices:DuplicateService] Asset 3e2a545d-d444-43c8-a2e2-892bbf372b4a is missing preview 
[Nest] 7  - 06/18/2024, 8:46:10 AM    WARN [Microservices:DuplicateService] Asset 7a4ce882-5e13-4e26-860a-26ebf41f83cb is missing preview 
[Nest] 17  - 06/18/2024, 9:21:44 AM     LOG [Api:EventRepository] Websocket Connect:    pVli8VQBEYNXwsu7AAAR                              
terminate called after throwing an instance of 'LibRaw_exceptions'                                                                        
Stream closed EOF for app-immich/immich-server-794c6cc48c-6wt8b (immich-server)

@mertalev
Copy link
Contributor

I made a change that might fix this issue that will be in the next release. Feel free to re-open this if it didn't actually prevent the crashes.

@Saschl
Copy link

Saschl commented Jul 15, 2024

@markussiebert are you able to provide one (or more) of the images that caused the crash? I'd like to investigate a bit more on this topic as for me. I am missing some thumbnails and want to check if the crash still occurs if I change some settings to allow them to be generated.

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

Successfully merging a pull request may close this issue.

4 participants