Continous Upload Loop at Mobile at v1.142.1 #7251

Open
opened 2026-02-05 12:53:40 +03:00 by OVERLORD · 58 comments
Owner

Originally created by @barisoztop on GitHub (Sep 16, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I am using my immich account on a second android phone to share gathered photos from 2 phones at one album (camera). But at the 2nd phone, I see an endless loop of trying to upload same photos again and again. There is no duplicate on the web view. But this phone is not able to see all the other photos from my main phone as well. Some photos from main phone are there but not all. I also see now I have now 2 "Camera" albums at web version, it was before only one for both mobile apps. So photos takes at 2 different phones were gathered under one album called "camera".

At the logs of the server I see the following errors:

Query failed : {
durationMs: 2.004306001588702,
error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '23505',
detail: 'Key ("ownerId", checksum)=(ec692a89-6880-4d53-ae5b-d39d23a36bcd, \x8dbc0ecc8005b3b4aacc9538d28804f2e32ebe0c) already exists.',
schema_name: 'public',
table_name: 'asset',
constraint_name: 'UQ_assets_owner_checksum',
file: 'nbtinsert.c',
line: '663',
routine: '_bt_check_unique'
},
sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
params: [
'ec692a89-6880-4d53-ae5b-d39d23a36bcd',
������
,
<Buffer 8d bc 0e cc 80 05 b3 b4 aa cc 95 38 d2 88 04 f2 e3 2e be 0c>,
'/data/upload/ec692a89-6880-4d53-ae5b-d39d23a36bcd/1d/d2/1dd2a303-2884-4e91-91c7-07030b17c8e5.jpg',
'1000056566',
'da7a280b68e2ba1e4a35b79249045d756ff25a523aed90020134a36d0cf97ef3',
2025-09-13T11:55:16.000Z,
2025-09-13T11:55:23.000Z,
2025-09-13T11:55:16.000Z,
������
'IMAGE',
false,
'0',
'timeline',
'PXL_20250913_115516678.jpg'
]
}

The OS that Immich Server is running on

Ugreen OS (Linux)

Version of Immich Server

v1.142.1

Version of Immich Mobile App

v1.142.1

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

services:
  immich-server:
    container_name: immich_server
    user: XXX:YY
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      #- /volume1/Medien:/mnt/media/Medien:ro                                        
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - '2283:2283'
    networks:
      default:
        ipv4_address: 192.168.178.XXX
        ipv6_address: fd6b:1e0e:5c7b:e9b1::XXX
      immich-shared:
    depends_on:
      - redis
      - database
    restart: unless-stopped
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    user: 1000:10
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - /volume1/docker/immich/ml/cache:/cache:rw 
    env_file:
      - stack.env
    restart: unless-stopped
    healthcheck:
      disable: false
    networks:
      immich-shared:

  redis:
    container_name: immich_redis
    user: 1000:10                                                                     #PUID:PGID angeben
    image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177
    healthcheck:
      test: redis-cli ping || exit 1
    volumes:
      - /volume1/docker/immich/redis:/data:rw                                        
    restart: unless-stopped
    networks:
      immich-shared:

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
        --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
        echo "checksum failure count is $$Chksum";
        [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: >-
      postgres
      -c shared_preload_libraries=vectors.so
      -c 'search_path="$$user", public, vectors'
      -c logging_collector=on
      -c max_wal_size=2GB
      -c shared_buffers=512MB
      -c wal_compression=on
    restart: unless-stopped
    networks:
      immich-shared:

volumes:
  model-cache:

networks:
  default:
    name: mvl
    external: true
  immich-shared:
    name: immich-shared

Your .env content

IMMICH_VERSION=release
UPLOAD_LOCATION=/volume1/docker/immich/library
TZ=Europe/Berlin
DB_USERNAME=XXX
DB_PASSWORD=XXX
DB_DATABASE_NAME=XXX
DB_DATA_LOCATION=/volume1/docker/immich/postgres
NODE_ENV=production
LOG_LEVEL=log
DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=3
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003
JWT_SECRET=XXX
MPLCONFIGDIR=/cache/matplotlib

Reproduction steps

  1. Open the andoird app
  2. Select Album Camera and enable Sync

Relevant log output


Additional information

No response

Originally created by @barisoztop on GitHub (Sep 16, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I am using my immich account on a second android phone to share gathered photos from 2 phones at one album (camera). But at the 2nd phone, I see an endless loop of trying to upload same photos again and again. There is no duplicate on the web view. But this phone is not able to see all the other photos from my main phone as well. Some photos from main phone are there but not all. I also see now I have now 2 "Camera" albums at web version, it was before only one for both mobile apps. So photos takes at 2 different phones were gathered under one album called "camera". At the logs of the server I see the following errors: Query failed : { durationMs: 2.004306001588702, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(ec692a89-6880-4d53-ae5b-d39d23a36bcd, \\x8dbc0ecc8005b3b4aacc9538d28804f2e32ebe0c) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '663', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ 'ec692a89-6880-4d53-ae5b-d39d23a36bcd', ������ , <Buffer 8d bc 0e cc 80 05 b3 b4 aa cc 95 38 d2 88 04 f2 e3 2e be 0c>, '/data/upload/ec692a89-6880-4d53-ae5b-d39d23a36bcd/1d/d2/1dd2a303-2884-4e91-91c7-07030b17c8e5.jpg', '1000056566', 'da7a280b68e2ba1e4a35b79249045d756ff25a523aed90020134a36d0cf97ef3', 2025-09-13T11:55:16.000Z, 2025-09-13T11:55:23.000Z, 2025-09-13T11:55:16.000Z, ������ 'IMAGE', false, '0', 'timeline', 'PXL_20250913_115516678.jpg' ] } ### The OS that Immich Server is running on Ugreen OS (Linux) ### Version of Immich Server v1.142.1 ### Version of Immich Mobile App v1.142.1 ### Platform with the issue - [x] Server - [ ] Web - [x] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML services: immich-server: container_name: immich_server user: XXX:YY image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} volumes: #- /volume1/Medien:/mnt/media/Medien:ro - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - '2283:2283' networks: default: ipv4_address: 192.168.178.XXX ipv6_address: fd6b:1e0e:5c7b:e9b1::XXX immich-shared: depends_on: - redis - database restart: unless-stopped healthcheck: disable: false immich-machine-learning: container_name: immich_machine_learning user: 1000:10 image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - /volume1/docker/immich/ml/cache:/cache:rw env_file: - stack.env restart: unless-stopped healthcheck: disable: false networks: immich-shared: redis: container_name: immich_redis user: 1000:10 #PUID:PGID angeben image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177 healthcheck: test: redis-cli ping || exit 1 volumes: - /volume1/docker/immich/redis:/data:rw restart: unless-stopped networks: immich-shared: database: container_name: immich_postgres image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data healthcheck: test: >- pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m start_interval: 30s start_period: 5m command: >- postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on restart: unless-stopped networks: immich-shared: volumes: model-cache: networks: default: name: mvl external: true immich-shared: name: immich-shared ``` ### Your .env content ```Shell IMMICH_VERSION=release UPLOAD_LOCATION=/volume1/docker/immich/library TZ=Europe/Berlin DB_USERNAME=XXX DB_PASSWORD=XXX DB_DATABASE_NAME=XXX DB_DATA_LOCATION=/volume1/docker/immich/postgres NODE_ENV=production LOG_LEVEL=log DISABLE_REVERSE_GEOCODING=false REVERSE_GEOCODING_PRECISION=3 IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 JWT_SECRET=XXX MPLCONFIGDIR=/cache/matplotlib ``` ### Reproduction steps 1. Open the andoird app 2. Select Album Camera and enable Sync ### Relevant log output ```shell ``` ### Additional information _No response_
Author
Owner

@barisoztop commented on GitHub (Sep 16, 2025):

I also see now I have now 2 "Camera" albums, it was before only one for both mobile apps. So photos takes at 2 different phones were gathered under one album called "camera"

@barisoztop commented on GitHub (Sep 16, 2025): I also see now I have now 2 "Camera" albums, it was before only one for both mobile apps. So photos takes at 2 different phones were gathered under one album called "camera"
Author
Owner

@barisoztop commented on GitHub (Sep 16, 2025):

The problem is related to the new feature of beta timeline "Snyc Albums" under Back Up Options. I have disabled it at both phones, and it is back to normal.

@barisoztop commented on GitHub (Sep 16, 2025): The problem is related to the new feature of beta timeline "Snyc Albums" under Back Up Options. I have disabled it at both phones, and it is back to normal.
Author
Owner

@joshuarmost commented on GitHub (Sep 17, 2025):

I am also on v1.142.1 and had continuous upload looping until I turned off Beta Timeline. I must say I like the old "Start Backup" button. I will VPN into my network, start the backup, then press cancel when its done and disconnect from the VPN. I don't want it to relook at and upload all my photos when I turn on backup. There are sometimes when I want to open the app but not back up anything as well. I know its called Beta Timeline but just my thoughts.

@joshuarmost commented on GitHub (Sep 17, 2025): I am also on v1.142.1 and had continuous upload looping until I turned off Beta Timeline. I must say I like the old "Start Backup" button. I will VPN into my network, start the backup, then press cancel when its done and disconnect from the VPN. I don't want it to relook at and upload all my photos when I turn on backup. There are sometimes when I want to open the app but not back up anything as well. I know its called Beta Timeline but just my thoughts.
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@BushMasterJM Is the workflow of flipping on the switch when you want to back up, then flipping it off when it is done work for you?

Can you switch to the new timeline, then try logging out and logging back in, to see if the looping upload issue is resolved? It would also be great to provide the mobile app logs so we can better understand the problem and fix it.

@alextran1502 commented on GitHub (Sep 17, 2025): @BushMasterJM Is the workflow of flipping on the switch when you want to back up, then flipping it off when it is done work for you? Can you switch to the new timeline, then try logging out and logging back in, to see if the looping upload issue is resolved? It would also be great to provide the mobile app logs so we can better understand the problem and fix it.
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

The mobile app for the fix of v1.142.1 is still under review, so I think that is why you guys are seeing this issue. Please logout and log back in, I think it will fix it for you

@alextran1502 commented on GitHub (Sep 17, 2025): The mobile app for the fix of `v1.142.1` is still under review, so I think that is why you guys are seeing this issue. Please logout and log back in, I think it will fix it for you
Author
Owner

@Tux7486 commented on GitHub (Sep 17, 2025):

@alextran1502 logout and Login fixed the issue for my wife and me. Thanks.

@Tux7486 commented on GitHub (Sep 17, 2025): @alextran1502 logout and Login fixed the issue for my wife and me. Thanks.
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@Tux7486 thanks for confirming. Do you guys use iOS or Android?

@alextran1502 commented on GitHub (Sep 17, 2025): @Tux7486 thanks for confirming. Do you guys use iOS or Android?
Author
Owner

@Tux7486 commented on GitHub (Sep 17, 2025):

@alextran1502 my wife an me are on Android 16 (pixel 7a and pixel 6a)

@Tux7486 commented on GitHub (Sep 17, 2025): @alextran1502 my wife an me are on Android 16 (pixel 7a and pixel 6a)
Author
Owner

@EgalitarianMonkey commented on GitHub (Sep 17, 2025):

I had the same issue since updating to v1.142.1 on my Android Google Pixel 7 Pro.
Black screen looping on database migration and no data displayed.

Logout and login back fixed the issue 👍.

@EgalitarianMonkey commented on GitHub (Sep 17, 2025): I had the same issue since updating to v1.142.1 on my Android Google Pixel 7 Pro. Black screen looping on database migration and no data displayed. Logout and login back fixed the issue 👍.
Author
Owner

@JayCroghan commented on GitHub (Sep 17, 2025):

This just started for me out of the blue today, Immich app updated 19 hours ago but for the last hour it's been in an upload loop of 54 really old photos. Every 2 minutes I get another notification of 'uploading media' and it never finishes. Turning on and off the backup switch doesn't fix it. They are almost all screenshots of my lock screen, almost duplicates but not because the date and time is different as they were taken sometimes years apart. They are not succeeding.

@JayCroghan commented on GitHub (Sep 17, 2025): This just started for me out of the blue today, Immich app updated 19 hours ago but for the last hour it's been in an upload loop of 54 really old photos. Every 2 minutes I get another notification of 'uploading media' and it never finishes. Turning on and off the backup switch doesn't fix it. They are almost all screenshots of my lock screen, almost duplicates but not because the date and time is different as they were taken sometimes years apart. They are not succeeding.
Author
Owner

@talondnb commented on GitHub (Sep 17, 2025):

I am also on v1.142.1 and had continuous upload looping until I turned off Beta Timeline. I must say I like the old "Start Backup" button. I will VPN into my network, start the backup, then press cancel when its done and disconnect from the VPN. I don't want it to relook at and upload all my photos when I turn on backup. There are sometimes when I want to open the app but not back up anything as well. I know its called Beta Timeline but just my thoughts.

I had the same issue on v1.142.1, turned off the new beta timeline and restart app, back to a functional immich again.

@talondnb commented on GitHub (Sep 17, 2025): > I am also on v1.142.1 and had continuous upload looping until I turned off Beta Timeline. I must say I like the old "Start Backup" button. I will VPN into my network, start the backup, then press cancel when its done and disconnect from the VPN. I don't want it to relook at and upload all my photos when I turn on backup. There are sometimes when I want to open the app but not back up anything as well. I know its called Beta Timeline but just my thoughts. I had the same issue on v1.142.1, turned off the new beta timeline and restart app, back to a functional immich again.
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@JayCroghan and @talondnb Do you mind sharing the mobile app logs?

@alextran1502 commented on GitHub (Sep 17, 2025): @JayCroghan and @talondnb Do you mind sharing the mobile app logs?
Author
Owner

@JayCroghan commented on GitHub (Sep 17, 2025):

I thought you would ask so exported at the time I made the reply.

Immich_log_2025-09-17T17_28_26.952101.log

@JayCroghan commented on GitHub (Sep 17, 2025): I thought you would ask so exported at the time I made the reply. [Immich_log_2025-09-17T17_28_26.952101.log](https://github.com/user-attachments/files/22387498/Immich_log_2025-09-17T17_28_26.952101.log)
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@JayCroghan I saw some error in HTTP response with your instance. What is your server version? And do you mind try connecting to your instance over local IP?

@alextran1502 commented on GitHub (Sep 17, 2025): @JayCroghan I saw some error in HTTP response with your instance. What is your server version? And do you mind try connecting to your instance over local IP?
Author
Owner

@JayCroghan commented on GitHub (Sep 17, 2025):

It worked when I connected to the IP. The server version was one minor
version older.

On Wed 17 Sep 2025 at 22:41, Alex @.***> wrote:

alextran1502 left a comment (immich-app/immich#22101)
https://github.com/immich-app/immich/issues/22101#issuecomment-3303338840

@JayCroghan https://github.com/JayCroghan I saw some error in HTTP
response with your instance. What is your server version? And do you mind
try connecting to your instance over local IP?


Reply to this email directly, view it on GitHub
https://github.com/immich-app/immich/issues/22101#issuecomment-3303338840,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI55THXLT52HFQIIVUQSY33TFXKFAVCNFSM6AAAAACGV4ISHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBTGMZTQOBUGA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@JayCroghan commented on GitHub (Sep 17, 2025): It worked when I connected to the IP. The server version was one minor version older. On Wed 17 Sep 2025 at 22:41, Alex ***@***.***> wrote: > *alextran1502* left a comment (immich-app/immich#22101) > <https://github.com/immich-app/immich/issues/22101#issuecomment-3303338840> > > @JayCroghan <https://github.com/JayCroghan> I saw some error in HTTP > response with your instance. What is your server version? And do you mind > try connecting to your instance over local IP? > > — > Reply to this email directly, view it on GitHub > <https://github.com/immich-app/immich/issues/22101#issuecomment-3303338840>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAI55THXLT52HFQIIVUQSY33TFXKFAVCNFSM6AAAAACGV4ISHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBTGMZTQOBUGA> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@JayCroghan Interesting, so something to investigate with the proxy setup from your infra I think

@alextran1502 commented on GitHub (Sep 17, 2025): @JayCroghan Interesting, so something to investigate with the proxy setup from your infra I think
Author
Owner

@goffincedric commented on GitHub (Sep 17, 2025):

I'm getting the same errors in my server logs. I also want to add that, on previous versions of the android app (< v1.142.1), when uploads failed in the android app, the 'Remainder' counter would stay at 1 (1 photo kept failing). Now it starts at 1 remaining, uploads once, decreases to 0, tries again, rolls over to -1. Every time I reopen the app from background, the counter decreases by 1 for each try, rolling further into the negative.

Edit: 'Backup' counter also keeps counting the failed uploads.

Screenshot_2025-09-17-19-03-28-07_d8aea95ef633eb6b7eb1cae13c34b40e.jpg

Screenshot_2025-09-17-19-03-33-94_d8aea95ef633eb6b7eb1cae13c34b40e.jpg

@goffincedric commented on GitHub (Sep 17, 2025): I'm getting the same errors in my server logs. I also want to add that, on previous versions of the android app (< v1.142.1), when uploads failed in the android app, the 'Remainder' counter would stay at 1 (1 photo kept failing). Now it starts at 1 remaining, uploads once, decreases to 0, tries again, rolls over to -1. Every time I reopen the app from background, the counter decreases by 1 for each try, rolling further into the negative. Edit: 'Backup' counter also keeps counting the failed uploads. ![Screenshot_2025-09-17-19-03-28-07_d8aea95ef633eb6b7eb1cae13c34b40e.jpg](https://github.com/user-attachments/assets/5afd686b-ca6c-4a01-992d-2e00f479d5b0) ![Screenshot_2025-09-17-19-03-33-94_d8aea95ef633eb6b7eb1cae13c34b40e.jpg](https://github.com/user-attachments/assets/9a929036-87c3-4bd1-be2a-8c57a303bfbf)
Author
Owner

@JayCroghan commented on GitHub (Sep 17, 2025):

It only started doing this out of the blue middle of the day today and I
hadn’t changed anything since the last update?

On Wed 17 Sep 2025 at 22:51, Alex @.***> wrote:

alextran1502 left a comment (immich-app/immich#22101)
https://github.com/immich-app/immich/issues/22101#issuecomment-3303383166

@JayCroghan https://github.com/JayCroghan Interesting, so something to
investigate with the proxy setup from your infra I think


Reply to this email directly, view it on GitHub
https://github.com/immich-app/immich/issues/22101#issuecomment-3303383166,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI55THHMISPNGHHCESUJCL3TFYO5AVCNFSM6AAAAACGV4ISHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBTGM4DGMJWGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

@JayCroghan commented on GitHub (Sep 17, 2025): It only started doing this out of the blue middle of the day today and I hadn’t changed anything since the last update? On Wed 17 Sep 2025 at 22:51, Alex ***@***.***> wrote: > *alextran1502* left a comment (immich-app/immich#22101) > <https://github.com/immich-app/immich/issues/22101#issuecomment-3303383166> > > @JayCroghan <https://github.com/JayCroghan> Interesting, so something to > investigate with the proxy setup from your infra I think > > — > Reply to this email directly, view it on GitHub > <https://github.com/immich-app/immich/issues/22101#issuecomment-3303383166>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAI55THHMISPNGHHCESUJCL3TFYO5AVCNFSM6AAAAACGV4ISHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBTGM4DGMJWGY> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@JayCroghan I am not sure, that is what I see from the log. You can try look at the server/proxy log for more info if you reconnect to your instance via DNS.

@goffincedric Yeah, I notice and will have the count fix. About it keeps uploading that one assets, seeing the server logs or the mobile app logs will help us with more information

@alextran1502 commented on GitHub (Sep 17, 2025): @JayCroghan I am not sure, that is what I see from the log. You can try look at the server/proxy log for more info if you reconnect to your instance via DNS. @goffincedric Yeah, I notice and will have the count fix. About it keeps uploading that one assets, seeing the server logs or the mobile app logs will help us with more information
Author
Owner

@goffincedric commented on GitHub (Sep 17, 2025):

@alextran1502 Great to hear that a fix was already in the works! Thanks for the fast response and amazing software btw!

As requested, the server logs and mobile app logs:

Query failed : {
  durationMs: 1.4574580043554306,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(bb3f227c-4f35-4cd2-bd56-ed25d9ef466c, \\x3387c8df2a540c76ed3f86dd7404af493f19c01b) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    'bb3f227c-4f35-4cd2-bd56-ed25d9ef466c',
    null,
    <Buffer 33 87 c8 df 2a 54 0c 76 ed 3f 86 dd 74 04 af 49 3f 19 c0 1b>,
    '/data/upload/bb3f227c-4f35-4cd2-bd56-ed25d9ef466c/42/39/42393a18-f92c-432f-ba60-c3abbf0a7b0a.jpg',
    '1000039543',
    '9c0520f1e1ff16ef086e5942dd37ee1b0fd6f06e4fbfb8e7913d65ac41589fcd',
    2025-07-16T16:29:36.000Z,
    2025-07-16T16:29:43.000Z,
    2025-07-16T16:29:36.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'IMG_20250716_182941.jpg'
  ]
}

Mobile logs:
Immich_log_2025-09-17T19_21_01.110411.log

If you need any specific or more information, feel free to let me know!

@goffincedric commented on GitHub (Sep 17, 2025): @alextran1502 Great to hear that a fix was already in the works! Thanks for the fast response and amazing software btw! As requested, the server logs and mobile app logs: ``` Query failed : { durationMs: 1.4574580043554306, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(bb3f227c-4f35-4cd2-bd56-ed25d9ef466c, \\x3387c8df2a540c76ed3f86dd7404af493f19c01b) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '663', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ 'bb3f227c-4f35-4cd2-bd56-ed25d9ef466c', null, <Buffer 33 87 c8 df 2a 54 0c 76 ed 3f 86 dd 74 04 af 49 3f 19 c0 1b>, '/data/upload/bb3f227c-4f35-4cd2-bd56-ed25d9ef466c/42/39/42393a18-f92c-432f-ba60-c3abbf0a7b0a.jpg', '1000039543', '9c0520f1e1ff16ef086e5942dd37ee1b0fd6f06e4fbfb8e7913d65ac41589fcd', 2025-07-16T16:29:36.000Z, 2025-07-16T16:29:43.000Z, 2025-07-16T16:29:36.000Z, 'IMAGE', false, '0', 'timeline', 'IMG_20250716_182941.jpg' ] } ``` Mobile logs: [Immich_log_2025-09-17T19_21_01.110411.log](https://github.com/user-attachments/files/22391085/Immich_log_2025-09-17T19_21_01.110411.log) If you need any specific or more information, feel free to let me know!
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@goffincedric Do you mind try to logout and log back in? If that doesn't work, can you try to log in your instance via local IP if possible and see if that assets is no longer in the count

@alextran1502 commented on GitHub (Sep 17, 2025): @goffincedric Do you mind try to logout and log back in? If that doesn't work, can you try to log in your instance via local IP if possible and see if that assets is no longer in the count
Author
Owner

@goffincedric commented on GitHub (Sep 17, 2025):

@alextran1502 Same issue after logging out and back in, both on remote and the local instance.

Recent logs provided as well. I have full access to the instance, so I can give full details if you want to dive deeper in this issue.

Immich_log_2025-09-17T20_56_45.946751.log

@goffincedric commented on GitHub (Sep 17, 2025): @alextran1502 Same issue after logging out and back in, both on remote and the local instance. Recent logs provided as well. I have full access to the instance, so I can give full details if you want to dive deeper in this issue. [Immich_log_2025-09-17T20_56_45.946751.log](https://github.com/user-attachments/files/22392760/Immich_log_2025-09-17T20_56_45.946751.log)
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@goffincedric Can you clear the logs and then logout, then login with the local IP and send me a new log after the sync icon is done?

By the way, what is your server version?

@alextran1502 commented on GitHub (Sep 17, 2025): @goffincedric Can you clear the logs and then logout, then login with the local IP and send me a new log after the sync icon is done? By the way, what is your server version?
Author
Owner

@goffincedric commented on GitHub (Sep 17, 2025):

@alextran1502 As requested, logs after clearing and relogging on local IP.
Immich_log_2025-09-17T21_21_56.848588.log

Server is running the latest version: v1.142.1.
Image

@goffincedric commented on GitHub (Sep 17, 2025): @alextran1502 As requested, logs after clearing and relogging on local IP. [Immich_log_2025-09-17T21_21_56.848588.log](https://github.com/user-attachments/files/22393131/Immich_log_2025-09-17T21_21_56.848588.log) Server is running the latest version: v1.142.1. <img width="347" height="62" alt="Image" src="https://github.com/user-attachments/assets/60dabd42-df1a-44fd-b22c-62507d3cbcc0" />
Author
Owner

@alextran1502 commented on GitHub (Sep 17, 2025):

@goffincedric Does it still showing one asset left for backup?

@alextran1502 commented on GitHub (Sep 17, 2025): @goffincedric Does it still showing one asset left for backup?
Author
Owner

@korikori commented on GitHub (Sep 18, 2025):

Just wanted to chip in that I run into the same issue on an iOS device; turning off the beta timeline also resolved it for me. In my case, I have not one but 77 assets listed under the Remainder. Attached is the mobile app log after re-enabling the beta timeline and the backup service.

immich-ios.log

@korikori commented on GitHub (Sep 18, 2025): Just wanted to chip in that I run into the same issue on an iOS device; turning off the beta timeline also resolved it for me. In my case, I have not one but 77 assets listed under the Remainder. Attached is the mobile app log after re-enabling the beta timeline and the backup service. [immich-ios.log](https://github.com/user-attachments/files/22413771/immich-ios.log)
Author
Owner

@alextran1502 commented on GitHub (Sep 19, 2025):

@korikori what is your server version and if logout and log back to the new timeline helps resolving the issue

@alextran1502 commented on GitHub (Sep 19, 2025): @korikori what is your server version and if logout and log back to the new timeline helps resolving the issue
Author
Owner

@PalatinCoder commented on GitHub (Sep 19, 2025):

I also need to chip in here.
Both server and iOS app are 1.142.1. The app is stuck in a continuous loop of having remaining assets to upload, uploading them, then remainder shows 0, but after a second remainder shows 1 again and the loop restarts.
App logs are inconclusive, and the server doesn’t give and errors either as it in fact never sees the asset upload request.
Logging out and back in doesn’t change anything, neither does using the local ip.
Disabling the beta timeline helps though.

Immich_log_2025-09-19T07:16:52.051946.log

@PalatinCoder commented on GitHub (Sep 19, 2025): I also need to chip in here. Both server and iOS app are 1.142.1. The app is stuck in a continuous loop of having remaining assets to upload, uploading them, then remainder shows 0, but after a second remainder shows 1 again and the loop restarts. App logs are inconclusive, and the server doesn’t give and errors either as it in fact never sees the asset upload request. Logging out and back in doesn’t change anything, neither does using the local ip. Disabling the beta timeline helps though. [Immich_log_2025-09-19T07:16:52.051946.log](https://github.com/user-attachments/files/22419895/Immich_log_2025-09-19T07.16.52.051946.log)
Author
Owner

@alextran1502 commented on GitHub (Sep 19, 2025):

@PalatinCoder Can you also post the Sync Status page in the App Settings? can you also help post the URL you connect to your local IP? Do you use self-sign cert or any thing in your network setting that could potentially be different from a more traditional setup?

I am asking because from the log I see this entry

| socket_io_client     | ignoring socket cache for https://10.14.1.160 |

The URL looks strange

@alextran1502 commented on GitHub (Sep 19, 2025): @PalatinCoder Can you also post the Sync Status page in the App Settings? can you also help post the URL you connect to your local IP? Do you use self-sign cert or any thing in your network setting that could potentially be different from a more traditional setup? I am asking because from the log I see this entry ``` | socket_io_client | ignoring socket cache for https://10.14.1.160 | ``` The URL looks strange
Author
Owner

@PalatinCoder commented on GitHub (Sep 19, 2025):

Yes, 10.14.1.160 is my local ip. I‘m running immich on Kubernetes so when using the ip address I need to set a custom host header, but that’s working and the requests arrive at the server. I tried local ip instead of my usual dns name to avoid the traffic being routed through cloud flare, which may interfere and also, yep, would require a client certificate.

Edit for clarification: the client cert is only required by cloudflare, not when using the local ip.

Here’s the sync status page:

Image

Edit 2: to me this doesn’t look like an issue with the sync state, as the app knows the image is not uploaded. It seems that the request to upload is never actually made (as the server never sees any request coming in)
Both using local ip and cloudflare I do see requests in the servers logs, however these are all pings and sync/ack but never an actual POST to an asset.

Edit 3: I just noticed that settings -> backup says that background app refresh is disabled, despite it being enabled in iOS’s general settings as well as in the app specific settings.

@PalatinCoder commented on GitHub (Sep 19, 2025): Yes, 10.14.1.160 is my local ip. I‘m running immich on Kubernetes so when using the ip address I need to set a custom host header, but that’s working and the requests arrive at the server. I tried local ip instead of my usual dns name to avoid the traffic being routed through cloud flare, which may interfere and also, yep, would require a client certificate. Edit for clarification: the client cert is only required by cloudflare, not when using the local ip. Here’s the sync status page: <img width="1170" height="2532" alt="Image" src="https://github.com/user-attachments/assets/2064ef59-382c-42ea-be47-9ca71d53b691" /> Edit 2: to me this doesn’t look like an issue with the sync state, as the app knows the image is not uploaded. It seems that the request to upload is never actually made (as the server never sees any request coming in) Both using local ip and cloudflare I do see requests in the servers logs, however these are all pings and sync/ack but never an actual POST to an asset. Edit 3: I just noticed that settings -> backup says that background app refresh is disabled, despite it being enabled in iOS’s general settings as well as in the app specific settings.
Author
Owner

@korikori commented on GitHub (Sep 19, 2025):

@alextran1502 Both the app and server are 1.142.1; I just now logged out of the app and logged back in, the number under remainder quickly got down to zero, then got back to 1 (and very briefly, to -1), similar to what @PalatinCoder has described. Here's my sync status page

Image
@korikori commented on GitHub (Sep 19, 2025): @alextran1502 Both the app and server are 1.142.1; I just now logged out of the app and logged back in, the number under remainder quickly got down to zero, then got back to 1 (and very briefly, to -1), similar to what @PalatinCoder has described. Here's my sync status page <img width="1125" height="2436" alt="Image" src="https://github.com/user-attachments/assets/ae898a88-2d5f-4e3c-8ce7-062b30831d9d" />
Author
Owner

@goffincedric commented on GitHub (Sep 19, 2025):

@alextran1502 sorry for the late response, past few days I had to travel a lot.

The android app still showed one asset that needed to be backed up. I did some extra digging in the timeline, and I noticed that the image was in fact uploaded to the server, and it is present on the web timeline. On the mobile app however, it shows the photo once as uploaded and shows the exact same image file as 'not uploaded' besides it. Manually adding it to the upload queue has the same result: a failed upload with the same error log on the server side.

No manual actions have been taken for this photo on both mobile app or server (so no manual deleting/re-uploading, ....). It seems like the mobile app hasn't registered the photo as being uploaded yet.

@goffincedric commented on GitHub (Sep 19, 2025): @alextran1502 sorry for the late response, past few days I had to travel a lot. The android app still showed one asset that needed to be backed up. I did some extra digging in the timeline, and I noticed that the image was in fact uploaded to the server, and it is present on the web timeline. On the mobile app however, it shows the photo once as uploaded and shows the exact same image file as 'not uploaded' besides it. Manually adding it to the upload queue has the same result: a failed upload with the same error log on the server side. No manual actions have been taken for this photo on both mobile app or server (so no manual deleting/re-uploading, ....). It seems like the mobile app hasn't registered the photo as being uploaded yet.
Author
Owner

@alextran1502 commented on GitHub (Sep 19, 2025):

@goffincedric can you help confirm if that one asset is part of a LivePhotos?

@alextran1502 commented on GitHub (Sep 19, 2025): @goffincedric can you help confirm if that one asset is part of a LivePhotos?
Author
Owner

@goffincedric commented on GitHub (Sep 20, 2025):

@alextran1502 The image is not a LivePhotos image. Just a normal picture taken with my default android camera app ;)

@goffincedric commented on GitHub (Sep 20, 2025): @alextran1502 The image is not a LivePhotos image. Just a normal picture taken with my default android camera app ;)
Author
Owner

@alextran1502 commented on GitHub (Sep 20, 2025):

@goffincedric I wonder if this could be transitional artifact. I assume if you remove that asset and clear them from the web, it will be uploaded and updated your library correctly

@alextran1502 commented on GitHub (Sep 20, 2025): @goffincedric I wonder if this could be transitional artifact. I assume if you remove that asset and clear them from the web, it will be uploaded and updated your library correctly
Author
Owner

@goffincedric commented on GitHub (Sep 20, 2025):

@alextran1502 When I clear the image using the web interface, and remove it from trash, the mobile app tries to upload the asset again indeed. It does however still fail with the same error in the server logs.

I have tried the same operation using the mobile app (deleting the asset, removing it from trash and re-uploading it). Still the same issue and server log entry.

The image is of July 16th. When I download the file in the mobile app, it downloads the image but with a timestamp 2 hours off of the original one (Belgium is UTC+02:00).

@goffincedric commented on GitHub (Sep 20, 2025): @alextran1502 When I clear the image using the web interface, and remove it from trash, the mobile app tries to upload the asset again indeed. It does however still fail with the same error in the server logs. I have tried the same operation using the mobile app (deleting the asset, removing it from trash and re-uploading it). Still the same issue and server log entry. The image is of July 16th. When I download the file in the mobile app, it downloads the image but with a timestamp 2 hours off of the original one (Belgium is UTC+02:00).
Author
Owner

@AndresElizondo commented on GitHub (Sep 24, 2025):

Logging off and on again worked for me on Android running latest versions of mobile and server.
I had two videos stuck in this loop after upgrading.

@AndresElizondo commented on GitHub (Sep 24, 2025): Logging off and on again worked for me on Android running latest versions of mobile and server. I had two videos stuck in this loop after upgrading.
Author
Owner

@korikori commented on GitHub (Sep 24, 2025):

With the latest version of both the app and the server, this issue has been resolved on iOS (but I did have to delete the final 1 asset that kept re-appearing in the "Remainder" section).

@korikori commented on GitHub (Sep 24, 2025): With the latest version of both the app and the server, this issue has been resolved on iOS (but I did have to delete the final 1 asset that kept re-appearing in the "Remainder" section).
Author
Owner

@GetNameSniped commented on GitHub (Sep 25, 2025):

Image Keeps trying to upload and failing I was wondering why my battery life suddenly got so bad And this isnt even including the 80gb of SIM data its used in the past month
@GetNameSniped commented on GitHub (Sep 25, 2025): <img width="1008" height="1173" alt="Image" src="https://github.com/user-attachments/assets/c08a8380-5c7c-4527-b134-49998935a0b8" /> Keeps trying to upload and failing I was wondering why my battery life suddenly got so bad And this isnt even including the 80gb of SIM data its used in the past month
Author
Owner

@AndresElizondo commented on GitHub (Sep 26, 2025):

A few days ago the issue was resolved by logging out and back in.
Today, the issue is back with a new video.

This is not an artifact from the version upgrade, but rather it fails randomly for new media.
For me, it continues to be only on videos.

@AndresElizondo commented on GitHub (Sep 26, 2025): A few days ago the issue was resolved by logging out and back in. Today, the issue is back with a new video. This is not an artifact from the version upgrade, but rather it fails randomly for new media. For me, it continues to be only on videos.
Author
Owner

@alextran1502 commented on GitHub (Sep 26, 2025):

@AndresElizondo Do you use NGINX?

@alextran1502 commented on GitHub (Sep 26, 2025): @AndresElizondo Do you use NGINX?
Author
Owner

@madslug17 commented on GitHub (Sep 26, 2025):

I am also running into this issue on one of my devices (Pixel 8), but only with the new timeline. I’m using Traefik for a reverse proxy and it is set up following the immich docs. Logging out and back in does not clear the remainder. I have a Pixel 7 running GrapheneOS that does not run into this issue with the new timeline. Server is 1.143.0 and apps are both 1.143.1. I have the same server error logs that @barisoztop mentioned. I will also note I have disabled Google Photos on the Pixel 8 and cleared the Immich cache.

@madslug17 commented on GitHub (Sep 26, 2025): I am also running into this issue on one of my devices (Pixel 8), but only with the new timeline. I’m using Traefik for a reverse proxy and it is set up following the [immich docs](https://docs.immich.app/administration/reverse-proxy/#traefik-proxy-example-config). Logging out and back in does not clear the remainder. I have a Pixel 7 running GrapheneOS that does not run into this issue with the new timeline. Server is `1.143.0` and apps are both `1.143.1`. I have the same server error logs that @barisoztop mentioned. I will also note I have disabled Google Photos on the Pixel 8 and cleared the Immich cache.
Author
Owner

@alextran1502 commented on GitHub (Sep 27, 2025):

@madslug17 Can you track down the remainder asset, is there anything special about it such as large videos or a corrupted file?

@alextran1502 commented on GitHub (Sep 27, 2025): @madslug17 Can you track down the remainder asset, is there anything special about it such as large videos or a corrupted file?
Author
Owner

@madslug17 commented on GitHub (Sep 29, 2025):

@madslug17 Can you track down the remainder asset, is there anything special about it such as large videos or a corrupted file?

Going through the logs and looking for instances where I have the PostgresError: duplicate key value violates unique constraint “UQ_assets_owner_checksum” error logged, I then just got the param field with the image name and sorted it through a sort | uniq and I can see 1589 unique images associated with this error. Mostly they are JPEGs and I don’t see anything special about them. I did switch back and forth between the new timeline and the original timeline because it was not backing up on new timeline. Here is a log snippet:

Query failed : {
  durationMs: 2.4446189999580383,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x65b028f2ea150989c86e01b4ee7218150ba77a8e) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer 65 b0 28 f2 ea 15 09 89 c8 6e 01 b4 ee 72 18 15 0b a7 7a 8e>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/19/55/19559899-e4b5-45c1-b83d-da9173427bd4.jpg',
    '1000007722',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T16:25:04.000Z,
    2025-07-17T16:25:08.000Z,
    2025-07-17T16:25:04.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'PXL_20250717_162504755.PORTRAIT.ORIGINAL.jpg'
  ]
}
Query failed : {
  durationMs: 2.086313009262085,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x869d6f38ccb0e4b9c85eb0dca5faaa77e82efe6d) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer 86 9d 6f 38 cc b0 e4 b9 c8 5e b0 dc a5 fa aa 77 e8 2e fe 6d>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/e2/bf/e2bf23ac-70cb-43c8-8f36-f8bfab383ed3.jpg',
    '1000007721',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T16:24:56.000Z,
    2025-07-17T16:24:58.000Z,
    2025-07-17T16:24:56.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'PXL_20250717_162456680.jpg'
  ]
}
Query failed : {
  durationMs: 2.268465995788574,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\xbaba81a5b6067db1992bfdb8b7f1e84f73ffe1ae) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer ba ba 81 a5 b6 06 7d b1 99 2b fd b8 b7 f1 e8 4f 73 ff e1 ae>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/7e/18/7e184a17-53d4-4732-8ddc-04eff023cf38.mp4',
    '1000007727',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T18:11:50.000Z,
    2025-07-17T18:11:50.000Z,
    2025-07-17T18:11:50.000Z,
    'VIDEO',
    false,
    '0',
    'timeline',
    'PXL_20250717_181101305.mp4'
  ]
}
Query failed : {
  durationMs: 2.8771919906139374,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x9e273139c371d859251e6437a82870e0f437d4e3) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer 9e 27 31 39 c3 71 d8 59 25 1e 64 37 a8 28 70 e0 f4 37 d4 e3>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/c9/3d/c93d5878-704a-4182-9bb2-a94ae5315589.jpg',
    '1000007720',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T16:24:53.000Z,
    2025-07-17T16:24:56.000Z,
    2025-07-17T16:24:53.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'PXL_20250717_162453097.jpg'
  ]
}
@madslug17 commented on GitHub (Sep 29, 2025): > [@madslug17](https://github.com/madslug17) Can you track down the remainder asset, is there anything special about it such as large videos or a corrupted file? Going through the logs and looking for instances where I have the `PostgresError: duplicate key value violates unique constraint “UQ_assets_owner_checksum”` error logged, I then just got the param field with the image name and sorted it through a `sort | uniq` and I can see 1589 unique images associated with this error. Mostly they are JPEGs and I don’t see anything special about them. I did switch back and forth between the new timeline and the original timeline because it was not backing up on new timeline. Here is a log snippet: ``` Query failed : { durationMs: 2.4446189999580383, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x65b028f2ea150989c86e01b4ee7218150ba77a8e) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '663', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '5d799f1c-a817-4614-8691-0c1807b45063', null, <Buffer 65 b0 28 f2 ea 15 09 89 c8 6e 01 b4 ee 72 18 15 0b a7 7a 8e>, '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/19/55/19559899-e4b5-45c1-b83d-da9173427bd4.jpg', '1000007722', '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', 2025-07-17T16:25:04.000Z, 2025-07-17T16:25:08.000Z, 2025-07-17T16:25:04.000Z, 'IMAGE', false, '0', 'timeline', 'PXL_20250717_162504755.PORTRAIT.ORIGINAL.jpg' ] } Query failed : { durationMs: 2.086313009262085, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x869d6f38ccb0e4b9c85eb0dca5faaa77e82efe6d) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '663', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '5d799f1c-a817-4614-8691-0c1807b45063', null, <Buffer 86 9d 6f 38 cc b0 e4 b9 c8 5e b0 dc a5 fa aa 77 e8 2e fe 6d>, '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/e2/bf/e2bf23ac-70cb-43c8-8f36-f8bfab383ed3.jpg', '1000007721', '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', 2025-07-17T16:24:56.000Z, 2025-07-17T16:24:58.000Z, 2025-07-17T16:24:56.000Z, 'IMAGE', false, '0', 'timeline', 'PXL_20250717_162456680.jpg' ] } Query failed : { durationMs: 2.268465995788574, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\xbaba81a5b6067db1992bfdb8b7f1e84f73ffe1ae) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '663', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '5d799f1c-a817-4614-8691-0c1807b45063', null, <Buffer ba ba 81 a5 b6 06 7d b1 99 2b fd b8 b7 f1 e8 4f 73 ff e1 ae>, '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/7e/18/7e184a17-53d4-4732-8ddc-04eff023cf38.mp4', '1000007727', '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', 2025-07-17T18:11:50.000Z, 2025-07-17T18:11:50.000Z, 2025-07-17T18:11:50.000Z, 'VIDEO', false, '0', 'timeline', 'PXL_20250717_181101305.mp4' ] } Query failed : { durationMs: 2.8771919906139374, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x9e273139c371d859251e6437a82870e0f437d4e3) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '663', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '5d799f1c-a817-4614-8691-0c1807b45063', null, <Buffer 9e 27 31 39 c3 71 d8 59 25 1e 64 37 a8 28 70 e0 f4 37 d4 e3>, '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/c9/3d/c93d5878-704a-4182-9bb2-a94ae5315589.jpg', '1000007720', '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', 2025-07-17T16:24:53.000Z, 2025-07-17T16:24:56.000Z, 2025-07-17T16:24:53.000Z, 'IMAGE', false, '0', 'timeline', 'PXL_20250717_162453097.jpg' ] } ```
Author
Owner

@pticle94 commented on GitHub (Sep 29, 2025):

I also have the same kind of errors.
I've described them in this discussion #22471 (in which I also proposed a solution in case we could implement something).
I also have a Pixel (8 Pro) but my gf has a Redmi 12 Pro and faces also the errors on some uploads...

@pticle94 commented on GitHub (Sep 29, 2025): I also have the same kind of errors. I've described them in this discussion #22471 (in which I also proposed a solution in case we could implement something). I also have a Pixel (8 Pro) but my gf has a Redmi 12 Pro and faces also the errors on some uploads...
Author
Owner

@alextran1502 commented on GitHub (Sep 29, 2025):

@pticle94 what is your server version?

@alextran1502 commented on GitHub (Sep 29, 2025): @pticle94 what is your server version?
Author
Owner
@pticle94 commented on GitHub (Sep 29, 2025): > [@pticle94](https://github.com/pticle94) what is your server version? @alextran1502, I tried to indicate everything on #22471: - Deployment: Docker on a NAS - immich-redis: https://github.com/redis/redis/releases/tag/8.2.1 - immich-db: https://github.com/immich-app/base-images/pkgs/container/postgres/516762871?tag=16-vectorchord0.3.0-pgvectors0.2.0 - immich-server: https://github.com/immich-app/immich/pkgs/container/immich-server/524233169?tag=v1.143.1 - immich-machine-learning: https://github.com/immich-app/immich/pkgs/container/immich-machine-learning/524233206?tag=v1.143.1 - Client app: latest from Google Play Store (https://play.google.com/store/apps/details?id=app.alextran.immich)
Author
Owner

@pticle94 commented on GitHub (Sep 30, 2025):

@pticle94 what is your server version?

@alextran1502, I've also checked today, and on my phone (Google Pixel 8 Pro) I still have the Immich App trying to upload (I have the notification activated) even I have no new photo...

During the day, I am often being a cloudflare tunnel to access Immich server installed on my NAS

And checking the logs, I can see that I still have the same issue.

immich-server logs (https://github.com/immich-app/immich/pkgs/container/immich-server/524233169?tag=v1.143.1)

sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
params: [
'8e35e35b-6d46-43c0-980e-2b0eaf10d0b4',

,
<Buffer ae 69 d4 4e 61 e4 b1 21 6f 0b 7c e0 25 dc 87 b5 2a 6e c0 32>,
'/data/upload/8e35e35b-6d46-43c0-980e-2b0eaf10d0b4/bb/4f/bb4faf79-ee31-4224-b321-f7cc96eb0e7f.jpg',
'1000096912',
'a14493188a616e70729876ccc6a39697c78ee3e79ae09d3b83f0fec10f8a8840',
2025-09-11T16:00:58.000Z,
2025-09-11T16:01:07.000Z,
2025-09-11T16:00:58.000Z,

'IMAGE',
false,
'0',
'timeline',
'PXL_20250911_160058539.jpg'
]
}
Query failed : {
durationMs: 3.5525839999318123,
error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '23505',
detail: 'Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x5c921d979f910573ea65dd9dbc39933717cd0ccb) already exists.',
schema_name: 'public',
table_name: 'asset',
constraint_name: 'UQ_assets_owner_checksum',
file: 'nbtinsert.c',
line: '666',
routine: '_bt_check_unique'
},
sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
params: [
'8e35e35b-6d46-43c0-980e-2b0eaf10d0b4',

,
<Buffer 5c 92 1d 97 9f 91 05 73 ea 65 dd 9d bc 39 93 37 17 cd 0c cb>,
'/data/upload/8e35e35b-6d46-43c0-980e-2b0eaf10d0b4/44/5c/445cbee4-1694-43cc-8976-e4a4540908b7.jpg',
'1000096910',
'a14493188a616e70729876ccc6a39697c78ee3e79ae09d3b83f0fec10f8a8840',
2025-09-11T15:55:56.000Z,
2025-09-11T15:56:03.000Z,
2025-09-11T15:55:56.000Z,

'IMAGE',
false,
'0',
'timeline',
'PXL_20250911_155556518.jpg'
]
}
Query failed : {
durationMs: 5.179251998662949,
error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '23505',
detail: 'Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xe5c2a05f9ebac467ed067427d6a041cc0df43da0) already exists.',
schema_name: 'public',
table_name: 'asset',
constraint_name: 'UQ_assets_owner_checksum',
file: 'nbtinsert.c',
line: '666',
routine: '_bt_check_unique'
},
sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
params: [
'8e35e35b-6d46-43c0-980e-2b0eaf10d0b4',

,
<Buffer e5 c2 a0 5f 9e ba c4 67 ed 06 74 27 d6 a0 41 cc 0d f4 3d a0>,
'/data/upload/8e35e35b-6d46-43c0-980e-2b0eaf10d0b4/e8/7e/e87edcb6-d97a-407e-9d34-7c731c8fd79d.jpg',
'1000007777',
'a14493188a616e70729876ccc6a39697c78ee3e79ae09d3b83f0fec10f8a8840',
2024-09-20T14:38:11.000Z,
2024-09-20T14:38:16.000Z,
2024-09-20T14:38:11.000Z,

'IMAGE',
false,
'0',
'timeline',
'PXL_20240920_143811044.RAW-01.COVER.jpg'
]
}

