immich
immich copied to clipboard
[BUG] Unable to delete photos on Server when automatic backup is turned on
Describe the bug This is related to #165 Photo will not be deleted when Android app's automatic backup feature is turned on.
Task List
Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.
- [x] I have read thoroughly the README setup and installation instructions.
- [x] I have included my
docker-compose
file. - [x] I have included my redacted
.env
file. - [x] I have included information on my machine, and environment.
To Reproduce Steps to reproduce the behavior: I turned on the automatic backup feature on my android device and upload my Camera folder. In the Immich Android app, I select and delete the photo. The app contacts the server and deletes the selected photo briefly. After just a moment, the automatic backup feature is triggered and the exact same photo gets uploaded to server from my Camera folder. At the end, nothing gets deleted effectively.
Expected behavior There are multiple feature requests in #165. Immich app can provide choices to one of the following feature:
- Act as a local gallery app, synced to cloud all the time. When photo gets deleted in the software, cloud + local copy get deleted all at once together. Keep server/client (local folder) download + upload two way synced.
- Act as a backup app, only upload, one way synced. However, when one uploaded photo gets deleted in the app (meaning the server side), the automatic backup feature will not trigger automatic upload of the once deleted photo. Instead, a wait list of "uploaded but deleted" queue will be shown in the mobile app to have the user choose whether to upload some of the deleted photos.
- Act as a one time upload app, not synced. Uploaded photo will not trigger any further upload unless user manually pick specific photos to be uploaded. Delete on the server and local storage happens separately and will not interfere. (This is Nextcloud auto-upload behavior)
Screenshots If applicable, add screenshots to help explain your problem.
System
- Phone OS Android: 12
- Server Version: 1.29.4
- Mobile App Version: 1.29.1 build.43
Additional context Add any other context about the problem here.
First, when you delete the asset from Immich, do you also choose to delete the asset on your device as well? From the behavior you described, I assumed you chose to only delete the asset on the Immich server.
If the asset is still present on your device, it will be rescanned to be uploaded in the next trigger. If you don't want this to happen, you must delete the photo you don't want to be backup first.
I think this is a expected behavior, because we the app is the backup tool, so if there is any files in the folder/album that isn't backup, it must perform the action of getting the file to the backup server.
When I choose delete, what is shown in the app is:
Delete permanantly
These items will be permanently deleted from immich and your device
But I did not see the photo gets deleted in my device. And the photo gets uploaded to the server briefly after the deletion. Maybe this delete dialog is describing behavior inaccurately?
There are two stages of the deletion process
- Delete from Immich's server
- After deleting from Immich's server, the app will prompt you the native prompt to delete from the device. Since this process requires user's permission, the app cannot do this automatically.
This is similar to how Google Photos perform the deletion process. Can you help me confirm that you see the native prompt after deleting the asset from the database?
I did not see native prompt asking about local deletion. I think that is why I am confused.
Hmm, thank you I will take a look
I cannot reproduce this, can you help me uninstall the app and reinstall it. Then perform the deletion process again?
If possible can you perform the screen capture of the deletion process?
It asks for recycle bin and I selected allow. But my photo is still in the original position.
It asks for recycle bin and I selected allow. But my photo is still in the original position.
Thank you, I will investigate this issue
hello, i have the same problem
Can Immich not store a local list of items that the user has deleted from their Immich server, but not from their device? Then, Immich can show this list of items and not upload it, unless the user tells Immich to upload them again. Kind of like a 'blacklist', with items that should not be uploaded, despite it not being on the server.
Yeah, that's exactly what we've talked about doing actually. Deleting an asset moves it to a blacklist, the mobile app can check if a file needs to be backed-up by calling an updated server endpoint which takes the blacklist into account and returns the right answer for each asset. Then the user can update/manage the blacklist and/or the user can "force upload" a file, which basically removes it from the blacklist as part of the process.
I encountered a similar issue by deleting photos from the web UI / another device. Since those photo were still in the memory of the original device that uploaded them, the automatic sync re-uploaded them.
This forced me to delete the photos from immich from the device that uploaded them.
The expected behavior I would like is for immich to blacklist those images and do not re-upload them. Since the user explicitly deleted them from immich.
Or even better, if a photo is deleted from another device, you get a notification on the device that uploaded it that prompt you to delete the photo from the internal memory of the device. On the line of: "this group of photos were deleted from immich, do you also want to delete them from your device?"
I think I know where is the problem. Problem is that Immich don't update status of photos in app after uploaded to server. When I open app and there is photos to upload on server I see that this photos was uploaded ok but status (cloud icon) never change. Until I close app and open again I can't archive this photo and when I deleted this photo it is appear again after reopen app. But after successful uploaded photo and close app, then open again (status of previous uploaded photos changed to ok) then everything works ok (archive and delete).
This show problem:
I also am having this problem, not getting promoted to delete any local copy. V1.78.1