Mobile app can't sync album that is currently being appended to. #4929

Closed
opened 2026-02-05 10:59:55 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @shkiss on GitHub (Dec 13, 2024).

The bug

Using to mobile app, it fails to sync album details while assets are currently being upload to the server.

The log gives a message from SyncService:

Failed to add album from server: assetCount 34299 != asset array length 34298 for album <album name>

Is this a timing/consistency issue that is easily fixable, or a fundamentally difficult problem?

The OS that Immich Server is running on

Ubuntu 24.04

Version of Immich Server

v1.122.2

Version of Immich Mobile App

v1.122.2 build.170

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Default

Your .env content

Default

Reproduction steps

  1. On server, start a large upload to a new album.
  2. On mobile, try to view the new album (refresh album view). It does not appear.
  3. Inspect logs (mobile).

Relevant log output

Failed to add album from server: assetCount 34299 != asset array length 34298 for album <album name>

Additional information

No response

Originally created by @shkiss on GitHub (Dec 13, 2024). ### The bug Using to mobile app, it fails to sync album details while assets are currently being upload to the server. The log gives a message from `SyncService`: Failed to add album from server: assetCount 34299 != asset array length 34298 for album <album name> Is this a timing/consistency issue that is easily fixable, or a fundamentally difficult problem? ### The OS that Immich Server is running on Ubuntu 24.04 ### Version of Immich Server v1.122.2 ### Version of Immich Mobile App v1.122.2 build.170 ### Platform with the issue - [X] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML Default ``` ### Your .env content ```Shell Default ``` ### Reproduction steps 1. On server, start a large upload to a new album. 2. On mobile, try to view the new album (refresh album view). It does not appear. 3. Inspect logs (mobile). ### Relevant log output ```shell Failed to add album from server: assetCount 34299 != asset array length 34298 for album <album name> ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Dec 13, 2024):

Can you attach the full log, please?

@alextran1502 commented on GitHub (Dec 13, 2024): Can you attach the full log, please?
Author
Owner

@shkiss commented on GitHub (Dec 17, 2024):

Sorry but no. I didn't save it, and after the upload is complete, the album loads successfully.

There were no other relevant log entries though.

@shkiss commented on GitHub (Dec 17, 2024): Sorry but no. I didn't save it, and after the upload is complete, the album loads successfully. There were no other relevant log entries though.
Author
Owner

@d-a-s commented on GitHub (Jan 24, 2025):

I'm having a problem with this, but not just while appending. I have several albums that won't show up in the app since upgrading. I upgraded from 1.111 to 1.125. Before upgrade all ablums were visible, after upgrade the albums are not visible in the app but are in the web interface. Android log:

2025-01-24 10:12:18.186689 | WARNING  | SyncService          | Failed to add album from server: assetCount 326 != asset array length 0 for album Christus Vincit |
2025-01-24 10:12:18.068061 | WARNING  | SyncService          | Failed to add album from server: assetCount 20 != asset array length 0 for album Server's Manual |
2025-01-24 10:12:18.007423 | WARNING  | SyncService          | Failed to add album from server: assetCount 7 != asset array length 0 for album Tin left at Flower |
2025-01-24 10:12:17.932197 | WARNING  | SyncService          | Failed to add album from server: assetCount 1546 != asset array length 17 for album 0 Paperwork |
2025-01-24 10:12:17.789913 | WARNING  | SyncService          | Failed to add album from server: assetCount 66 != asset array length 22 for album Mass |
2025-01-24 10:12:17.735032 | WARNING  | SyncService          | Failed to add album from server: assetCount 767 != asset array length 1 for album 0 Paperwork Old |
2025-01-24 10:12:17.668609 | WARNING  | SyncService          | Failed to add album from server: assetCount 6 != asset array length 0 for album wire transfers |
2025-01-24 10:12:17.599146 | WARNING  | SyncService          | Failed to add album from server: assetCount 32 != asset array length 31 for album Flower - 13 April 2021 |
2025-01-24 10:12:17.449595 | WARNING  | SyncService          | Failed to add album from server: assetCount 50 != asset array length 0 for album Fr M |
@d-a-s commented on GitHub (Jan 24, 2025): I'm having a problem with this, but not just while appending. I have several albums that won't show up in the app since upgrading. I upgraded from 1.111 to 1.125. Before upgrade all ablums were visible, after upgrade the albums are not visible in the app but are in the web interface. Android log: ``` 2025-01-24 10:12:18.186689 | WARNING | SyncService | Failed to add album from server: assetCount 326 != asset array length 0 for album Christus Vincit | 2025-01-24 10:12:18.068061 | WARNING | SyncService | Failed to add album from server: assetCount 20 != asset array length 0 for album Server's Manual | 2025-01-24 10:12:18.007423 | WARNING | SyncService | Failed to add album from server: assetCount 7 != asset array length 0 for album Tin left at Flower | 2025-01-24 10:12:17.932197 | WARNING | SyncService | Failed to add album from server: assetCount 1546 != asset array length 17 for album 0 Paperwork | 2025-01-24 10:12:17.789913 | WARNING | SyncService | Failed to add album from server: assetCount 66 != asset array length 22 for album Mass | 2025-01-24 10:12:17.735032 | WARNING | SyncService | Failed to add album from server: assetCount 767 != asset array length 1 for album 0 Paperwork Old | 2025-01-24 10:12:17.668609 | WARNING | SyncService | Failed to add album from server: assetCount 6 != asset array length 0 for album wire transfers | 2025-01-24 10:12:17.599146 | WARNING | SyncService | Failed to add album from server: assetCount 32 != asset array length 31 for album Flower - 13 April 2021 | 2025-01-24 10:12:17.449595 | WARNING | SyncService | Failed to add album from server: assetCount 50 != asset array length 0 for album Fr M | ```
Author
Owner

@gnaghi commented on GitHub (Feb 26, 2025):

I have the same issue, even if I upgraded to 1.126.1, with a new created album.
I launched npm run sync:sql in the docker server, but I had the error : 

Error: ENOENT: no such file or directory, mkdir './src/queries'
    at async mkdir (node:internal/fs/promises:857:10)
    at async SqlGenerator.setup (/usr/src/app/dist/bin/sync-sql.js:76:9)
    at async SqlGenerator.run (/usr/src/app/dist/bin/sync-sql.js:56:13) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: './src/queries'
}
Something went wrong
@gnaghi commented on GitHub (Feb 26, 2025): I have the same issue, even if I upgraded to 1.126.1, with a new created album. I launched npm run sync:sql in the docker server, but I had the error :  ``` Error: ENOENT: no such file or directory, mkdir './src/queries' at async mkdir (node:internal/fs/promises:857:10) at async SqlGenerator.setup (/usr/src/app/dist/bin/sync-sql.js:76:9) at async SqlGenerator.run (/usr/src/app/dist/bin/sync-sql.js:56:13) { errno: -2, code: 'ENOENT', syscall: 'mkdir', path: './src/queries' } Something went wrong ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4929