Have to re-hash all assets on iOS after app upgrade

Hi, I have about 84k assets (with iCloud Photos enabled) on my iPhone. I had previously completed hashing all my assets, but after upgrading my server from v2.2.3 to v2.3.1 and app from v2.2.3 to v2.3.0, the app indicates that only 4k assets are backed up. I now have to re-hash the remaining 80k assets. Any tips to prevent this issue? Thanks! My immich is deployed via Helm chart
env:
TZ: "GMT"
REDIS_HOSTNAME: "redis-master.redis.svc.cluster.local"
REDIS_PASSWORD: "${REDIS_PASSWORD}"
DB_HOSTNAME: "postgresql-cluster-rw.postgres.svc.cluster.local"
DB_USERNAME: "postgres"
DB_DATABASE_NAME: "immich"
# -- You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance
DB_PASSWORD: "${POSTGRESQL_PASSWORD}"
IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}'
server:
ingress:
main:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" # Disable Cloudflare proxying for performance
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "0" # Unlimited body size
hosts:
- host: immich.{BASE_FQDN}
paths:
- path: "/"
tls:
- secretName: immich-tls
hosts:
- immich.{BASE_FQDN}
env:
TZ: "GMT"
REDIS_HOSTNAME: "redis-master.redis.svc.cluster.local"
REDIS_PASSWORD: "${REDIS_PASSWORD}"
DB_HOSTNAME: "postgresql-cluster-rw.postgres.svc.cluster.local"
DB_USERNAME: "postgres"
DB_DATABASE_NAME: "immich"
# -- You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance
DB_PASSWORD: "${POSTGRESQL_PASSWORD}"
IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}'
server:
ingress:
main:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" # Disable Cloudflare proxying for performance
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "0" # Unlimited body size
hosts:
- host: immich.{BASE_FQDN}
paths:
- path: "/"
tls:
- secretName: immich-tls
hosts:
- immich.{BASE_FQDN}
I've checked the app log and server log, but there is no obvious error log
25 Replies
Immich
Immich2d ago
:wave: Hey @瀚瀚不可愛, 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. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: 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.
Alex Tran
Alex Tran2d ago
Can you help take a screenshot of App Settings > Sync Status? Cc @shenlong-tanwen
shenlong-tanwen
Yes, this. Can you share a screenshot of that page? We truncate the remote tables but not the local tables with hash
瀚瀚不可愛
瀚瀚不可愛OP2d ago
Sure! Here is the screenshot on sync status page and also backup page, and I'm quite sure I've hashed all the assets before, I even backed them up yesterday.
No description
No description
Alex Tran
Alex Tran2d ago
🧐
瀚瀚不可愛
瀚瀚不可愛OP2d ago
Here is the app log if this can help, I think the issue I'm running into is somewhat similar to what's described in this post: https://github.com/immich-app/immich/issues/22248, though I haven't encountered the problem of uploads getting stuck yet.
Immich
Immich2d ago
[Issue] Hashes lost, stuck at 17k assets to reupload (immich-app/immich#22248)
Alex Tran
Alex Tran2d ago
Something might have gone wrong or a bug that we haven’t discovered yet. So sorry about this
瀚瀚不可愛
瀚瀚不可愛OP2d ago
NVM! Interestingly, I exported the SQLite database using the Export Database button in the sync status page, and I can see all the data for local_asset_entity is still present.
z Downloads
sqlite3 immich_export_1763623350777.sqlite
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> .tables
asset_face_entity remote_album_entity
auth_user_entity remote_album_user_entity
local_album_asset_entity remote_asset_entity
local_album_entity remote_exif_entity
local_asset_entity stack_entity
memory_asset_entity store_entity
memory_entity trashed_local_asset_entity
partner_entity user_entity
person_entity user_metadata_entity
remote_album_asset_entity
sqlite> SELECT COUNT(*) FROM local_asset_entity;
86269
sqlite> SELECT * FROM local_asset_entity LIMIT 1;
4808B15E-31AA-4D52-B70B-71FFAF1D6E0C.JPG|1|2017-09-23T07:26:41.000Z|2017-09-23T07:26:41.000Z|3264|2448|0|000045E2-30E3-482C-9E31-6B15CBD88A35/L0/001|bxAb5LTokrP02eaKnF3wvIweKok=|0|0
sqlite>
z Downloads
sqlite3 immich_export_1763623350777.sqlite
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> .tables
asset_face_entity remote_album_entity
auth_user_entity remote_album_user_entity
local_album_asset_entity remote_asset_entity
local_album_entity remote_exif_entity
local_asset_entity stack_entity
memory_asset_entity store_entity
memory_entity trashed_local_asset_entity
partner_entity user_entity
person_entity user_metadata_entity
remote_album_asset_entity
sqlite> SELECT COUNT(*) FROM local_asset_entity;
86269
sqlite> SELECT * FROM local_asset_entity LIMIT 1;
4808B15E-31AA-4D52-B70B-71FFAF1D6E0C.JPG|1|2017-09-23T07:26:41.000Z|2017-09-23T07:26:41.000Z|3264|2448|0|000045E2-30E3-482C-9E31-6B15CBD88A35/L0/001|bxAb5LTokrP02eaKnF3wvIweKok=|0|0
sqlite>
I'm not sure why the Immich app showed only 4,373 assets have been hashed.
Alex Tran
Alex Tran2d ago
Can you help query how many doesn't have the hash information?
shenlong-tanwen
@瀚瀚不可愛 SELECT * FROM local_asset_entity WHERE checksum IS NULL
goalie2002
goalie20022d ago
Just want to add that this happened to me too after updating. Interestingly it doesn’t seem to have happened on first launch after updating; maybe second or third. Would my mobile logs be of any extra help?
shenlong-tanwen
Yes please
Alex Tran
Alex Tran2d ago
My hunch is that the known problem with stale cache key in the store cause the app to run other migration paths that are left in the code
瀚瀚不可愛
瀚瀚不可愛OP2d ago
sqlite> SELECT COUNT(*) FROM local_asset_entity WHERE checksum IS NULL;
81896
sqlite> SELECT COUNT(*) FROM local_asset_entity WHERE checksum IS NULL;
81896
Hmmm.. It seems that their checksum disappear 🙁
shenlong-tanwen
If that's the case, then the stale value would've caused issues already, irrespective of the update as the migration is executed on each app launch :monkaHmm:
Alex Tran
Alex Tran2d ago
I remember seeing some weird logic execution in that function You should have them printed out and test different variation Upgrading from previous version, from the same version, etc. Scenario with existing migration version or not having migration version
goalie2002
goalie20022d ago
the "hashing took - 40738ms" is where it happened (all my files are local so hashing everything doesn't take super long). start of log should be first boot after updating.
Alex Tran
Alex Tran2d ago
pay attention to this call specifically
// This means that the SQLite DB is just created and has no version
if (version < 14 || !hasVersion) {
await migrateStoreToSqlite(db, drift);
await Store.populateCache();
}
// This means that the SQLite DB is just created and has no version
if (version < 14 || !hasVersion) {
await migrateStoreToSqlite(db, drift);
await Store.populateCache();
}
migrateStoreToSqlite method will remove all exisitng hash
AgentXZOE
AgentXZOE2d ago
It was on my second launch, too. After updating through the iOS app store, the first launch had everything (seemingly) synced up perfect. Second launch started completely reuploading all photos/etc. **rehashing - I’ve been told they won’t be reuploaded.
shenlong-tanwen
shenlong-tanwen23h ago
Does the hash keep resetting for any of you facing the issue?
AgentXZOE
AgentXZOE23h ago
Just force-closed and re-opened on my iPhone - my assets seem stable so far.
shenlong-tanwen
shenlong-tanwen23h ago
Thanks for the update
AgentXZOE
AgentXZOE23h ago
Happy to help
goalie2002
goalie200221h ago
Haven’t seen it reset on my end either

Did you find this page helpful?