Newly uploaded image has different checksum than local original and so appears twice in Photos tab of Android app #1303

Closed
opened 2026-02-05 01:12:37 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Jenjenn on GitHub (Sep 5, 2023).

The bug

New photos/images taken with the stock camera app on my new Pixel 7a appear twice in the Photos tab of the Android app after being uploaded/backed up. One of the photos is the local original (AssetState.local) and the other is the remote copy (AssetState.remote). The web app only shows the remote/backed up copy as expected.

The checksum of the local and remote images are not the same according to the image info, so I assume this is why they are not merged (AssetState.merged). This seems similar to issue #2962 but the solution was to wait for android app 1.64.0 to reupload the images, or use the "check for corrupt asset backups" tool but that did nothing ("Did not find any corrupt asset backups!").

For comparison, I've been unable to reproduce this with my old Pixel 3a. On my Pixel 3a every photo I take and upload correctly has AssetState.merged and appears as a single image in the Photos tab/gallery.

I access Immich through a caddy reverse proxy that points to the Immich proxy port.

(And just want to say how impressed I am with Immich. It's amazing what everyone's put together and how helpful you all are with issues! ❤️ )

The OS that Immich Server is running on

Slackware 15.0 x86_64 (Unraid)

Version of Immich Server

v1.76.1

Version of Immich Mobile App

v1.76.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - typesense
    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
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

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

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - stack.env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - /mnt/cache/appdata/immich/tsdata:/data
    restart: always

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

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /mnt/cache/appdata/immich/pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

Your .env content

UPLOAD_LOCATION=/mnt/pool4tb/photos/immich
IMMICH_VERSION=release
TYPESENSE_API_KEY=<redacted>
DB_PASSWORD=<redacted>
DB_HOSTNAME=immich_postgres
DB_USERNAME=<redacted>
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

Brand new pixel 7a (Android 13).

1. Take picture with stock camera app (images saved in DCIM/camera).
2. Open Immich app, tap new local photo, tap upload button in top right, tap Upload in confirmation prompt.
3. tap Back, refresh Photos tab
4. Observe that the new image appears twice

Additional information

1.
However, the app does recognize when the images have been uploaded/backed up and later deleted. The backup screen shows:

  • Total 5
  • Backup 5
  • Remainder 0

And when I delete the remote copy (the one with AssetState.remote), the app recognizes the local image is no longer backed up:

  • Total 5
  • Backup 4
  • Remainder 1

So the app is able to tell when the remote copy is deleted and correctly know that the local original is no longer backed up despite the different checksums and images not being merged in the Photos tab.

Some screenshots:

screenshots_1

Then deleting

screenshots_2

(I have no idea why the last visible photo in the gallery screenshots (the one with the cloud+checkmark) is behaving correctly. It seems rarely the issue doesn't happen and the image correctly has AssetState.merged. But I've not been able to consistently reproduce this.)

2.
I've tried to compare the two photos directly for changes/differences. I downloaded the remote copy directly from the Immich server library directory via samba share, and the original copy from my phone via SolidExplorer's FTP feature.

  • Using cmp to compare them shows no output.
  • I converted the images to hex and then used diff as well, which also showed no output.
  • Then I ran md5sum and sha1sum and the hashes for both files were identical

So I am assuming the files are indeed identical. (Or at least they ended up being identical after copying them to my desktop from the server and my phone.)

3.
I also tested images not generated by the camera app and not in the DCIM/camera directory:

  1. Downloading a stock image from the internet.
  2. Move image into a test directory "Internal Memory/Pictures/test".
  3. Add the test directory to the albums/folders that Immich backs up.
  4. Back up/upload the stock/test image
  5. Stock/test image appears twice as well
Originally created by @Jenjenn on GitHub (Sep 5, 2023). ### The bug New photos/images taken with the stock camera app on my new Pixel 7a appear twice in the Photos tab of the Android app after being uploaded/backed up. One of the photos is the local original (AssetState.local) and the other is the remote copy (AssetState.remote). The web app only shows the remote/backed up copy as expected. The checksum of the local and remote images are not the same according to the image info, so I assume this is why they are not merged (AssetState.merged). This seems similar to issue #2962 but the solution was to wait for android app 1.64.0 to reupload the images, or use the "check for corrupt asset backups" tool but that did nothing ("Did not find any corrupt asset backups!"). For comparison, I've been unable to reproduce this with my old Pixel 3a. On my Pixel 3a every photo I take and upload correctly has AssetState.merged and appears as a single image in the Photos tab/gallery. I access Immich through a caddy reverse proxy that points to the Immich proxy port. (And just want to say how impressed I am with Immich. It's amazing what everyone's put together and how helpful you all are with issues! ❤️ ) ### The OS that Immich Server is running on Slackware 15.0 x86_64 (Unraid) ### Version of Immich Server v1.76.1 ### Version of Immich Mobile App v1.76.0 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" 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 env_file: - stack.env depends_on: - redis - database - typesense 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 env_file: - stack.env depends_on: - redis - database - typesense restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - /mnt/cache/appdata/immich/model-cache:/cache env_file: - stack.env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - stack.env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - /mnt/cache/appdata/immich/tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - /mnt/cache/appdata/immich/pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always ``` ### Your .env content ```Shell UPLOAD_LOCATION=/mnt/pool4tb/photos/immich IMMICH_VERSION=release TYPESENSE_API_KEY=<redacted> DB_PASSWORD=<redacted> DB_HOSTNAME=immich_postgres DB_USERNAME=<redacted> DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash Brand new pixel 7a (Android 13). 1. Take picture with stock camera app (images saved in DCIM/camera). 2. Open Immich app, tap new local photo, tap upload button in top right, tap Upload in confirmation prompt. 3. tap Back, refresh Photos tab 4. Observe that the new image appears twice ``` ### Additional information **1.** However, the app does recognize when the images have been uploaded/backed up and later deleted. The backup screen shows: - Total 5 - Backup 5 - Remainder 0 And when I delete the remote copy (the one with AssetState.remote), the app recognizes the local image is no longer backed up: - Total 5 - Backup 4 - Remainder 1 So the app is able to tell when the remote copy is deleted and correctly know that the local original is no longer backed up despite the different checksums and images not being merged in the Photos tab. Some screenshots: ![screenshots_1](https://github.com/immich-app/immich/assets/8846978/0456c262-3f30-4630-8a8b-ad7b09ce9cf4) Then deleting ![screenshots_2](https://github.com/immich-app/immich/assets/8846978/05976189-5b36-484e-99bd-dc91d2f2e499) (I have no idea why the last visible photo in the gallery screenshots (the one with the cloud+checkmark) is behaving correctly. It seems rarely the issue doesn't happen and the image correctly has AssetState.merged. But I've not been able to consistently reproduce this.) **2.** I've tried to compare the two photos directly for changes/differences. I downloaded the remote copy directly from the Immich server library directory via samba share, and the original copy from my phone via SolidExplorer's FTP feature. - Using cmp to compare them shows no output. - I converted the images to hex and then used diff as well, which also showed no output. - Then I ran md5sum and sha1sum and the hashes for both files were identical So I am assuming the files are indeed identical. (Or at least they ended up being identical after copying them to my desktop from the server and my phone.) **3.** I also tested images not generated by the camera app and not in the DCIM/camera directory: 1. Downloading a stock image from the internet. 2. Move image into a test directory "Internal Memory/Pictures/test". 3. Add the test directory to the albums/folders that Immich backs up. 4. Back up/upload the stock/test image 5. Stock/test image appears twice as well
Author
Owner

@Jenjenn commented on GitHub (Sep 7, 2023):

Since yesterday I've:

  • Installed a system update on my Pixel7a
  • Updated Immich app to 1.77.0
  • Updated Immich server to 1.77.0

And the issue seems to not be happening anymore. Will reopen if it starts happening again.

@Jenjenn commented on GitHub (Sep 7, 2023): Since yesterday I've: - Installed a system update on my Pixel7a - Updated Immich app to 1.77.0 - Updated Immich server to 1.77.0 And the issue seems to not be happening anymore. Will reopen if it starts happening again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1303