immich-db logs (https://github.com/immich-app/base-images/pkgs/container/postgres/516762871?tag=16-vectorchord0.3.0-pgvectors0.2.0)

2025-09-30 14:33:51.530 CEST [32] LOG: checkpoint starting: time
2025-09-30 14:33:52.548 CEST [32] LOG: checkpoint complete: wrote 11 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.006 s, sync=0.008 s, total=1.019 s; sync files=11, longest=0.001 s, average=0.001 s; distance=15 kB, estimate=87 kB; lsn=C/270AF050, redo lsn=C/270AF018
2025-09-30 14:34:01.583 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:01.583 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x80a7c1c3437697863ea3660b1982859ed1e9d582) already exists.
2025-09-30 14:34:01.583 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:12.138 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:12.138 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xcd8e3aafd42ec21e27992eb2744ccf47797f8413) already exists.
2025-09-30 14:34:12.138 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:22.884 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:22.884 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x914f95d995dabbd326c37064b5cf0b5cc688538e) already exists.
2025-09-30 14:34:22.884 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:28.778 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:28.778 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xd8429b8ba01900b39e4d9dfec863136d29fd324a) already exists.
2025-09-30 14:34:28.778 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:35.917 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:35.917 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x2800b5413c6e5496608bd5cf2b4414dab402d7f7) already exists.
2025-09-30 14:34:35.917 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:42.368 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:42.368 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xae69d44e61e4b1216f0b7ce025dc87b52a6ec032) already exists.
2025-09-30 14:34:42.368 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:50.864 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:50.864 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x5c921d979f910573ea65dd9dbc39933717cd0ccb) already exists.
2025-09-30 14:34:50.864 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:34:53.091 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
2025-09-30 14:34:53.091 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xe5c2a05f9ebac467ed067427d6a041cc0df43da0) already exists.
2025-09-30 14:34:53.091 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *
2025-09-30 14:38:51.649 CEST [32] LOG: checkpoint starting: time
2025-09-30 14:38:55.302 CEST [32] LOG: checkpoint complete: wrote 37 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=3.636 s, sync=0.010 s, total=3.654 s; sync files=11, longest=0.002 s, average=0.001 s; distance=104 kB, estimate=104 kB; lsn=C/270C92E8, redo lsn=C/270C92B0

