-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS mobile app - some don't upload to immich server #9129
Comments
Sorry, I did search for duplicates, I hope this isn't one. |
Can you share screen capture of the backup page when you try to backup them as well as the mobile app log right after? |
Yes. Something is wrong with iOS version (1.103.0 build 155). Upload is very slow or not start at all. After restart the photos are uploaded on server but cloud icons on photos show there is copy only on server (it is not true). When I disable autoupdate all icons changed to succesfull uploaded. Manual upload show success and photos are on server but in app there is still options to upload. |
Logs from mobile app
|
It should have said "14 assets" on the immich app screen shot, but it says only 12 because it skipped 2. The 2 it skipped (which were not uploaded to immich server) appear to be related to these errors from the logs (but I'm totally guessing here):
|
The logs attached here were from when I reproduced the issue using the latest versions of app (1.103.0 build.155) and server (1.103.1) |
So the two screenshots get sent to you by your friend after your friend edited the screenshot. Is that the correct way to reproduce it? |
Well, @alextran1502, I attempted to reproduce it that way (using my son's iphone to take a live photo, edit it, then send it to my iphone) and I was unable to reproduce it that way. I have only been able to reproduce it by deleting the uploaded files from immich server and attempting to re-backup. The two original live photos I received from my friend are still reproducing the issue, and I am willing to upload them somewhere if you want to try that approach. |
@eddified that works, I can get it on my phone to try |
Or if there is a debug version of the app that I can install that will output more logs to show the exact error -- I am willing to do something like this. |
Do you have a recommended way to transfer the files from my phone to you? Honestly, I don't know how to make sure I get the "originals" completely unmodified -- iOS likes to touch files and auto-convert them and such.... |
@eddified if you can use AirDrop to your laptop (assuming you have a Mac 😅) I think it will preserve the file that way |
@alextran1502 These are "live photos", so they are an image with a short video. I can't guarantee this information is 100% accurate, but it matches up with what I've seen:
https://www.reddit.com/r/ios/comments/qvnz8i/best_way_to_move_photos_from_ios_to_windows/ So, trying to export these to you may lose whatever it is that is causing the issue. Ie, without special instructions, I can just do my best. First, note that using AirDrop to the mac loses the video portion (I tried it). So, I will try something else: on iOS in the "Photos" app, I found an "export unmodified originals" option. I will use this option to send the files. |
Good luck getting these into iOS as "live photos" with the same name (They do not have the same name in the attached Archive -- also, unsure of whether they need to be the same name to reproduce the issue). 🤷 |
i am experiencing this bug too. not just with live photos, some other pictures too. looking at the postgres logs it says this:
it looks like it's because of broken uploads. is there a way to force it? or at least remove whichever entries from postgres? edit: tried to manually remove the entry from postgres and then re-add the picture. the first time postgres shows no issue (because there was no entry), and of course trying to add it again gives that error. either way, the image isn't really added. it seems like something is stuck in between. |
microservices log shows that the upload fails because of this:
|
I also noticed a duplicate key error in the Postgres logs, but I’m not certain it appeared because of the same issue. I will try it again and see if the error corresponds with the failed upload |
I created a brand new immich server installation to test this issue a different way. And I was unable to reproduce the issue: all assets uploaded just fine to the empty server. I will revert to the original installation (the one that has tens of thousands of photos at /mnt/media/pictures, ie, the one where I can reproduce the issue) and see if I can test it further -- ie, to see what I can see. |
OK, so, I duplicated the issue on the immich install that I used originally. This time, when I duplicated the issue, I paid attention to the server logs when I did it. Apparently there are duplicate key errors. Using the error message, I looked up the offending records in Postgres. The offending records are not visible, and not deleted. Also, My best guess so far is that there was an error the first time these items were uploaded, and as a result left dangling cruft in the database.
|
is there a way to figure out which entries need to be deleted from the db then? removing the one from "assets" isn't enough |
It seems these records are invalid? (I can't delete them in the UI because they're not visible. The files are actually deleted, but the db says they're NOT offline. The db records say duration is 0.0, but I know the original files are valid and not empty, so they actually have a duration.) Perhaps originally my docker permissions were not set correctly, so it might be that at the time these records were created, the ffmpeg microservice wasn't working properly -- could that could explain the 0 duration? Is there a way to make the server more robust? It might be impossible to know what exactly went wrong in this case, but ideally one or more of the following could be implemented (if not already implemented):
|
There is a decent chance that this issue has been resolved, as we've fixed the way uploads work, especially around live photos. Can you retest this and let me know the results? |
A friend of mine is actually experiencing the same issue on my server. He uploaded all photos from one album that he selected in the app but due to my incorrect storage setup, I had to delete all of the files from immich and asked him to reupload it again. The first upload was without any issue. All photos were uploaded. However after the reupload, there are 6 videos that can't be uploaded for some reason. Immich_log_2024-10-24T22_45_09.025610.log Server log in docker doesn't show anything except that the connection was established |
@NightMean , in my case I believe that the issue was related to file system permissions: the original upload did not complete due to inability to write to the file system. But, it did leave an entry in the database. Then, when I attempted to upload the same files again later, the entries in the db caused immich server believe that the files had already been properly uploaded. I imagine (that is, I'm guessing) the order of operations made by immich server is something like this:
When (2) fails, the db record that was created in step (1) should be removed, but it is not properly being removed. This is my best guess as to what is going on. (This is why I have suggested making the error handling more robust in my previous comment on this issue.) In my case, I fixed the issue by doing the following:
|
I have enabled Verbose logging but I'm not able to see any mention about it when friend is doing the upload. |
@NightMean , I apologize, I misspoke. The "duplicate key constraint violation" logs were emitted from the postgres container, not the immich server container. Example (copied from my above comment made on May 6):
|
@eddified were you able to see this right after the photo was uploaded or did you find that in the old logs? |
@NightMean that message shows up not the first time, but all subsequent times when the upload occurs. |
Thanks for the heads up. As I don't see anything in logs when the upload starts, I suspect the culprit is the file size as it is above 100MB and I'm running it via cloudflare tunnel. Strange that it worked in the first upload. |
The bug
I am not 100% sure why, but some of my photos won't upload to Immich server. It seems it might be related to files that have the same name.
Normally, files on the iPhone don't have the same name. But, if a friend edits a live photo they took (clicking "auto" in the photo edit flow seems to do it) and then shares the photo via messages to your iPhone, and then on your own phone, you click the download icon next to the image in Messages, it will often end up in your photo roll with the name "FullSizeRender", with no number on the end. If the friend does this a few times, you will have lots of files with duplicate name "FullSizeRender".
Other settings:
I have "storage template" enabled, "{{y}}/{{y}}-{{MM}}/{{y}}-{{MM}}-{{dd}}/{{filename}}". On my phone, I did not backup the main photo roll. I only backed up one album with 14 items. I also verified that the two photos that won't upload are not duplicates on the server nor in the album. Monument 2 (with which I backup the entire Camera roll) was able to upload these photos without issue.
iOS Immich App v1.102.2
Immich server v1.102.3
The OS that Immich Server is running on
Ubuntu 22.04.4
Version of Immich Server
v1.102.3
Version of Immich Mobile App
v1.102.2
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: