-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BUG] App re-uploads everything after reinstall #1517
Comments
The device id is indicated by how the app is installed. So by switching from fdroid to apk, it would have a different devive id, lead to the server treat this as a new device and thus the reason it would reupload everything. |
Ah, I see. |
Oh wow this is exactly the issue we were just discussing on Discord. I solved this pretty easily by updating the assets in the database to be linked to your new Here's how I did it: connect to the database with docker compose exec -it database psql -U postgres -d immich Get the new and old SELECT "deviceId", "createdAt" FROM device_info;
The UPDATE assets SET "deviceId" = 'newId' WHERE "deviceId" = 'oldId'; Pay attention to single and double quotes as these matter in postgres. Replace You can then exit the database shell with I had to force close the app on my phone and reopen it but that fixed my issue. You may need to delete local storage on your phone and log back in if that doesn't work. But after doing this, all the existing assets on my phone were correctly identified with the assets already uploaded on the server. |
fyi if you're rooted, you can run corepatch and update from either source and have it ignore signature checks. |
Closing as this is the current expecting behavior when switching installation method |
@alextran1502 I think, this should be fixed nevertheless... @mike-lloyd03 thanks for the workaround! It stopped uploading the old assets, but now the remainder counter is negative... |
@dorianim this is not the problem with the app I would argue, it is how the id is generated. So I would either stick with one the PlayStore, FDroid or apk installation method and not switching between those |
don't you think, that switching of the apps source is a scenario that should be supported? I have the same problem in the CLI since I switched from username and password to api tokens. |
@dorianim That is the plan to eventually move away from checking device id. So we will focus on doing that instead of working out a solution for this scenario |
Yes, that would be great! Is there an issue to keep track of that? |
@dorianim clearing the app's local storage and logging back in should fix the negative counter issue. I had the same problem. |
I was having some trouble figuring out which device had which photos, here are some diagnostic postgres commands to run to figure out which deviceId is which by looking at the number of assets. You can figure out You can figure out the set of Then you can look at the count of assets per device ID: Hopefully that helps you identify which device is which. |
Can't find |
Is this behaviour is still expected? I got another ROM for my Android device and Immich showing assets like uploaded in feed, but in backup page it still wants to upload them all. If it uploads them, in app it marks them as Duplicated Assets, and after CLEAR it wants to upload them all again... Perhaps I can change |
@DX37 still the same owner right? Just different device |
Well, theoretically speaking, yes - different device (another ROM, installed crDroid instead of Pixel Experience), but still same email and password. |
Just like in this comment, but on Android #1553 (comment) |
@DX37 So you can change the deviceId, not the ownerId |
Oh, right, I mistyped. I meant Well I changed them all. App shows a little amount of uploaded images now, around 10%, but still requests to upload. These 1475 assets was ALL uploaded before factory reset and firmware change. |
Hm... This what happens when asset wants to upload anyway
I tried to "upload" all remaining assets, and in the end it was 124 total, 124 uploaded, 0 remaining and 1351 Duplicated Assets, which after CLEAR reverted to numbers in my previous message. |
Describe the bug
I just had to reinstall the immich app, because I switched from the f-droid version to the apk from the GitHub release.
When I logged in again, all photos and videos are being re-uploaded. The App thinks, they are all new.
The number of
Total
assets also changes after a while and becomes incorrect. TheBackup
-counter is correct, though.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Immich should detect that the photos already exist and shouldn't try to upload them.
Screenshots
System
12
1.44.0
1.44.0
Additional context
Add any other context about the problem here.
docker-compose.yml
.env
The text was updated successfully, but these errors were encountered: