Android app missing large chunks of timeline, with errors

Using the Android app, when loading the timeline, large chunks (multiple years, hundreds of photos) are missing. Smart search in the app is behaving oddly too (sometimes not showing any photos when filtering by person, location, etc). Everything appears perfectly through the web interface without error, even when logging in for the first time with incognito on a browser never before used with Immich. App reinstalled, docker pulled to current release. Primary client app error (appears every time app is opened):
Error while getting remote assets
ApiException 500: {"message":"Failed to get full sync for user","error":"Internal Server Error","statusCode":500,"correlationId":"xnipn0u6"}
Error while getting remote assets
ApiException 500: {"message":"Failed to get full sync for user","error":"Internal Server Error","statusCode":500,"correlationId":"xnipn0u6"}
Server error appearing at the same time as above:
immich_server | [Nest] 17 - 01/01/2025, 8:51:15 PM ERROR [Api:ErrorInterceptor~avrnpzxp] Database error: QueryFailedError: invalid memory alloc request size 18446744073709551613
immich_server | [Nest] 17 - 01/01/2025, 8:51:15 PM ERROR [Api:ErrorInterceptor~avrnpzxp] Database error: QueryFailedError: invalid memory alloc request size 18446744073709551613
Also, while building the timeline, there are a few (<10) client and server errors related to missing thumbnails. I have tried regenerating all thumbnails but this has not resolved the issue. Example server error is below:
immich_server | [Nest] 17 - 01/01/2025, 8:46:55 PM ERROR [Api:GlobalExceptionFilter~gcxj8pbv] Unknown error: Error: ENOENT: no such file or directory, access 'upload/thumbs/f47422cd-dfd5-4d71-8b9b-d42d8db27f05/39/b2/39b287e0-a157-4182-aa1f-5be83667da44-preview.jpeg'
immich_server | Error: ENOENT: no such file or directory, access 'upload/thumbs/f47422cd-dfd5-4d71-8b9b-d42d8db27f05/39/b2/39b287e0-a157-4182-aa1f-5be83667da44-preview.jpeg'
immich_server | at async access (node:internal/fs/promises:605:10)
immich_server | at async sendFile (/usr/src/app/dist/utils/file.js:54:9)
immich_server | at async AssetMediaController.viewAsset (/usr/src/app/dist/controllers/asset-media.controller.js:58:9)
immich_server | [Nest] 17 - 01/01/2025, 8:46:55 PM ERROR [Api:GlobalExceptionFilter~gcxj8pbv] Unknown error: Error: ENOENT: no such file or directory, access 'upload/thumbs/f47422cd-dfd5-4d71-8b9b-d42d8db27f05/39/b2/39b287e0-a157-4182-aa1f-5be83667da44-preview.jpeg'
immich_server | Error: ENOENT: no such file or directory, access 'upload/thumbs/f47422cd-dfd5-4d71-8b9b-d42d8db27f05/39/b2/39b287e0-a157-4182-aa1f-5be83667da44-preview.jpeg'
immich_server | at async access (node:internal/fs/promises:605:10)
immich_server | at async sendFile (/usr/src/app/dist/utils/file.js:54:9)
immich_server | at async AssetMediaController.viewAsset (/usr/src/app/dist/controllers/asset-media.controller.js:58:9)
Thank you so much in advance!!
44 Replies
Immich
Immich4mo ago
:wave: Hey @ZanyHunter, 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 Tran4mo ago
Have you been moving the database or folders around?
ZanyHunter
ZanyHunterOP4mo ago
I have not touched the backend folders since my initial deployment of the service in mid-2024.
ZanyHunter
ZanyHunterOP4mo ago
docker-compose.yml, .env content
Zeus
Zeus4mo ago
I think your database might be corrupted can you post the postgres logs? they might be in DB_DATA_LOCATION
Alex Tran
Alex Tran4mo ago
What is the server version?
ZanyHunter
ZanyHunterOP4mo ago
Logs from last time it was started. I truncated, as the same error and select statement is repeated every time the app is loaded. I'm curious why it is requesting to allocate 2 integers lower than the maximum representable unsigned 64-bit integer (18446744073709551615).
ZanyHunter
ZanyHunterOP4mo ago
Server: 1.123.0 App: 1.123.0 build.172
Zeus
Zeus4mo ago
can you post docker ps -a
Zeus
Zeus4mo ago
I think the database is healthy not sure what is causing that large allocation. perhaps a misformed query of some kind
ZanyHunter
ZanyHunterOP4mo ago
Odd. Glad you suspect the database is healthy. I am waiting on an old iPhone 11 to charge so I can test the iPhone mobile app. Trying to narrow it down.
Alex Tran
Alex Tran4mo ago
how much RAM on this system?
ZanyHunter
ZanyHunterOP4mo ago
Originally 4GB, upped to 8GB yesterday to troubleshoot this issue. 1.75GB currently in use.
Zeus
Zeus4mo ago
tell us more about the host please sounds like a VM?
ZanyHunter
ZanyHunterOP4mo ago
Yes, this is an Ubuntu Server 24.04.1 LTS VM running on an Intel-based TrueNAS Core server. The database volume is local, the library is mapped via NFS. I also have an available Intel-based Proxmox cluster I can migrate to if a more standard virtualization paltform is desired.
Alex Tran
Alex Tran4mo ago
When you open up the app to sync, do you see anty error from the server log?
Zeus
Zeus4mo ago
if it's a true VM (which this is, not LXC) I don't think that would present a factor
Alex Tran
Alex Tran4mo ago
I saw some similar reports but most are from outdated server so this case is strange
ZanyHunter
ZanyHunterOP4mo ago
Server presents this error when the app is opened (copied from OP):
immich_server | [Nest] 17 - 01/01/2025, 8:51:15 PM ERROR [Api:ErrorInterceptor~avrnpzxp] Database error: QueryFailedError: invalid memory alloc request size 18446744073709551613
immich_server | [Nest] 17 - 01/01/2025, 8:51:15 PM ERROR [Api:ErrorInterceptor~avrnpzxp] Database error: QueryFailedError: invalid memory alloc request size 18446744073709551613
App has an associated 500 error log.
Alex Tran
Alex Tran4mo ago
Can you try docker compose down && docker compose pull && docker compose up?
ZanyHunter
ZanyHunterOP4mo ago
I downed, purged, re-pulled, and upped earlier during initial troubleshooting. Just did it again for good measure. I see the same errors when opening the app again.
Alex Tran
Alex Tran4mo ago
Can you try access over local IP?
ZanyHunter
ZanyHunterOP4mo ago
Same error when connected via IP:port. On the Android phone (Pixel 7 Pro running Android 15 public release), Immich was uninstalled and reinstalled from the Play Store, and app storage & cache were cleared. Phone was also rebooted.
Alex Tran
Alex Tran4mo ago
what is the size of the user's library?
ZanyHunter
ZanyHunterOP4mo ago
20,100 in timeline, 691 in trash
Zeus
Zeus4mo ago
what %/number of those are on the mobile device?
ZanyHunter
ZanyHunterOP4mo ago
<2,000 assets
Zeus
Zeus4mo ago
is there any correlation with the missing assets?
ZanyHunter
ZanyHunterOP4mo ago
I'm having a lot of trouble finding a correlation. Of the ones that are appearing, some are local on this phone, some are not, and some photos that I know are local on this phone are missing from the timeline. In the mobile timeline, I have photos from present (today) through December 22, 2024, then nothing until a single photo from October 2022, then nothing until February 2022, etc. When the app was reinstalled, it lost permissions to the local filesystem, so I don't know how local photos would influence what appears on the timeline (correct me if I'm wrong!) Just tested on an old Samsung Galaxy Note 8. Freshly reset OS, fresh install of the Immich app. The same exact sporadic photos on the same dates appear on it as well, with the same error. Will try an iPhone soon. It goes without saying that there are no local photos on this device.
Alex Tran
Alex Tran4mo ago
Hmm I wonder if you can try a different virtualization environment
ZanyHunter
ZanyHunterOP4mo ago
Here's what I did: Installed Ubuntu 24.04.1 in a Proxmox VM apt update, apt upgrade Installed Docker using docs.docker.com's install guide Copied docker-compose.yml, .env, and postgres/ to new VM Mounted library NFS on new VM Started Immich Connected with app via direct IP Same errors, same symptoms. Same random photos missing from the timeline on Android. Web seems completely fine? I'd obviously rather not start from scratch. Do you have any other suggestions before I go nuclear on the database? I would rather not have to rename faces, recreate user accounts, re-share, etc.
ZanyHunter
ZanyHunterOP4mo ago
Ohhh, I got something. I tried scrolling to August 2023 on the web, and got a 500 error. Docker logs were flooded with dozens of variations of this error. Pulling postgres logs now.
ZanyHunter
ZanyHunterOP4mo ago
Here's the related postgres logs
Zeus
Zeus4mo ago
I think your database is toast Was it stored on a LXC mount? Is your database even dumpable? I suspect not
ZanyHunter
ZanyHunterOP4mo ago
Yeah, I suspected that unfortunately. It was not on an LXC mount. I suspect perhaps there was an unclean shutdown at some point or something. What I ended up doing was mounting a snapshot I had of the VM from 2 weeks ago. That was not old enough, so I restored the oldest internal Immich backup from that snapshot. Looks like I'm good to go from that backup! Now I just need to figure out how to remove references to images uploaded and deleted since the restore (lots of "error loading image" on the screen). Let me attempt a dump of the corrupted database and see what it does just for posterity.
Zeus
Zeus4mo ago
You can use the unlisted /admin/repair page to find the untracked files Is your postgres container healthy? Im surprised a hard shutdown would kill it but odds are proxmox didnt properly flush a write or theres a storage device issue
ZanyHunter
ZanyHunterOP4mo ago
I have 2 VMs running, one is restored from the past, one is current and corrupted. On the corrupted one, it's still healthy even after dying when trying to load August 2023. My VMs run on a raidz1 zpool, and I don't seen any pool inconsistencies or errors. Might never know what happened. Here's the result of trying to dump the DB. Same error!
Zeus
Zeus4mo ago
An edge case, very hard to research. GPT seems to think that the handling of sync writes on LXC is not as reliable vs a VM So if ZFS didnt issue back a sync but postgres was told it was, that can cause an issue.
ZanyHunter
ZanyHunterOP4mo ago
Definitely. Makes sense. I'm effectively back up and running. Just waiting on the Repair page. Massive thank you! If I can return the favor or buy you and @Alex a coffee, let me know.
Zeus
Zeus4mo ago
No worries. You can get a license when able!
ZanyHunter
ZanyHunterOP4mo ago
Absolutely! Will do.
Immich
Immich4mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?