Checksum collision with completely different photos #3635

Closed
opened 2026-02-05 09:07:46 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @miahi on GitHub (Jun 22, 2024).

The bug

I have an issue with missing photos whilst showing/syncing photos with the Android app, and looking through the logs I found this (amongst other 200+ duplicate warnings). Full log entry is below in the 'Relevant log output'.

2024-06-22 16:41:25.329649 | INFO     | SyncService          | Ignoring duplicate assets on device:
{
  "id": "N/A",
  "remoteId": "N/A",
  "localId": "1000034462",
  "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=",
[...]
  "fileName": "20230919_211125.jpg",
[...]
}
{
  "id": "N/A",
  "remoteId": "N/A",
  "localId": "1000053533",
  "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=",
[...]
  "fileName": "20240622_075114.jpg",
[...]
} 

I checked the photos, both of them are in the same directory on the phone but they are completely different, taken at different times, different file size, different phones (extracted from the phone and attached in zip to make sure they are not changed in any way - not sure how the checksum is calculated)
immich_collision.zip

The newer photo (20240622_075114.jpg) does not show in the immich app and is not synced to server. The older one (20230919_211125.jpg) is backed up to the server, and shows in the app.

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.106.4

Version of Immich Mobile App

v1.106.3 build.143

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/opt/immich-app/library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=sure

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Use the two photos in the zip to check if both are seen by the app and uploaded to server

Relevant log output

2024-06-22 16:41:25.329649 | INFO     | SyncService          | Ignoring duplicate assets on device:
{
  "id": "N/A",
  "remoteId": "N/A",
  "localId": "1000034462",
  "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=",
  "ownerId": -1389388339680424900,
  "livePhotoVideoId": "N/A",
  "stackCount": "0",
  "stackParentId": "N/A",
  "fileCreatedAt": "2023-09-19 21:11:24.000",
  "fileModifiedAt": "2023-09-19 21:11:25.000",
  "updatedAt": "2023-09-19 21:11:25.000",
  "durationInSeconds": 0,
  "type": "AssetType.image",
  "fileName": "20230919_211125.jpg",
  "isFavorite": false,
  "isRemote": false,
  "storage": "AssetState.local",
  "width": 4000,
  "height": 3000,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}
{
  "id": "N/A",
  "remoteId": "N/A",
  "localId": "1000053533",
  "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=",
  "ownerId": -1389388339680424900,
  "livePhotoVideoId": "N/A",
  "stackCount": "0",
  "stackParentId": "N/A",
  "fileCreatedAt": "2024-06-22 07:51:14.000",
  "fileModifiedAt": "2024-06-22 07:51:16.000",
  "updatedAt": "2024-06-22 07:51:16.000",
  "durationInSeconds": 0,
  "type": "AssetType.image",
  "fileName": "20240622_075114.jpg",
  "isFavorite": false,
  "isRemote": false,
  "storage": "AssetState.local",
  "width": 4000,
  "height": 3000,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}

Additional information

No response

Originally created by @miahi on GitHub (Jun 22, 2024). ### The bug I have an issue with missing photos whilst showing/syncing photos with the Android app, and looking through the logs I found this (amongst other 200+ duplicate warnings). Full log entry is below in the 'Relevant log output'. ``` 2024-06-22 16:41:25.329649 | INFO | SyncService | Ignoring duplicate assets on device: { "id": "N/A", "remoteId": "N/A", "localId": "1000034462", "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=", [...] "fileName": "20230919_211125.jpg", [...] } { "id": "N/A", "remoteId": "N/A", "localId": "1000053533", "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=", [...] "fileName": "20240622_075114.jpg", [...] } ``` I checked the photos, both of them are in the same directory on the phone but they are completely different, taken at different times, different file size, different phones (extracted from the phone and attached in zip to make sure they are not changed in any way - not sure how the checksum is calculated) [immich_collision.zip](https://github.com/user-attachments/files/15936957/immich_collision.zip) The newer photo (20240622_075114.jpg) does not show in the immich app and is not synced to server. The older one (20230919_211125.jpg) is backed up to the server, and shows in the app. ### The OS that Immich Server is running on Debian ### Version of Immich Server v1.106.4 ### Version of Immich Mobile App v1.106.3 build.143 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" # # WARNING: Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. # name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/opt/immich-app/library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=sure # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. Use the two photos in the zip to check if both are seen by the app and uploaded to server ``` ### Relevant log output ```shell 2024-06-22 16:41:25.329649 | INFO | SyncService | Ignoring duplicate assets on device: { "id": "N/A", "remoteId": "N/A", "localId": "1000034462", "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=", "ownerId": -1389388339680424900, "livePhotoVideoId": "N/A", "stackCount": "0", "stackParentId": "N/A", "fileCreatedAt": "2023-09-19 21:11:24.000", "fileModifiedAt": "2023-09-19 21:11:25.000", "updatedAt": "2023-09-19 21:11:25.000", "durationInSeconds": 0, "type": "AssetType.image", "fileName": "20230919_211125.jpg", "isFavorite": false, "isRemote": false, "storage": "AssetState.local", "width": 4000, "height": 3000, "isArchived": false, "isTrashed": false, "isOffline": false, } { "id": "N/A", "remoteId": "N/A", "localId": "1000053533", "checksum": "GNrECa7lbm6smQHTdW5Rbf99NNU=", "ownerId": -1389388339680424900, "livePhotoVideoId": "N/A", "stackCount": "0", "stackParentId": "N/A", "fileCreatedAt": "2024-06-22 07:51:14.000", "fileModifiedAt": "2024-06-22 07:51:16.000", "updatedAt": "2024-06-22 07:51:16.000", "durationInSeconds": 0, "type": "AssetType.image", "fileName": "20240622_075114.jpg", "isFavorite": false, "isRemote": false, "storage": "AssetState.local", "width": 4000, "height": 3000, "isArchived": false, "isTrashed": false, "isOffline": false, } ``` ### 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#3635