immich android app logs

2025-09-30 14:34:55.113487 | info | BackgroundWorkerBgService | Cleaning up background worker |
2025-09-30 14:34:55.108237 | info | BackgroundWorkerBgService | Android background processing completed in 5764s |
2025-09-30 14:33:52.361061 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Broken pipe (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 37732, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: |
2025-09-30 14:33:52.109816 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 37718, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:51.862288 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 37716, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: |
2025-09-30 14:33:51.643743 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44326, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:51.130367 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44318, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:50.887170 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Read failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44308, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.read (dart:io-patch/socket_patch.dart:1350)
#1 _RawSocket.read (dart:io-patch/socket_patch.dart:2398)
#2 _RawSecureSocket._readSocketOrBufferedData (dart:io/secure_socket.dart:1164)
#3 _ExternalBuffer.writeFromSource (dart:io/secure_socket.dart:1404)
#4 _RawSecureSocket._readSocket (dart:io/secure_socket.dart:1173)
#5 _RawSecureSocket._readHandler (dart:io/secure_socket.dart:952)
#6 _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:940)
#7 _rootRunUnary (dart:async/zone.dart:1546)
#8 _CustomZone.runUnary (dart:async/zone.dart:1429)
#9 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329)
#10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#12 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798)
#13 _StreamController._add (dart:async/stream_controller.dart:663)
#14 _StreamController.add (dart:async/stream_controller.dart:618)
#15 new _RawSocket. (dart:io-patch/socket_patch.dart:2331)
#16 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1655)
#17 _microtaskLoop (dart:async/schedule_microtask.dart:40)
#18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
|
2025-09-30 14:33:50.644644 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44302, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:50.390507 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44288, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:50.108311 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44276, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:49.798867 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Broken pipe (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44260, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: |
2025-09-30 14:33:49.528222 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44250, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:49.304567 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44238, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:49.065723 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44234, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:48.798648 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44226, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: |
2025-09-30 14:33:48.575301 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44212, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:48.340171 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44204, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:48.109462 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44202, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: |
2025-09-30 14:33:47.884932 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44194, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:47.701606 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44186, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:47.465399 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44178, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:47.267401 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44170, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127)

|
2025-09-30 14:33:47.075561 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Read failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44168, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.read (dart:io-patch/socket_patch.dart:1350)
#1 _RawSocket.read (dart:io-patch/socket_patch.dart:2398)
#2 _RawSecureSocket._readSocketOrBufferedData (dart:io/secure_socket.dart:1164)
#3 _ExternalBuffer.writeFromSource (dart:io/secure_socket.dart:1404)
#4 _RawSecureSocket._readSocket (dart:io/secure_socket.dart:1173)
#5 _RawSecureSocket._readHandler (dart:io/secure_socket.dart:952)
#6 _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:940)
#7 _rootRunUnary (dart:async/zone.dart:1546)
#8 _CustomZone.runUnary (dart:async/zone.dart:1429)
#9 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329)
#10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#12 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798)
#13 _StreamController._add (dart:async/stream_controller.dart:663)
#14 _StreamController.add (dart:async/stream_controller.dart:618)
#15 new _RawSocket. (dart:io-patch/socket_patch.dart:2331)
#16 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1655)
#17 _microtaskLoop (dart:async/schedule_microtask.dart:40)
#18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

@pticle94 commented on GitHub (Sep 30, 2025): > [@pticle94](https://github.com/pticle94) what is your server version? @alextran1502, I've also checked today, and on my phone (Google Pixel 8 Pro) I still have the Immich App trying to upload (I have the notification activated) even I have no new photo... During the day, I am often being a cloudflare tunnel to access Immich server installed on my NAS And checking the logs, I can see that I still have the same issue. ### immich-server logs (https://github.com/immich-app/immich/pkgs/container/immich-server/524233169?tag=v1.143.1) > sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '8e35e35b-6d46-43c0-980e-2b0eaf10d0b4',  , <Buffer ae 69 d4 4e 61 e4 b1 21 6f 0b 7c e0 25 dc 87 b5 2a 6e c0 32>, '/data/upload/8e35e35b-6d46-43c0-980e-2b0eaf10d0b4/bb/4f/bb4faf79-ee31-4224-b321-f7cc96eb0e7f.jpg', '1000096912', 'a14493188a616e70729876ccc6a39697c78ee3e79ae09d3b83f0fec10f8a8840', 2025-09-11T16:00:58.000Z, 2025-09-11T16:01:07.000Z, 2025-09-11T16:00:58.000Z,  'IMAGE', false, '0', 'timeline', 'PXL_20250911_160058539.jpg' ] } Query failed : { durationMs: 3.5525839999318123, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \\x5c921d979f910573ea65dd9dbc39933717cd0ccb) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '666', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '8e35e35b-6d46-43c0-980e-2b0eaf10d0b4',  , <Buffer 5c 92 1d 97 9f 91 05 73 ea 65 dd 9d bc 39 93 37 17 cd 0c cb>, '/data/upload/8e35e35b-6d46-43c0-980e-2b0eaf10d0b4/44/5c/445cbee4-1694-43cc-8976-e4a4540908b7.jpg', '1000096910', 'a14493188a616e70729876ccc6a39697c78ee3e79ae09d3b83f0fec10f8a8840', 2025-09-11T15:55:56.000Z, 2025-09-11T15:56:03.000Z, 2025-09-11T15:55:56.000Z,  'IMAGE', false, '0', 'timeline', 'PXL_20250911_155556518.jpg' ] } Query failed : { durationMs: 5.179251998662949, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '23505', detail: 'Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \\xe5c2a05f9ebac467ed067427d6a041cc0df43da0) already exists.', schema_name: 'public', table_name: 'asset', constraint_name: 'UQ_assets_owner_checksum', file: 'nbtinsert.c', line: '666', routine: '_bt_check_unique' }, sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', params: [ '8e35e35b-6d46-43c0-980e-2b0eaf10d0b4',  , <Buffer e5 c2 a0 5f 9e ba c4 67 ed 06 74 27 d6 a0 41 cc 0d f4 3d a0>, '/data/upload/8e35e35b-6d46-43c0-980e-2b0eaf10d0b4/e8/7e/e87edcb6-d97a-407e-9d34-7c731c8fd79d.jpg', '1000007777', 'a14493188a616e70729876ccc6a39697c78ee3e79ae09d3b83f0fec10f8a8840', 2024-09-20T14:38:11.000Z, 2024-09-20T14:38:16.000Z, 2024-09-20T14:38:11.000Z,  'IMAGE', false, '0', 'timeline', 'PXL_20240920_143811044.RAW-01.COVER.jpg' ] } ### immich-db logs (https://github.com/immich-app/base-images/pkgs/container/postgres/516762871?tag=16-vectorchord0.3.0-pgvectors0.2.0) > 2025-09-30 14:33:51.530 CEST [32] LOG: checkpoint starting: time 2025-09-30 14:33:52.548 CEST [32] LOG: checkpoint complete: wrote 11 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.006 s, sync=0.008 s, total=1.019 s; sync files=11, longest=0.001 s, average=0.001 s; distance=15 kB, estimate=87 kB; lsn=C/270AF050, redo lsn=C/270AF018 2025-09-30 14:34:01.583 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:01.583 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x80a7c1c3437697863ea3660b1982859ed1e9d582) already exists. 2025-09-30 14:34:01.583 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:12.138 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:12.138 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xcd8e3aafd42ec21e27992eb2744ccf47797f8413) already exists. 2025-09-30 14:34:12.138 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:22.884 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:22.884 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x914f95d995dabbd326c37064b5cf0b5cc688538e) already exists. 2025-09-30 14:34:22.884 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:28.778 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:28.778 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xd8429b8ba01900b39e4d9dfec863136d29fd324a) already exists. 2025-09-30 14:34:28.778 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:35.917 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:35.917 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x2800b5413c6e5496608bd5cf2b4414dab402d7f7) already exists. 2025-09-30 14:34:35.917 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:42.368 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:42.368 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xae69d44e61e4b1216f0b7ce025dc87b52a6ec032) already exists. 2025-09-30 14:34:42.368 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:50.864 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:50.864 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \x5c921d979f910573ea65dd9dbc39933717cd0ccb) already exists. 2025-09-30 14:34:50.864 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:34:53.091 CEST [38883] ERROR: duplicate key value violates unique constraint "UQ_assets_owner_checksum" 2025-09-30 14:34:53.091 CEST [38883] DETAIL: Key ("ownerId", checksum)=(8e35e35b-6d46-43c0-980e-2b0eaf10d0b4, \xe5c2a05f9ebac467ed067427d6a041cc0df43da0) already exists. 2025-09-30 14:34:53.091 CEST [38883] STATEMENT: insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning * 2025-09-30 14:38:51.649 CEST [32] LOG: checkpoint starting: time 2025-09-30 14:38:55.302 CEST [32] LOG: checkpoint complete: wrote 37 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=3.636 s, sync=0.010 s, total=3.654 s; sync files=11, longest=0.002 s, average=0.001 s; distance=104 kB, estimate=104 kB; lsn=C/270C92E8, redo lsn=C/270C92B0 ### immich android app logs 2025-09-30 14:34:55.113487 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-09-30 14:34:55.108237 | info | BackgroundWorkerBgService | Android background processing completed in 5764s | 2025-09-30 14:33:52.361061 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Broken pipe (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 37732, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: | 2025-09-30 14:33:52.109816 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 37718, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:51.862288 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 37716, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: | 2025-09-30 14:33:51.643743 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44326, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:51.130367 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44318, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:50.887170 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Read failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44308, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.read (dart:io-patch/socket_patch.dart:1350) #1 _RawSocket.read (dart:io-patch/socket_patch.dart:2398) #2 _RawSecureSocket._readSocketOrBufferedData (dart:io/secure_socket.dart:1164) #3 _ExternalBuffer.writeFromSource (dart:io/secure_socket.dart:1404) #4 _RawSecureSocket._readSocket (dart:io/secure_socket.dart:1173) #5 _RawSecureSocket._readHandler (dart:io/secure_socket.dart:952) #6 _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:940) #7 _rootRunUnary (dart:async/zone.dart:1546) #8 _CustomZone.runUnary (dart:async/zone.dart:1429) #9 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329) #10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381) #11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312) #12 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798) #13 _StreamController._add (dart:async/stream_controller.dart:663) #14 _StreamController.add (dart:async/stream_controller.dart:618) #15 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2331) #16 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1655) #17 _microtaskLoop (dart:async/schedule_microtask.dart:40) #18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49) | 2025-09-30 14:33:50.644644 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44302, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:50.390507 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44288, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:50.108311 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44276, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:49.798867 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Broken pipe (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44260, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: | 2025-09-30 14:33:49.528222 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44250, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:49.304567 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44238, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:49.065723 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44234, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:48.798648 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44226, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: | 2025-09-30 14:33:48.575301 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44212, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:48.340171 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44204, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:48.109462 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44202, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: | 2025-09-30 14:33:47.884932 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44194, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:47.701606 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44186, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:47.465399 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44178, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:47.267401 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = immich.UrlOfMyCloudflareTunnel.com, port = 44170, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1484) #1 _RawSocket.write (dart:io-patch/socket_patch.dart:2408) #2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1420) #3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1183) #4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1127) <asynchronous suspension> | 2025-09-30 14:33:47.075561 | warning | UploadRepository | Error backup asset: ClientException with SocketException: Read failed (OS Error: Connection reset by peer, errno = 104), address = immich.UrlOfMyCloudflareTunnel.com, port = 44168, uri=https://immich.UrlOfMyCloudflareTunnel.com/api/assets: #0 _NativeSocket.read (dart:io-patch/socket_patch.dart:1350) #1 _RawSocket.read (dart:io-patch/socket_patch.dart:2398) #2 _RawSecureSocket._readSocketOrBufferedData (dart:io/secure_socket.dart:1164) #3 _ExternalBuffer.writeFromSource (dart:io/secure_socket.dart:1404) #4 _RawSecureSocket._readSocket (dart:io/secure_socket.dart:1173) #5 _RawSecureSocket._readHandler (dart:io/secure_socket.dart:952) #6 _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:940) #7 _rootRunUnary (dart:async/zone.dart:1546) #8 _CustomZone.runUnary (dart:async/zone.dart:1429) #9 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329) #10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381) #11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312) #12 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798) #13 _StreamController._add (dart:async/stream_controller.dart:663) #14 _StreamController.add (dart:async/stream_controller.dart:618) #15 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2331) #16 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1655) #17 _microtaskLoop (dart:async/schedule_microtask.dart:40) #18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
Author
Owner

@alextran1502 commented on GitHub (Sep 30, 2025):

@pticle94 the logs show troubles connecting to your instance, probably try to start with a local IP, then slowly add different part of your networking piece to identify where the issue emerge

@alextran1502 commented on GitHub (Sep 30, 2025): @pticle94 the logs show troubles connecting to your instance, probably try to start with a local IP, then slowly add different part of your networking piece to identify where the issue emerge
Author
Owner

@AndresElizondo commented on GitHub (Oct 1, 2025):

@alextran1502 just saw your reply.
I use Caddy for the reverse proxy with cloudflare dns + cloudflared tunnel.
I am using the public URL at all times, even at home (adguard inside home redirects requests to local immich server)

When the issues happened, multiple items were being backed up at once. Failures appear random.

@AndresElizondo commented on GitHub (Oct 1, 2025): @alextran1502 just saw your reply. I use Caddy for the reverse proxy with cloudflare dns + cloudflared tunnel. I am using the public URL at all times, even at home (adguard inside home redirects requests to local immich server) When the issues happened, multiple items were being backed up at once. Failures appear random.
Author
Owner

@alextran1502 commented on GitHub (Oct 1, 2025):

@AndresElizondo CF tunnel limit 100MB upload size, that can cause issues

@alextran1502 commented on GitHub (Oct 1, 2025): @AndresElizondo CF tunnel limit 100MB upload size, that can cause issues
Author
Owner

@AndresElizondo commented on GitHub (Oct 1, 2025):

Just tested, I think you might be right.
Uploading 400MB video fails until I force local IP to be used
Will test some more, apologies for the noise here
Thanks for the help!

@AndresElizondo commented on GitHub (Oct 1, 2025): Just tested, I think you might be right. Uploading 400MB video fails until I force local IP to be used Will test some more, apologies for the noise here Thanks for the help!
Author
Owner

@pticle94 commented on GitHub (Oct 1, 2025):

@alextran1502 you were right, that's also the same for me.
When switching to internal IP, the upload process successfully finishes.

Do you have any advice to choose something else than Cloudflared tunnel?

@pticle94 commented on GitHub (Oct 1, 2025): @alextran1502 you were right, that's also the same for me. When switching to internal IP, the upload process successfully finishes. Do you have any advice to choose something else than Cloudflared tunnel?
Author
Owner

@jasonlessenich commented on GitHub (Oct 2, 2025):

@AndresElizondo CF tunnel limit 100MB upload size, that can cause issues

@alextran1502 Would it make sense adding a toggle in the network settings of the app that allows large files (>100mb) only to be uploaded over the configured local network? If so, I'd actually like to contribute this.

@jasonlessenich commented on GitHub (Oct 2, 2025): > [@AndresElizondo](https://github.com/AndresElizondo) CF tunnel limit 100MB upload size, that can cause issues @alextran1502 Would it make sense adding a toggle in the network settings of the app that allows large files (>100mb) only to be uploaded over the configured local network? If so, I'd actually like to contribute this.
Author
Owner

@AndresElizondo commented on GitHub (Oct 3, 2025):

@jasonlessenich Hey! I know there's been discussions about allowing for large chunked uploads.
The discussion has been closed though.
https://github.com/immich-app/immich/discussions/1674

@AndresElizondo commented on GitHub (Oct 3, 2025): @jasonlessenich Hey! I know there's been discussions about allowing for large chunked uploads. The discussion has been closed though. https://github.com/immich-app/immich/discussions/1674
Author
Owner

@jasonlessenich commented on GitHub (Oct 4, 2025):

Oh yeah, chunking large files would actually make more sense I guess

@jasonlessenich commented on GitHub (Oct 4, 2025): Oh yeah, chunking large files would actually make more sense I guess
Author
Owner

@codeceptsDE commented on GitHub (Oct 12, 2025):

I believe to be experiencing the same issue. Also, I believe this issue to be related to #22320, #22024, and potentially #22407, #22742. I did update Android app and server to v2.0.1, and logout/login on the mobile app, though the issue persists. This forces me to remain on the old timeline, as in the new timeline, I'm stuck in the continuous upload loop.

In my case, I have 24 photos that are stuck in the "remaining" queue. I found that, just like for the OP of #22024, they appear in the timeline twice – once with the "crossed out cloud" icon and once with the "empty cloud" icon, while all others have the "checkmark cloud" icon.
I have the suspicion that for me this issue may have originally be caused by the migration flow issues in v1.142.0, which are mentioned in the release notes of v1.142.1.

I get one UQ_assets_owner_checksum error for each of the 24 pictures in the immich_server log. This UQ_assets_owner_checksum is also what links the above-mentioned issues.

I can contribute the log of my mobile app, maybe it helps:

2025-10-12 16:40:17.536017 | warning  | SyncLinkedAlbumService | No linked remote album ID found for local album: Download |
2025-10-12 16:40:17.535995 | warning  | SyncLinkedAlbumService | No linked remote album ID found for local album: Screenshots |
2025-10-12 16:40:17.535918 | warning  | SyncLinkedAlbumService | No linked remote album ID found for local album: Camera |
2025-10-12 16:40:17.528767 | info     | DriftBackupNotifier  | Tasks to resume: 7 |
2025-10-12 16:40:17.528761 | info     | DriftBackupNotifier  | Found 7 tasks |
2025-10-12 16:40:17.523848 | info     | DriftBackupNotifier  | Resuming backup tasks... |
2025-10-12 16:40:15.521829 | info     | HashService          | Hashing took - 19ms |
2025-10-12 16:40:15.502428 | info     | HashService          | Starting hashing of assets |
2025-10-12 16:40:15.499261 | info     | DriftBackupNotifier  | Tasks to resume: 9 |
2025-10-12 16:40:15.499253 | info     | DriftBackupNotifier  | Found 9 tasks |
2025-10-12 16:40:15.493725 | info     | DriftBackupNotifier  | Resuming backup tasks... |
2025-10-12 16:40:13.490836 | info     | SyncApiRepository    | Remote Sync completed in 269ms |
2025-10-12 16:40:13.226558 | info     | DeviceSyncService    | Device sync took - 5ms |
2025-10-12 16:40:13.221369 | info     | SyncStreamService    | Remote sync request for user |
2025-10-12 16:40:12.685045 | info     | AppLifeCycleNotifier | Using server URL: null |
2025-10-12 16:40:05.432265 | warning  | SyncLinkedAlbumService | No linked remote album ID found for local album: Download |
2025-10-12 16:40:05.432246 | warning  | SyncLinkedAlbumService | No linked remote album ID found for local album: Screenshots |
2025-10-12 16:40:05.432160 | warning  | SyncLinkedAlbumService | No linked remote album ID found for local album: Camera |
2025-10-12 16:40:05.422442 | info     | DriftBackupNotifier  | Tasks to resume: 24 |
2025-10-12 16:40:05.422433 | info     | DriftBackupNotifier  | Found 24 tasks |
2025-10-12 16:40:05.416887 | info     | DriftBackupNotifier  | Resuming backup tasks... |
2025-10-12 16:40:03.414862 | info     | HashService          | Hashing took - 13ms |
2025-10-12 16:40:03.401196 | info     | HashService          | Starting hashing of assets |
2025-10-12 16:40:03.373391 | info     | DriftBackupNotifier  | Start a new backup queue |
2025-10-12 16:40:03.373382 | info     | DriftBackupNotifier  | Found 0 tasks |
2025-10-12 16:40:03.360272 | info     | DriftBackupNotifier  | Resuming backup tasks... |
2025-10-12 16:40:01.356770 | info     | SyncApiRepository    | Remote Sync completed in 13320ms |

Note the errors about the duplicate albums. I think there is some weirdness going on there, too, potentially also with hashing/duplication. But I don't believe these are directly related.

I may try re-installing the app, which https://github.com/immich-app/immich/issues/22024#issuecomment-3342041180 reported to solve the issue, but I'd rather help find the root cause first.


Update: I tried a clean re-install of the app, and that fixed the issue! Clearing caches etc. was not enough. Maybe resetting the database would have had the same result, but anyhow, I'm happily on the new timeline now :)

@codeceptsDE commented on GitHub (Oct 12, 2025): I believe to be experiencing the same issue. Also, I believe this issue to be related to #22320, #22024, and potentially #22407, #22742. I did update Android app and server to v2.0.1, and logout/login on the mobile app, though the issue persists. This forces me to remain on the old timeline, as in the new timeline, I'm stuck in the continuous upload loop. In my case, I have 24 photos that are stuck in the "remaining" queue. I found that, just like for the OP of #22024, they appear in the timeline twice – once with the "crossed out cloud" icon and once with the "empty cloud" icon, while all others have the "checkmark cloud" icon. I have the suspicion that for me this issue may have originally be caused by the migration flow issues in v1.142.0, which are mentioned in the release notes of v1.142.1. I get one `UQ_assets_owner_checksum` error for each of the 24 pictures in the immich_server log. This `UQ_assets_owner_checksum` is also what links the above-mentioned issues. I can contribute the log of my mobile app, maybe it helps: ``` 2025-10-12 16:40:17.536017 | warning | SyncLinkedAlbumService | No linked remote album ID found for local album: Download | 2025-10-12 16:40:17.535995 | warning | SyncLinkedAlbumService | No linked remote album ID found for local album: Screenshots | 2025-10-12 16:40:17.535918 | warning | SyncLinkedAlbumService | No linked remote album ID found for local album: Camera | 2025-10-12 16:40:17.528767 | info | DriftBackupNotifier | Tasks to resume: 7 | 2025-10-12 16:40:17.528761 | info | DriftBackupNotifier | Found 7 tasks | 2025-10-12 16:40:17.523848 | info | DriftBackupNotifier | Resuming backup tasks... | 2025-10-12 16:40:15.521829 | info | HashService | Hashing took - 19ms | 2025-10-12 16:40:15.502428 | info | HashService | Starting hashing of assets | 2025-10-12 16:40:15.499261 | info | DriftBackupNotifier | Tasks to resume: 9 | 2025-10-12 16:40:15.499253 | info | DriftBackupNotifier | Found 9 tasks | 2025-10-12 16:40:15.493725 | info | DriftBackupNotifier | Resuming backup tasks... | 2025-10-12 16:40:13.490836 | info | SyncApiRepository | Remote Sync completed in 269ms | 2025-10-12 16:40:13.226558 | info | DeviceSyncService | Device sync took - 5ms | 2025-10-12 16:40:13.221369 | info | SyncStreamService | Remote sync request for user | 2025-10-12 16:40:12.685045 | info | AppLifeCycleNotifier | Using server URL: null | 2025-10-12 16:40:05.432265 | warning | SyncLinkedAlbumService | No linked remote album ID found for local album: Download | 2025-10-12 16:40:05.432246 | warning | SyncLinkedAlbumService | No linked remote album ID found for local album: Screenshots | 2025-10-12 16:40:05.432160 | warning | SyncLinkedAlbumService | No linked remote album ID found for local album: Camera | 2025-10-12 16:40:05.422442 | info | DriftBackupNotifier | Tasks to resume: 24 | 2025-10-12 16:40:05.422433 | info | DriftBackupNotifier | Found 24 tasks | 2025-10-12 16:40:05.416887 | info | DriftBackupNotifier | Resuming backup tasks... | 2025-10-12 16:40:03.414862 | info | HashService | Hashing took - 13ms | 2025-10-12 16:40:03.401196 | info | HashService | Starting hashing of assets | 2025-10-12 16:40:03.373391 | info | DriftBackupNotifier | Start a new backup queue | 2025-10-12 16:40:03.373382 | info | DriftBackupNotifier | Found 0 tasks | 2025-10-12 16:40:03.360272 | info | DriftBackupNotifier | Resuming backup tasks... | 2025-10-12 16:40:01.356770 | info | SyncApiRepository | Remote Sync completed in 13320ms | ``` Note the errors about the duplicate albums. I think there is some weirdness going on there, too, potentially also with hashing/duplication. But I don't believe these are directly related. I may try re-installing the app, which https://github.com/immich-app/immich/issues/22024#issuecomment-3342041180 reported to solve the issue, but I'd rather help find the root cause first. --- Update: I tried a clean re-install of the app, and that fixed the issue! Clearing caches etc. was not enough. Maybe resetting the database would have had the same result, but anyhow, I'm happily on the new timeline now :)
Author
Owner

@madslug17 commented on GitHub (Oct 13, 2025):

@madslug17 Can you track down the remainder asset, is there anything special about it such as large videos or a corrupted file?

Going through the logs and looking for instances where I have the PostgresError: duplicate key value violates unique constraint “UQ_assets_owner_checksum” error logged, I then just got the param field with the image name and sorted it through a sort | uniq and I can see 1589 unique images associated with this error. Mostly they are JPEGs and I don’t see anything special about them. I did switch back and forth between the new timeline and the original timeline because it was not backing up on new timeline. Here is a log snippet:

Query failed : {
  durationMs: 2.4446189999580383,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x65b028f2ea150989c86e01b4ee7218150ba77a8e) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer 65 b0 28 f2 ea 15 09 89 c8 6e 01 b4 ee 72 18 15 0b a7 7a 8e>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/19/55/19559899-e4b5-45c1-b83d-da9173427bd4.jpg',
    '1000007722',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T16:25:04.000Z,
    2025-07-17T16:25:08.000Z,
    2025-07-17T16:25:04.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'PXL_20250717_162504755.PORTRAIT.ORIGINAL.jpg'
  ]
}
Query failed : {
  durationMs: 2.086313009262085,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x869d6f38ccb0e4b9c85eb0dca5faaa77e82efe6d) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer 86 9d 6f 38 cc b0 e4 b9 c8 5e b0 dc a5 fa aa 77 e8 2e fe 6d>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/e2/bf/e2bf23ac-70cb-43c8-8f36-f8bfab383ed3.jpg',
    '1000007721',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T16:24:56.000Z,
    2025-07-17T16:24:58.000Z,
    2025-07-17T16:24:56.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'PXL_20250717_162456680.jpg'
  ]
}
Query failed : {
  durationMs: 2.268465995788574,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\xbaba81a5b6067db1992bfdb8b7f1e84f73ffe1ae) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer ba ba 81 a5 b6 06 7d b1 99 2b fd b8 b7 f1 e8 4f 73 ff e1 ae>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/7e/18/7e184a17-53d4-4732-8ddc-04eff023cf38.mp4',
    '1000007727',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T18:11:50.000Z,
    2025-07-17T18:11:50.000Z,
    2025-07-17T18:11:50.000Z,
    'VIDEO',
    false,
    '0',
    'timeline',
    'PXL_20250717_181101305.mp4'
  ]
}
Query failed : {
  durationMs: 2.8771919906139374,
  error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '23505',
    detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x9e273139c371d859251e6437a82870e0f437d4e3) already exists.',
    schema_name: 'public',
    table_name: 'asset',
    constraint_name: 'UQ_assets_owner_checksum',
    file: 'nbtinsert.c',
    line: '663',
    routine: '_bt_check_unique'
  },
  sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *',
  params: [
    '5d799f1c-a817-4614-8691-0c1807b45063',
    null,
    <Buffer 9e 27 31 39 c3 71 d8 59 25 1e 64 37 a8 28 70 e0 f4 37 d4 e3>,
    '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/c9/3d/c93d5878-704a-4182-9bb2-a94ae5315589.jpg',
    '1000007720',
    '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2',
    2025-07-17T16:24:53.000Z,
    2025-07-17T16:24:56.000Z,
    2025-07-17T16:24:53.000Z,
    'IMAGE',
    false,
    '0',
    'timeline',
    'PXL_20250717_162453097.jpg'
  ]
}

