wrong checksum of assets from external library #2496

Closed
opened 2026-02-05 06:08:14 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @njhsi on GitHub (Mar 10, 2024).

The bug

Failed to search a photo from database 'assets' table by "checksum" as #sha1sum /path/to/myphoto

 user1@host12: sha1sum /import/image/2012/05/04/myphoto.jpg  #8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce
 pgsql: SELECT * FROM "assets" WHERE "checksum" =decode('8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce', 'hex');

Would anybody please to help confirm what checksum method is used for assets from external library? I was aware that it was SHA1SUM, but checking in database seems not. or anything I did not correct in the sql query?

Thanks!

The OS that Immich Server is running on

Ubuntu

Version of Immich Server

v1.98.1

Version of Immich Mobile App

v1.98.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

original

Your .env content

original

Reproduction steps

1. user1@host12:~$ sha1sum /import/image/2012/05/04/myphoto.jpg  #8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce
2.  psql: SELECT * FROM "assets" WHERE "checksum" =decode('8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce', 'hex');
3.
...

Additional information

No response

Originally created by @njhsi on GitHub (Mar 10, 2024). ### The bug Failed to search a photo from database 'assets' table by "checksum" as `#sha1sum /path/to/myphoto` ``` user1@host12: sha1sum /import/image/2012/05/04/myphoto.jpg #8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce pgsql: SELECT * FROM "assets" WHERE "checksum" =decode('8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce', 'hex'); ``` Would anybody please to help confirm what checksum method is used for assets from external library? I was aware that it was SHA1SUM, but checking in database seems not. or anything I did not correct in the sql query? Thanks! ### The OS that Immich Server is running on Ubuntu ### Version of Immich Server v1.98.1 ### Version of Immich Mobile App v1.98.1 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML original ``` ### Your .env content ```Shell original ``` ### Reproduction steps ```bash 1. user1@host12:~$ sha1sum /import/image/2012/05/04/myphoto.jpg #8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce 2. psql: SELECT * FROM "assets" WHERE "checksum" =decode('8d011d5d7f649e7aa712b5820b5d7f1eb29e53ce', 'hex'); 3. ... ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2496