Closed undaunt closed 4 months ago
I am also experiencing this issue
[Nest] 17 - 06/12/2024, 7:52:41 AM ERROR [Api:AssetMediaService~ajxhyi4p] Error uploading file QueryFailedError: duplicate key value violates unique constraint "UQ_16294b83fa8c0149719a1f631ef"
QueryFailedError: duplicate key value violates unique constraint "UQ_16294b83fa8c0149719a1f631ef"
at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
at async SubjectExecutor.executeInsertOperations (/usr/src/app/node_modules/typeorm/persistence/SubjectExecutor.js:260:42)
at async SubjectExecutor.execute (/usr/src/app/node_modules/typeorm/persistence/SubjectExecutor.js:92:9)
at async EntityPersistExecutor.execute (/usr/src/app/node_modules/typeorm/persistence/EntityPersistExecutor.js:140:21)
at async AssetMediaService.create (/usr/src/app/dist/services/asset-media.service.js:292:23)
at async AssetMediaService.uploadAsset (/usr/src/app/dist/services/asset-media.service.js:131:27)
at async AssetMediaController.uploadAsset (/usr/src/app/dist/controllers/asset-media.controller.js:39:29)
A bit of a back story. Sometimes the app logs out by itself forcing it to resync all assets again and again, but since the last update this error started appearing, It's not very concerning as I know that the assets are already on the server, but if they are there then this's not exactly an error, just something that needs to be skipped next time.
Fixed in #10637
The bug
I previously uploaded my iCloud library via bulk API and have been keeping it updated within Immich via the mobile app. I expand on this use case here (https://github.com/immich-app/immich/discussions/9899) but I'm seeing a lot of errors right now while my external library copy of my content is being scanned into Immich.
I'm wondering if this is because some of the exact same images already exist in the upload library, but since it's a separate library Immich doesn't like the potential hash collisions, but its not auto excluded the same as if I had two of the same photo and the mobile app was scanning for upload? Just throwing out possible ideas, I'm not sure.
The OS that Immich Server is running on
Ubuntu 24.04 LTS
Version of Immich Server
v1.105.1
Version of Immich Mobile App
N/A
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Relevant log output
Additional information
No response