[beta] Upload Tons of red files / dupes #6221

Closed
opened 2026-02-20 04:09:43 -05:00 by deekerman · 9 comments
Owner

Originally created by @jkoopmann on GitHub (Aug 1, 2025).

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

  • Yes

The bug

I switched to the beta timeline. Upload worked for all new images but it tries to reupload > 7000 images that are already on the server.

The details show the file in red. No error message.

It is behind a reverse proxy but upload size is not a problem. It happens in small heic and jpg files while new 300 MB files sync flawlessly.

The OS that Immich Server is running on

Unraid

Version of Immich Server

1.137.1

Version of Immich Mobile App

1.137.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

On the move so no easy access to it.

Your .env content

In the move so no easy access.

Reproduction steps

...

Relevant log output


Additional information

No response

Originally created by @jkoopmann on GitHub (Aug 1, 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 switched to the beta timeline. Upload worked for all new images but it tries to reupload > 7000 images that are already on the server. The details show the file in red. No error message. It is behind a reverse proxy but upload size is not a problem. It happens in small heic and jpg files while new 300 MB files sync flawlessly. ### The OS that Immich Server is running on Unraid ### Version of Immich Server 1.137.1 ### Version of Immich Mobile App 1.137.0 ### Platform with the issue - [ ] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML On the move so no easy access to it. ``` ### Your .env content ```Shell In the move so no easy access. ``` ### Reproduction steps 1. 2. 3. ... ### Relevant log output ```shell ``` ### Additional information _No response_
deekerman 2026-02-20 04:09:43 -05:00
Author
Owner

@jkoopmann commented on GitHub (Aug 1, 2025):

Error getting file for asset 3C3BC560-E7A0-490A-87AD-651271F4C931/L0/001

PlatformException(PHPhotosErrorDomain (-1), Der Vorgang konnte nicht abgeschlossen werden. (PHPhotosErrorDomain-Fehler -1.), No failure reason provided, null)

#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:370)

#2 AssetEntity._getFile (package:photo_manager/src/types/entity.dart:765)

#3 StorageRepository.getFileForAsset (package:immich_mobile/infrastructure/repositories/storage.repository.dart:16)

#4 UploadService._getUploadTask (package:immich_mobile/services/upload.service.dart:242)

#5 UploadService.startBackup (package:immich_mobile/services/upload.service.dart:144)

#6 DriftBackupNotifier.handleBackupResume (package:immich_mobile/providers/backup/drift_backup.provider.dart:343)

#7 AppLifeCycleNotifier.handleAppResume. (package:immich_mobile/providers/app_life_cycle.provider.dart:106)

#8 AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:88)

Tons of these in the app log.

@jkoopmann commented on GitHub (Aug 1, 2025): Error getting file for asset 3C3BC560-E7A0-490A-87AD-651271F4C931/L0/001 PlatformException(PHPhotosErrorDomain (-1), Der Vorgang konnte nicht abgeschlossen werden. (PHPhotosErrorDomain-Fehler -1.), No failure reason provided, null) #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:370) <asynchronous suspension> #2 AssetEntity._getFile (package:photo_manager/src/types/entity.dart:765) <asynchronous suspension> #3 StorageRepository.getFileForAsset (package:immich_mobile/infrastructure/repositories/storage.repository.dart:16) <asynchronous suspension> #4 UploadService._getUploadTask (package:immich_mobile/services/upload.service.dart:242) <asynchronous suspension> #5 UploadService.startBackup (package:immich_mobile/services/upload.service.dart:144) <asynchronous suspension> #6 DriftBackupNotifier.handleBackupResume (package:immich_mobile/providers/backup/drift_backup.provider.dart:343) <asynchronous suspension> #7 AppLifeCycleNotifier.handleAppResume.<anonymous closure> (package:immich_mobile/providers/app_life_cycle.provider.dart:106) <asynchronous suspension> #8 AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:88) <asynchronous suspension> Tons of these in the app log.
Author
Owner

@jkoopmann commented on GitHub (Aug 1, 2025):

On the server I get duplicate errors (as expected):

Query failed : {
durationMs: 5.253503002226353,
error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
at ErrorResponse (/app/immich/server/node_modules/postgres/cjs/src/connection.js:794:26)
at handle (/app/immich/server/node_modules/postgres/cjs/src/connection.js:480:6)
at Socket.data (/app/immich/server/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)=(11f17f72-8e1d-46b3-b1cc-a9d71c5a6ccc, \x0d556d405dfaa471c5ce0f6091316374a36965c3) 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: [
'11f17f72-8e1d-46b3-b1cc-a9d71c5a6ccc',
null,
<Buffer 0d 55 6d 40 5d fa a4 71 c5 ce 0f 60 91 31 63 74 a3 69 65 c3>,
'/photos/upload/11f17f72-8e1d-46b3-b1cc-a9d71c5a6ccc/4c/1e/4c1ea36b-4df4-426d-b847-5b58d33d69df.HEIC',
'C18A2543-B8A2-42ED-97B5-8E8A376093F5/L0/001',
'0f38820daf328d269ba07c16f746709f8b66f93405c0a118fe8dda82fe99759d',
2025-08-01T12:25:55.843Z,
2025-08-01T12:25:55.789Z,
2025-08-01T12:25:55.843Z,
'IMAGE',
false,
'0',
'timeline',
'IMG_6063.HEIC'
]
}

But why is it trying to upload the file in the first place if it is a dupe?

@jkoopmann commented on GitHub (Aug 1, 2025): On the server I get duplicate errors (as expected): Query failed : { durationMs: 5.253503002226353, error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" at ErrorResponse (/app/immich/server/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/app/immich/server/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/app/immich/server/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)=(11f17f72-8e1d-46b3-b1cc-a9d71c5a6ccc, \\x0d556d405dfaa471c5ce0f6091316374a36965c3) 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: [ '11f17f72-8e1d-46b3-b1cc-a9d71c5a6ccc', null, <Buffer 0d 55 6d 40 5d fa a4 71 c5 ce 0f 60 91 31 63 74 a3 69 65 c3>, '/photos/upload/11f17f72-8e1d-46b3-b1cc-a9d71c5a6ccc/4c/1e/4c1ea36b-4df4-426d-b847-5b58d33d69df.HEIC', 'C18A2543-B8A2-42ED-97B5-8E8A376093F5/L0/001', '0f38820daf328d269ba07c16f746709f8b66f93405c0a118fe8dda82fe99759d', 2025-08-01T12:25:55.843Z, 2025-08-01T12:25:55.789Z, 2025-08-01T12:25:55.843Z, 'IMAGE', false, '0', 'timeline', 'IMG_6063.HEIC' ] } But why is it trying to upload the file in the first place if it is a dupe?
Author
Owner

@jkoopmann commented on GitHub (Aug 1, 2025):

... and it looks as if the mobile app tries to upload (and fail due to duplicates) many files over and over again to make things worse....

@jkoopmann commented on GitHub (Aug 1, 2025): ... and it looks as if the mobile app tries to upload (and fail due to duplicates) many files over and over again to make things worse....
Author
Owner

@jkoopmann commented on GitHub (Aug 1, 2025):

Might be related to or similar to #20254

@jkoopmann commented on GitHub (Aug 1, 2025): Might be related to or similar to #20254
Author
Owner

@moyer commented on GitHub (Aug 1, 2025):

I am seeing this as well on iOS.

@moyer commented on GitHub (Aug 1, 2025): I am seeing this as well on iOS.
Author
Owner

@spindev commented on GitHub (Aug 3, 2025):

Same here. Worked pretty well on v1.136.0. It doesn’t work for me in normal mode as well. A lot of duplicates and missing pictures using another device. Some pictures have changed / wrong meta information. The picture was taken in 2019 and shows up as 2024.

Edit: changed back to server v1.136.0 but the issue remains. Seems to be a bug in the iOS app.

@spindev commented on GitHub (Aug 3, 2025): Same here. Worked pretty well on v1.136.0. It doesn’t work for me in normal mode as well. A lot of duplicates and missing pictures using another device. Some pictures have changed / wrong meta information. The picture was taken in 2019 and shows up as 2024. Edit: changed back to server v1.136.0 but the issue remains. Seems to be a bug in the iOS app.
Author
Owner

@dvmbro commented on GitHub (Aug 5, 2025):

Same as https://github.com/immich-app/immich/issues/20331

@dvmbro commented on GitHub (Aug 5, 2025): Same as https://github.com/immich-app/immich/issues/20331
Author
Owner

@moyer commented on GitHub (Aug 16, 2025):

Still seeing this on 1.138.0

Image
@moyer commented on GitHub (Aug 16, 2025): Still seeing this on 1.138.0 <img width="1559" height="2929" alt="Image" src="https://github.com/user-attachments/assets/8e09bc01-7574-4090-807c-ca35dd738ed3" />
Author
Owner

@alextran1502 commented on GitHub (Feb 12, 2026):

Should be fixed in the latest release

@alextran1502 commented on GitHub (Feb 12, 2026): Should be fixed in the latest release
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#6221
No description provided.