Comments (9)
I checked as well, it's definitely not a hash collision.
from immich.
Copying over immich data was the issue: we need to keep a mapping between asset ID and its file hash (otherwise we'd need to calculate all hashes on app start again and again). This mapping is wrong when moving the data to a new phone or when restoring a backup. We have this as an open issue somewhere.... To detect this case and ask the user to delete app data.
from immich.
I think this is one of them #4939
from immich.
@fyfrey I'm having a look at the app's hashing code and there's a fair bit of array index juggling. Nothing stands out to me immediately, but how likely do you think it is that there's some edge case where indexes get misaligned or such?
@miahi can you pull the complete logs from the app? I'm particularly interested to see what got logged at the time it calculated all the hashes.
from immich.
The logs might be a bit "dirty" as I was trying a lot of things today as I was trying to understand what is happening with #6196 (two of the photos missing there are found as duplicates in the logs).
I tried uploading the two files on a different account directly to the web app and both were accepted. I can do other tests if needed.
from immich.
I'll need to check. An edge case bug is certainly possible. We can also just check if these files happen to produce a hash collision for sha1 (unlikely, but we should rule this out first)
from immich.
@bo0tzz I checked the code as I thought maybe it's a custom hash implementation but it's just SHA1, fat chance of random collisions there. The SHA1 hash of the old file is correct (GNrECa7lbm6smQHTdW5Rbf99NNU= in base64), but then the second one should be JpWUN7FvqDoak41elMrIc7wsH64= but it's somehow mixed with the first one in the app.
What I also did today (a lot) was to remove and re-add libraries into the app to try to find a pattern for #6196 - that might also be related somehow to indexing, as it seems that the app is not showing photos from one library when it is showing photos from another. I have 3 libraries on the phone with > 6000 photos each. Sometimes I added multiple libraries at the same time. But #6196 seems to be deterministic, the same photos were missing from the app every time I added the libraries. So it might be that the same bug that assigns the wrong hash to some of the photos is causing the missing photos too (maybe overwriting other data?).
from immich.
I can think of one scenario causing issues:
Did you restore your entire phone, your photos, or the immich app from a Google cloud backup etc.?
from immich.
You are right. I changed my phone a while back and used a migration app to move the data (via cable connection). It moved the photos and I think also the immich local storage. That was around 1st of March 2024. I remember that I had to do a login and resync at that point, but I don't think the local DB was cleaned.
I cleared the app data and I'm doing a new sync now. There were ~500 images in that Camera album that were not synced before and they were synced after the cleanup. Not all of them were reported as duplicates, but all of them were shot on the new phone.
from immich.
Related Issues (20)
- iOS app: broken sync - local assets are not being displayed in the main timeline HOT 2
- after removing a user, cannot creating it again HOT 2
- [Bug] Date of birth in set incorrectly
- backup "remainder" calculation is wrong HOT 1
- SHIFT + D does not work when selecting multiple items HOT 2
- Incorrect redis server naming in example docker-compose triggers Redis NOAUTH error HOT 4
- Immich Unresponsive After Initial Boot HOT 12
- Partner stacks aren't stacked (Android)
- Docker Compose, new setup: immich_server exited with code 0 HOT 2
- Incorrect title for button in slideshow
- Redis server is disconnecting, Immich-server restarts every 2 minutes
- TLS Client certificate Server is not reachable HOT 15
- Some videos are rotated 180° (upside down) in the Android app HOT 1
- Updating from v106.4 breaks the immich-server and microservices
- App selection when public user uploads only shows media picker and camera
- The latitude and longitude are not being applied when editing a photo in the Immich Android app.
- Immich App - Video playback error when using TLS Client certificates (Android) HOT 4
- High CPU usage with repeating error
- bug(mobile): delete from device doesn't work properly
- Can't delete user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immich.