My issue as it turns out was actually an instance of this issue:
https://github.com/immich-app/immich/issues/21897

Following the steps outlined here solved my problem:
https://github.com/immich-app/immich/issues/21897#issuecomment-3298606575

@madslug17 commented on GitHub (Oct 13, 2025): > > [@madslug17](https://github.com/madslug17) Can you track down the remainder asset, is there anything special about it such as large videos or a corrupted file? > > Going through the logs and looking for instances where I have the `PostgresError: duplicate key value violates unique constraint “UQ_assets_owner_checksum”` error logged, I then just got the param field with the image name and sorted it through a `sort | uniq` and I can see 1589 unique images associated with this error. Mostly they are JPEGs and I don’t see anything special about them. I did switch back and forth between the new timeline and the original timeline because it was not backing up on new timeline. Here is a log snippet: > > ``` > Query failed : { > durationMs: 2.4446189999580383, > error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" > at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) > at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) > at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) > at Socket.emit (node:events:518:28) > at addChunk (node:internal/streams/readable:561:12) > at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) > at Readable.push (node:internal/streams/readable:392:5) > at TCP.onStreamRead (node:internal/stream_base_commons:189:23) > at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { > severity_local: 'ERROR', > severity: 'ERROR', > code: '23505', > detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x65b028f2ea150989c86e01b4ee7218150ba77a8e) already exists.', > schema_name: 'public', > table_name: 'asset', > constraint_name: 'UQ_assets_owner_checksum', > file: 'nbtinsert.c', > line: '663', > routine: '_bt_check_unique' > }, > sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', > params: [ > '5d799f1c-a817-4614-8691-0c1807b45063', > null, > <Buffer 65 b0 28 f2 ea 15 09 89 c8 6e 01 b4 ee 72 18 15 0b a7 7a 8e>, > '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/19/55/19559899-e4b5-45c1-b83d-da9173427bd4.jpg', > '1000007722', > '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', > 2025-07-17T16:25:04.000Z, > 2025-07-17T16:25:08.000Z, > 2025-07-17T16:25:04.000Z, > 'IMAGE', > false, > '0', > 'timeline', > 'PXL_20250717_162504755.PORTRAIT.ORIGINAL.jpg' > ] > } > Query failed : { > durationMs: 2.086313009262085, > error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" > at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) > at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) > at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) > at Socket.emit (node:events:518:28) > at addChunk (node:internal/streams/readable:561:12) > at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) > at Readable.push (node:internal/streams/readable:392:5) > at TCP.onStreamRead (node:internal/stream_base_commons:189:23) > at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { > severity_local: 'ERROR', > severity: 'ERROR', > code: '23505', > detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x869d6f38ccb0e4b9c85eb0dca5faaa77e82efe6d) already exists.', > schema_name: 'public', > table_name: 'asset', > constraint_name: 'UQ_assets_owner_checksum', > file: 'nbtinsert.c', > line: '663', > routine: '_bt_check_unique' > }, > sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', > params: [ > '5d799f1c-a817-4614-8691-0c1807b45063', > null, > <Buffer 86 9d 6f 38 cc b0 e4 b9 c8 5e b0 dc a5 fa aa 77 e8 2e fe 6d>, > '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/e2/bf/e2bf23ac-70cb-43c8-8f36-f8bfab383ed3.jpg', > '1000007721', > '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', > 2025-07-17T16:24:56.000Z, > 2025-07-17T16:24:58.000Z, > 2025-07-17T16:24:56.000Z, > 'IMAGE', > false, > '0', > 'timeline', > 'PXL_20250717_162456680.jpg' > ] > } > Query failed : { > durationMs: 2.268465995788574, > error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" > at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) > at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) > at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) > at Socket.emit (node:events:518:28) > at addChunk (node:internal/streams/readable:561:12) > at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) > at Readable.push (node:internal/streams/readable:392:5) > at TCP.onStreamRead (node:internal/stream_base_commons:189:23) > at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { > severity_local: 'ERROR', > severity: 'ERROR', > code: '23505', > detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\xbaba81a5b6067db1992bfdb8b7f1e84f73ffe1ae) already exists.', > schema_name: 'public', > table_name: 'asset', > constraint_name: 'UQ_assets_owner_checksum', > file: 'nbtinsert.c', > line: '663', > routine: '_bt_check_unique' > }, > sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', > params: [ > '5d799f1c-a817-4614-8691-0c1807b45063', > null, > <Buffer ba ba 81 a5 b6 06 7d b1 99 2b fd b8 b7 f1 e8 4f 73 ff e1 ae>, > '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/7e/18/7e184a17-53d4-4732-8ddc-04eff023cf38.mp4', > '1000007727', > '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', > 2025-07-17T18:11:50.000Z, > 2025-07-17T18:11:50.000Z, > 2025-07-17T18:11:50.000Z, > 'VIDEO', > false, > '0', > 'timeline', > 'PXL_20250717_181101305.mp4' > ] > } > Query failed : { > durationMs: 2.8771919906139374, > error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" > at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) > at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) > at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) > at Socket.emit (node:events:518:28) > at addChunk (node:internal/streams/readable:561:12) > at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) > at Readable.push (node:internal/streams/readable:392:5) > at TCP.onStreamRead (node:internal/stream_base_commons:189:23) > at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { > severity_local: 'ERROR', > severity: 'ERROR', > code: '23505', > detail: 'Key ("ownerId", checksum)=(5d799f1c-a817-4614-8691-0c1807b45063, \\x9e273139c371d859251e6437a82870e0f437d4e3) already exists.', > schema_name: 'public', > table_name: 'asset', > constraint_name: 'UQ_assets_owner_checksum', > file: 'nbtinsert.c', > line: '663', > routine: '_bt_check_unique' > }, > sql: 'insert into "asset" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "duration", "visibility", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) returning *', > params: [ > '5d799f1c-a817-4614-8691-0c1807b45063', > null, > <Buffer 9e 27 31 39 c3 71 d8 59 25 1e 64 37 a8 28 70 e0 f4 37 d4 e3>, > '/usr/src/app/upload/upload/5d799f1c-a817-4614-8691-0c1807b45063/c9/3d/c93d5878-704a-4182-9bb2-a94ae5315589.jpg', > '1000007720', > '5f969779a394fb907e24745b84b93881fbe27cff6b58900dca4fa38f5a36d4c2', > 2025-07-17T16:24:53.000Z, > 2025-07-17T16:24:56.000Z, > 2025-07-17T16:24:53.000Z, > 'IMAGE', > false, > '0', > 'timeline', > 'PXL_20250717_162453097.jpg' > ] > } > ``` My issue as it turns out was actually an instance of this issue: https://github.com/immich-app/immich/issues/21897 Following the steps outlined here solved my problem: https://github.com/immich-app/immich/issues/21897#issuecomment-3298606575
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7251