I
Immich2w ago
n1ete

Upload error: duplicate key value violates unique constraint "UQ_assets_own" on all uploads

I recently downloaded all Pictures from my google Photos account and it seems i cant upload any of them to Immich either via cli on Desktop or web-interface dragndrop via Chromium. I might be plagued by this github issue here: https://github.com/immich-app/immich/issues/15051 but i am not sure about this. I do use the Android App as well but these pictures are not on my phone at all. It does not matter if i pick one image or several or the whole folder. Uploading pictures via the android app seems fine, i did not try to copy the pictures on my phone first and uploading them via the app though. Uploading via ia Webinterface shows always one picture uploaded and i can see an empty thumbnail that is endlessly loading....removing this one completely and emptying the trash completely does not seem to help either. There are some json metadata files in this folder but i assume that's no problem since Immich uploads only compatible file formats and ignores everything else? Immich CLI:
immich upload --recursive --album Clubbing/
Crawling for assets...
Hashing files | ████████████████████████████████████████ | 100% | ETA: 0s | 78/78 assets
Checking for duplicates | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/78 assets
Found 0 new files and 0 duplicates
All assets were already uploaded, nothing to do.
Creating albums | ████████████████████████████████████████ | 100% | ETA: 0s | 0/0 albums
Successfully created 0 new albums
Successfully updated 0 assets
Adding assets to albums | ████████████████████████████████████████ | 100% | ETA: 0s | 0/0 assets
immich upload --recursive --album Clubbing/
Crawling for assets...
Hashing files | ████████████████████████████████████████ | 100% | ETA: 0s | 78/78 assets
Checking for duplicates | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/78 assets
Found 0 new files and 0 duplicates
All assets were already uploaded, nothing to do.
Creating albums | ████████████████████████████████████████ | 100% | ETA: 0s | 0/0 albums
Successfully created 0 new albums
Successfully updated 0 assets
Adding assets to albums | ████████████████████████████████████████ | 100% | ETA: 0s | 0/0 assets
I added the corresponding Immich Docker logs. Environment: Rocky Linux 9 Immich runs in Docker Immich version v1.138.0 I hope i didnt miss any Information. Thanks in Advance for your help and Support.
33 Replies
Immich
Immich2w ago
:wave: Hey @n1ete, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed. [Issue] Upload error: duplicate key value violates unique constraint "UQ_assets_owner_checksum" (immich-app/immich#15051)
Daniel
Daniel2w ago
Unable to send file: RangeNotSatisfiableError
Are you using a (badly configured) reverse proxy? This sounds like something between your uploading client and the server messes with requests
n1ete
n1eteOP2w ago
mmmh i will check thanks my phone access the Immich server trough the same proxy though.....but i will double check i have haproxy with tcp passtrough as a frontend and caddy as a backend running nice from public network...i will try with a vpn or access without proxy to rule that out. Thanks
Daniel
Daniel2w ago
Yeah testing it directly would be a good first troubleshooting step :)
n1ete
n1eteOP2w ago
Same problem if access happens directly through http://immich.my.domain:2283/
Daniel
Daniel2w ago
You get the same RangeNotSatisifableError?
Zeus
Zeus2w ago
It would be better to test with an IP instead of a domain a local IP
n1ete
n1eteOP2w ago
that resolves to my local ip, changed in the hosts file but let me check that aswell
Zeus
Zeus2w ago
do you have any weird network stuff going on? VLANs, high MTU, etc?
n1ete
n1eteOP2w ago
can i somehow upload from local storage easy, to test that?
Zeus
Zeus2w ago
I mean you can just use 127.0.0.1:2283 on the hosting machine
n1ete
n1eteOP2w ago
i am a network engineer so i tend to break things quite often but i have a separate production environment since years using immich cli on the local machine? or can i do it without nodejs...? i prefer not to install nodejs there
Daniel
Daniel2w ago
You should already have the cli available on the Immich container iirc
n1ete
n1eteOP2w ago
just for the record: latest attempts ( tried just with singel images now for less logspam)
Zeus
Zeus2w ago
are you sure you're not just uplaoding duplicates? that's what this looks like
n1ete
n1eteOP2w ago
yes i even created a new picture with a graphic tool
Daniel
Daniel2w ago
Yes the constraint violations I don't care about It were the http errors I found interesting
n1ete
n1eteOP2w ago
if i click on the "goto the image" it does not load
n1ete
n1eteOP2w ago
No description
n1ete
n1eteOP2w ago
uploading/syncing picture with the android client app works....
Daniel
Daniel2w ago
Most likely those assets broke from the network error you posted I'd delete one (make sure you also delete them from the crash) and then upload them again without whatever you had going on in your network earlier
n1ete
n1eteOP2w ago
wait, how can show me the broken assets? thanks btw for your superb support here! this was by far one of the fastest response to an issue ever 😄
Daniel
Daniel2w ago
What you're looking at right now is a high res thumbnail so either it failed generating a thumb because the original file is corrupt, in which case you should see errors in the logs, or the thumbnail simply hasn't been generated yet For (2) you should check the job queue in the admin settings
n1ete
n1eteOP2w ago
could it be that the google takeout service generates broken images somehow?
Daniel
Daniel2w ago
Very unlikely I gave you two things to check, please check those
n1ete
n1eteOP2w ago
i need to continue troubleshooting on this tomorrow for now unfortunatly. but will report back! Thank you again for your help (donation incomming!)
Daniel
Daniel2w ago
That does not impact the support we provide but it's definitely appreciated :)
n1ete
n1eteOP2w ago
I deleted the broken asset permanently in the webgui. uploading of new pictures (without proxies) still fails. Can i check the jobview also from the container?
n1ete
n1eteOP2w ago
I am not sure what exactly fixed it, but for now the same pictures that failed are uploading now flawless, with proxies in between....i used firefox instead of chromium...
Daniel
Daniel2w ago
Those aren't "fails". Those are just assets that could not be added because they already exist for that uesr
n1ete
n1eteOP2w ago
still not understand....if i tried uploading new images never in touch with the server there cant be duplicates of these....the first asset was always shown with a green arrow, but the upload of that asset was always corrupted. after that every other asset failed with a duplicate warning on total new files. I understand now why you guessed that my network environment could have been the culprit for that error but my guess is the root cause for this happening is not local home network related 😉 So i removed/deleted that broken asset and tried again to upload some other pictures, with the same outcome...... today i tried my luck again from a different browser and suddenly the error disapeard but how? these files were uploaded for the first time i validated that yesterday with creating some random png files with draw.io anyways i mark this now as solved since my tries to recreate went unsuccessful... that error simply vanished. I usually prefer to pinpoint what happend 😄
Immich
Immich2w ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?