Android app sync broken after app update to 2.2.0 (and 2.2.1) #7676

Closed
opened 2026-02-05 13:13:01 +03:00 by OVERLORD · 49 comments
Owner

Originally created by @thoja21 on GitHub (Oct 31, 2025).

Originally assigned to: @shenlong-tanwen on GitHub.

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

After upgrade to the latest Android app (2.2.0) backup syncs fail with a SQLite error.
Other devices (Pixel 4a) on a separate test server (same versions as prod issue) still seems to work although the library it syncs with is far smaller and there are no memories.
Unfortunately I don't have any other devices to test with.

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v2.1.0

Version of Immich Mobile App

v2.2.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

Pixel 8 Pro

Your docker-compose.yml content

#
# WARNING: To install Immich, follow our guide: https://docs.immich.app/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:41eacbe83eca995561fe43814fd4891e16e39632806253848efaf04d3c8a8b84
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always

volumes:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# The Immich version to use. You can pin this to a specific version like "v1.71.0". Was "latest"
IMMICH_VERSION=v2.1.0

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=REDACTED
DB_DATABASE_NAME=REDACTED

Reproduction steps

  1. Update to 2.2.0 from 2.1.0 with previously synchronised data
  2. Have backup sync already enabled.
  3. Backup sync will fail

Relevant log output

2025-10-31 09:26:32.612311 | info     | HashService          | Hashing took - 4ms |
2025-10-31 09:26:32.607262 | info     | HashService          | Starting hashing of assets |
2025-10-31 09:26:30.590187 | severe   | IsolateLogger        | Error in runInIsolateGentle  for remote-sync | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787)
  Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: 95354764-a255-4ea8-84fa-c068e1771f3d, 38c1f3cd-3300-4030-b64a-e36125f6cbd9 |
package:sqlite3/src/implementation/exception.dart 87                               throwException
package:sqlite3/src/implementation/statement.dart 109                              StatementImplementation._execute
package:sqlite3/src/implementation/statement.dart 289                              StatementImplementation.executeWith
package:sqlite3/src/statement.dart 81                                              CommonPreparedStatement.execute
package:drift/src/sqlite3/database.dart 131                                        Sqlite3Delegate.runBatchSync
package:drift/native.dart 373                                                      _NativeDelegate.runBatched.<fn>
dart:async/future.dart 315                                                         new Future.sync
package:drift/native.dart 373                                                      _NativeDelegate.runBatched
package:drift/src/runtime/executor/helpers/engines.dart 128                        _BaseExecutor.runBatched.<fn>
package:drift/src/runtime/executor/helpers/engines.dart 62                         _BaseExecutor._synchronized
package:drift/src/runtime/executor/helpers/engines.dart 122                        _BaseExecutor.runBatched
package:drift/src/remote/server_impl.dart 170                                      ServerImplementation._runBatched
package:drift/src/remote/communication.dart 165                                    DriftCommunication.setRequestHandler.<fn>
===== asynchronous gap ===========================
package:drift/src/remote/communication.dart 113                                    DriftCommunication.request
package:drift/src/remote/client_impl.dart 84                                       _BaseExecutor.runBatched
package:drift/src/runtime/api/batch.dart 215                                       Batch._runWith
package:drift/src/runtime/api/batch.dart 199                                       Batch._commit
package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart 408  SyncStreamRepository.updateMemoryAssetsV1
package:immich_mobile/domain/services/sync_stream.service.dart 67                  SyncStreamService._processBatch
package:immich_mobile/domain/services/sync_stream.service.dart 48                  SyncStreamService._handleEvents
package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 110     SyncApiRepository.streamChanges
package:immich_mobile/domain/services/sync_stream.service.dart 30                  SyncStreamService.sync
package:immich_mobile/utils/isolate.dart 58                                        runInIsolateGentle.<fn>.<fn>
package:immich_mobile/utils/isolate.dart 37                                        runInIsolateGentle.<fn>
package:worker_manager/src/worker/worker_io.dart 106                               WorkerImpl._anotherIsolate.<fn>

2025-10-31 09:26:30.584699 | severe   | DriftSyncStreamRepository | Error: updateMemoryAssetsV1 | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787)
  Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: 95354764-a255-4ea8-84fa-c068e1771f3d, 38c1f3cd-3300-4030-b64a-e36125f6cbd9 |
package:sqlite3/src/implementation/exception.dart 87                               throwException
package:sqlite3/src/implementation/statement.dart 109                              StatementImplementation._execute
package:sqlite3/src/implementation/statement.dart 289                              StatementImplementation.executeWith
package:sqlite3/src/statement.dart 81                                              CommonPreparedStatement.execute
package:drift/src/sqlite3/database.dart 131                                        Sqlite3Delegate.runBatchSync
package:drift/native.dart 373                                                      _NativeDelegate.runBatched.<fn>
dart:async/future.dart 315                                                         new Future.sync
package:drift/native.dart 373                                                      _NativeDelegate.runBatched
package:drift/src/runtime/executor/helpers/engines.dart 128                        _BaseExecutor.runBatched.<fn>
package:drift/src/runtime/executor/helpers/engines.dart 62                         _BaseExecutor._synchronized
package:drift/src/runtime/executor/helpers/engines.dart 122                        _BaseExecutor.runBatched
package:drift/src/remote/server_impl.dart 170                                      ServerImplementation._runBatched
package:drift/src/remote/communication.dart 165                                    DriftCommunication.setRequestHandler.<fn>
===== asynchronous gap ===========================
package:drift/src/remote/communication.dart 113                                    DriftCommunication.request
package:drift/src/remote/client_impl.dart 84                                       _BaseExecutor.runBatched
package:drift/src/runtime/api/batch.dart 215                                       Batch._runWith
package:drift/src/runtime/api/batch.dart 199                                       Batch._commit
package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart 408  SyncStreamRepository.updateMemoryAssetsV1
package:immich_mobile/domain/services/sync_stream.service.dart 67                  SyncStreamService._processBatch
package:immich_mobile/domain/services/sync_stream.service.dart 48                  SyncStreamService._handleEvents
package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 110     SyncApiRepository.streamChanges
package:immich_mobile/domain/services/sync_stream.service.dart 30                  SyncStreamService.sync
package:immich_mobile/utils/isolate.dart 58                                        runInIsolateGentle.<fn>.<fn>
package:immich_mobile/utils/isolate.dart 37                                        runInIsolateGentle.<fn>
package:worker_manager/src/worker/worker_io.dart 106                               WorkerImpl._anotherIsolate.<fn>

2025-10-31 09:26:29.323899 | info     | DeviceSyncService    | Device sync took - 48ms |
2025-10-31 09:26:29.275338 | info     | SyncStreamService    | Remote sync request for user |

Additional information

No response

Originally created by @thoja21 on GitHub (Oct 31, 2025). Originally assigned to: @shenlong-tanwen on GitHub. ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug After upgrade to the latest Android app (2.2.0) backup syncs fail with a SQLite error. Other devices (Pixel 4a) on a separate test server (same versions as prod issue) still seems to work although the library it syncs with is far smaller and there are no memories. Unfortunately I don't have any other devices to test with. ### The OS that Immich Server is running on Ubuntu 22.04 ### Version of Immich Server v2.1.0 ### Version of Immich Mobile App v2.2.0 ### Platform with the issue - [ ] Server - [ ] Web - [x] Mobile ### Device make and model Pixel 8 Pro ### Your docker-compose.yml content ```YAML # # WARNING: To install Immich, follow our guide: https://docs.immich.app/install/docker-compose # # Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571 healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:41eacbe83eca995561fe43814fd4891e16e39632806253848efaf04d3c8a8b84 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs DB_STORAGE_TYPE: 'HDD' volumes: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data shm_size: 128mb restart: always volumes: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The location where your database files are stored DB_DATA_LOCATION=./postgres # The Immich version to use. You can pin this to a specific version like "v1.71.0". Was "latest" IMMICH_VERSION=v2.1.0 # Connection secret for postgres. You should change it to a random password DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### DB_USERNAME=REDACTED DB_DATABASE_NAME=REDACTED ``` ### Reproduction steps 1. Update to 2.2.0 from 2.1.0 with previously synchronised data 2. Have backup sync already enabled. 3. Backup sync will fail ### Relevant log output ```shell 2025-10-31 09:26:32.612311 | info | HashService | Hashing took - 4ms | 2025-10-31 09:26:32.607262 | info | HashService | Starting hashing of assets | 2025-10-31 09:26:30.590187 | severe | IsolateLogger | Error in runInIsolateGentle for remote-sync | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: 95354764-a255-4ea8-84fa-c068e1771f3d, 38c1f3cd-3300-4030-b64a-e36125f6cbd9 | package:sqlite3/src/implementation/exception.dart 87 throwException package:sqlite3/src/implementation/statement.dart 109 StatementImplementation._execute package:sqlite3/src/implementation/statement.dart 289 StatementImplementation.executeWith package:sqlite3/src/statement.dart 81 CommonPreparedStatement.execute package:drift/src/sqlite3/database.dart 131 Sqlite3Delegate.runBatchSync package:drift/native.dart 373 _NativeDelegate.runBatched.<fn> dart:async/future.dart 315 new Future.sync package:drift/native.dart 373 _NativeDelegate.runBatched package:drift/src/runtime/executor/helpers/engines.dart 128 _BaseExecutor.runBatched.<fn> package:drift/src/runtime/executor/helpers/engines.dart 62 _BaseExecutor._synchronized package:drift/src/runtime/executor/helpers/engines.dart 122 _BaseExecutor.runBatched package:drift/src/remote/server_impl.dart 170 ServerImplementation._runBatched package:drift/src/remote/communication.dart 165 DriftCommunication.setRequestHandler.<fn> ===== asynchronous gap =========================== package:drift/src/remote/communication.dart 113 DriftCommunication.request package:drift/src/remote/client_impl.dart 84 _BaseExecutor.runBatched package:drift/src/runtime/api/batch.dart 215 Batch._runWith package:drift/src/runtime/api/batch.dart 199 Batch._commit package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart 408 SyncStreamRepository.updateMemoryAssetsV1 package:immich_mobile/domain/services/sync_stream.service.dart 67 SyncStreamService._processBatch package:immich_mobile/domain/services/sync_stream.service.dart 48 SyncStreamService._handleEvents package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 110 SyncApiRepository.streamChanges package:immich_mobile/domain/services/sync_stream.service.dart 30 SyncStreamService.sync package:immich_mobile/utils/isolate.dart 58 runInIsolateGentle.<fn>.<fn> package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle.<fn> package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate.<fn> 2025-10-31 09:26:30.584699 | severe | DriftSyncStreamRepository | Error: updateMemoryAssetsV1 | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: 95354764-a255-4ea8-84fa-c068e1771f3d, 38c1f3cd-3300-4030-b64a-e36125f6cbd9 | package:sqlite3/src/implementation/exception.dart 87 throwException package:sqlite3/src/implementation/statement.dart 109 StatementImplementation._execute package:sqlite3/src/implementation/statement.dart 289 StatementImplementation.executeWith package:sqlite3/src/statement.dart 81 CommonPreparedStatement.execute package:drift/src/sqlite3/database.dart 131 Sqlite3Delegate.runBatchSync package:drift/native.dart 373 _NativeDelegate.runBatched.<fn> dart:async/future.dart 315 new Future.sync package:drift/native.dart 373 _NativeDelegate.runBatched package:drift/src/runtime/executor/helpers/engines.dart 128 _BaseExecutor.runBatched.<fn> package:drift/src/runtime/executor/helpers/engines.dart 62 _BaseExecutor._synchronized package:drift/src/runtime/executor/helpers/engines.dart 122 _BaseExecutor.runBatched package:drift/src/remote/server_impl.dart 170 ServerImplementation._runBatched package:drift/src/remote/communication.dart 165 DriftCommunication.setRequestHandler.<fn> ===== asynchronous gap =========================== package:drift/src/remote/communication.dart 113 DriftCommunication.request package:drift/src/remote/client_impl.dart 84 _BaseExecutor.runBatched package:drift/src/runtime/api/batch.dart 215 Batch._runWith package:drift/src/runtime/api/batch.dart 199 Batch._commit package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart 408 SyncStreamRepository.updateMemoryAssetsV1 package:immich_mobile/domain/services/sync_stream.service.dart 67 SyncStreamService._processBatch package:immich_mobile/domain/services/sync_stream.service.dart 48 SyncStreamService._handleEvents package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 110 SyncApiRepository.streamChanges package:immich_mobile/domain/services/sync_stream.service.dart 30 SyncStreamService.sync package:immich_mobile/utils/isolate.dart 58 runInIsolateGentle.<fn>.<fn> package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle.<fn> package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate.<fn> 2025-10-31 09:26:29.323899 | info | DeviceSyncService | Device sync took - 48ms | 2025-10-31 09:26:29.275338 | info | SyncStreamService | Remote sync request for user | ``` ### Additional information _No response_
Author
Owner

@bo0tzz commented on GitHub (Oct 31, 2025):

Have you used immich-go or the "replace with upload" feature?

@bo0tzz commented on GitHub (Oct 31, 2025): Have you used immich-go or the "replace with upload" feature?
Author
Owner

@thoja21 commented on GitHub (Oct 31, 2025):

Have you used immich-go or the "replace with upload" feature?

Hi @bo0tzz no never used immich-go or "replace with upload".

I expect clearing the app's storage and reconnecting it will resolve this but I was holding off in case a regression has been introduced that I can help test.

@thoja21 commented on GitHub (Oct 31, 2025): > Have you used immich-go or the "replace with upload" feature? Hi @bo0tzz no never used immich-go or "replace with upload". I expect clearing the app's storage and reconnecting it will resolve this but I was holding off in case a regression has been introduced that I can help test.
Author
Owner

@aaronspruit commented on GitHub (Oct 31, 2025):

Have you used immich-go or the "replace with upload" feature?

Hi @bo0tzz no never used immich-go or "replace with upload".

I expect clearing the app's storage and reconnecting it will resolve this but I was holding off in case a regression has been introduced that I can help test.

I had the same issue on 2.2.0 with a pixel 10. I woke up to sync errors this morning even though I had no photos to sync. I decided to clear my SQLite db. It solved one of the issues (not all memories showed up), but it resets sync and I cannot select folders to sync now (just spins).

@aaronspruit commented on GitHub (Oct 31, 2025): > > Have you used immich-go or the "replace with upload" feature? > > Hi @bo0tzz no never used immich-go or "replace with upload". > > I expect clearing the app's storage and reconnecting it will resolve this but I was holding off in case a regression has been introduced that I can help test. I had the same issue on 2.2.0 with a pixel 10. I woke up to sync errors this morning even though I had no photos to sync. I decided to clear my SQLite db. It solved one of the issues (not all memories showed up), but it resets sync and I cannot select folders to sync now (just spins).
Author
Owner

@LautjeDS commented on GitHub (Oct 31, 2025):

Had the same issue with a Pixel 8. After updating both mobile app and server to 2.2.0, the mobile app showed most assets as not being backed up, even though I could see them in the web ui, and threw the same sync errors as above. I reset the SQLite DB since I found another issue on GitHub were the fix was to reset the db and log out and back in. After doing that, I couldn't even select the albums to be backed up - the album selection page never finished loading. After completely resetting all app data for Immich it worked completely fine, so it's probably an issue with the update from 2.1.0 to 2.2.0.

@LautjeDS commented on GitHub (Oct 31, 2025): Had the same issue with a Pixel 8. After updating both mobile app and server to 2.2.0, the mobile app showed most assets as not being backed up, even though I could see them in the web ui, and threw the same sync errors as above. I reset the SQLite DB since I found another issue on GitHub were the fix was to reset the db and log out and back in. After doing that, I couldn't even select the albums to be backed up - the album selection page never finished loading. After completely resetting all app data for Immich it worked completely fine, so it's probably an issue with the update from 2.1.0 to 2.2.0.
Author
Owner

@aaronspruit commented on GitHub (Oct 31, 2025):

Resetting app data worked for me too

@aaronspruit commented on GitHub (Oct 31, 2025): Resetting app data worked for me too
Author
Owner

@alextran1502 commented on GitHub (Oct 31, 2025):

Do you remember if you've seen instances where the same memories appear on the web?

@alextran1502 commented on GitHub (Oct 31, 2025): Do you remember if you've seen instances where the same memories appear on the web?
Author
Owner

@sebastianberm commented on GitHub (Oct 31, 2025):

Resetting app data worked for me too

Same!

@sebastianberm commented on GitHub (Oct 31, 2025): > Resetting app data worked for me too Same!
Author
Owner

@thoja21 commented on GitHub (Oct 31, 2025):

Do you remember if you've seen instances where the same memories appear on the web?

@alextran1502 not that I remember but then again I primarily use the app.

@thoja21 commented on GitHub (Oct 31, 2025): > Do you remember if you've seen instances where the same memories appear on the web? @alextran1502 not that I remember but then again I primarily use the app.
Author
Owner

@bjorne commented on GitHub (Oct 31, 2025):

Edit: same problem, and deleting app data helped.

Same problem. I also see "No albums found matching your search" under the Albums tab, but maybe due to the "refresh" that keeps spinning indefinitely? Edit: albums eventually showed up.

I tried deleting Immich's app data (outside of the app) but issue persists after logging back in. (Was this the right kind of app data removal?)

@bjorne commented on GitHub (Oct 31, 2025): Edit: same problem, and deleting app data helped. ~Same problem. I also see "No albums found matching your search" under the Albums tab, but maybe due to the "refresh" that keeps spinning indefinitely? Edit: albums eventually showed up.~ ~I tried deleting Immich's app data (outside of the app) but issue persists after logging back in. (Was this the right kind of app data removal?)~
Author
Owner

@binnichtaktiv commented on GitHub (Oct 31, 2025):

Same for me on iOS. Logging out and back in fixed it for me.

@binnichtaktiv commented on GitHub (Oct 31, 2025): Same for me on iOS. Logging out and back in fixed it for me.
Author
Owner

@heyiswas commented on GitHub (Nov 1, 2025):

Same for me on iOS. Logging out and back in fixed it for me.

I can confirm. A logout/login fixed it (iOS 26.0.1 + App version 2.2.0 build.232)

@heyiswas commented on GitHub (Nov 1, 2025): > Same for me on iOS. Logging out and back in fixed it for me. I can confirm. A logout/login fixed it (iOS 26.0.1 + App version 2.2.0 build.232)
Author
Owner

@Phlogi commented on GitHub (Nov 1, 2025):

Same issue, clearing app cache did not solve the problem, re-sign-in did solve it.
Android: v2.2.0

SqliteException(787):` while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id")

@Phlogi commented on GitHub (Nov 1, 2025): Same issue, clearing app cache did not solve the problem, re-sign-in did solve it. Android: v2.2.0 ```SqliteException(787):` while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") ```
Author
Owner

@thoja21 commented on GitHub (Nov 1, 2025):

Problem still exists on 2.2.1

@thoja21 commented on GitHub (Nov 1, 2025): Problem still exists on 2.2.1
Author
Owner

@Giterd commented on GitHub (Nov 1, 2025):

Me too. Pixel 9, app version 2.2.1.build 3024, server 2.2.1 running on TrueNAS Scale latest. Photos simply do not back up. Was working previously and previously backed up photos are there. Logout/in, clearing cache, resetting SQLite did not help.

@Giterd commented on GitHub (Nov 1, 2025): Me too. Pixel 9, app version 2.2.1.build 3024, server 2.2.1 running on TrueNAS Scale latest. Photos simply do not back up. Was working previously and previously backed up photos are there. Logout/in, clearing cache, resetting SQLite did not help.
Author
Owner

@Rollbacke commented on GitHub (Nov 2, 2025):

Same here with version 2.2.0 (app android and server).
The app was unable to synchronize.
Updating app/server to 2.2.1 didn't solve the problem.
I had to reset the application for it to work again.

EDIT: I'm sorry, I didn't think to export the logs.

@Rollbacke commented on GitHub (Nov 2, 2025): Same here with version 2.2.0 (app android and server). The app was unable to synchronize. Updating app/server to 2.2.1 didn't solve the problem. I had to reset the application for it to work again. EDIT: I'm sorry, I didn't think to export the logs.
Author
Owner

@kumarvivek1752 commented on GitHub (Nov 2, 2025):

faced same issue, resetted app issue resolved.

@kumarvivek1752 commented on GitHub (Nov 2, 2025): faced same issue, resetted app issue resolved.
Author
Owner

@Giterd commented on GitHub (Nov 2, 2025):

Same here with version 2.2.0 (app android and server). The app was unable to synchronize. Updating app/server to 2.2.1 didn't solve the problem. I had to reset the application for it to work again.

EDIT: I'm sorry, I didn't think to export the logs.

When you say "reset the application", what exactly did you do? TIA

@Giterd commented on GitHub (Nov 2, 2025): > Same here with version 2.2.0 (app android and server). The app was unable to synchronize. Updating app/server to 2.2.1 didn't solve the problem. I had to reset the application for it to work again. > > EDIT: I'm sorry, I didn't think to export the logs. When you say "reset the application", what exactly did you do? TIA
Author
Owner

@ToxicMushroom commented on GitHub (Nov 2, 2025):

They probably wiped the internal data using androids "clear storage" feature.

Anyway I seem to have run into the same issue:
Screenshot_20251102-072519_Immich.png

Please let us know if more logs would be helpful

@ToxicMushroom commented on GitHub (Nov 2, 2025): They probably wiped the internal data using androids "clear storage" feature. Anyway I seem to have run into the same issue: ![Screenshot_20251102-072519_Immich.png](https://github.com/user-attachments/assets/a129b8a7-3664-4ede-8722-667c4675dd40) Please let us know if more logs would be helpful
Author
Owner

@Giterd commented on GitHub (Nov 2, 2025):

They probably wiped the internal data using androids "clear storage" feature.

That did not work for me. Phone logs:

Error in runInIsolateGentle for remote-sync

Invalid argument(s): No host specified in URI /sync/stream

#0 _HttpClient._openUrl (dart:_http/http_impl.dart:3016)
#1 _HttpClient.openUrl (dart:_http/http_impl.dart:2872)
#2 IOClient.send (package:http/src/io_client.dart:114)
#3 SyncApiRepository.streamChanges (package:immich_mobile/infrastructure/repositories/sync_api.repository.dart:81)

#4 SyncStreamService.sync (package:immich_mobile/domain/services/sync_stream.service.dart:30)

#5 runInIsolateGentle.. (package:immich_mobile/utils/isolate.dart:58)

#6 runInIsolateGentle. (package:immich_mobile/utils/isolate.dart:37)

#7 WorkerImpl._anotherIsolate. (package:worker_manager/src/worker/worker_io.dart:106)

@Giterd commented on GitHub (Nov 2, 2025): > They probably wiped the internal data using androids "clear storage" feature. > That did not work for me. Phone logs: Error in runInIsolateGentle for remote-sync Invalid argument(s): No host specified in URI /sync/stream #0 _HttpClient._openUrl (dart:_http/http_impl.dart:3016) #1 _HttpClient.openUrl (dart:_http/http_impl.dart:2872) #2 IOClient.send (package:http/src/io_client.dart:114) #3 SyncApiRepository.streamChanges (package:immich_mobile/infrastructure/repositories/sync_api.repository.dart:81) <asynchronous suspension> #4 SyncStreamService.sync (package:immich_mobile/domain/services/sync_stream.service.dart:30) <asynchronous suspension> #5 runInIsolateGentle.<anonymous closure>.<anonymous closure> (package:immich_mobile/utils/isolate.dart:58) <asynchronous suspension> #6 runInIsolateGentle.<anonymous closure> (package:immich_mobile/utils/isolate.dart:37) <asynchronous suspension> #7 WorkerImpl._anotherIsolate.<anonymous closure> (package:worker_manager/src/worker/worker_io.dart:106) <asynchronous suspension>
Author
Owner

@gleeballs commented on GitHub (Nov 2, 2025):

same issues on Xperia 1 VI. upgraded from 2.1 to 2.2.1 direct. backup would not work.

Just logged out of the app and logged back in. My backup slider was off though so had to turn that back on and all working again

@gleeballs commented on GitHub (Nov 2, 2025): same issues on Xperia 1 VI. upgraded from 2.1 to 2.2.1 direct. backup would not work. Just logged out of the app and logged back in. My backup slider was off though so had to turn that back on and all working again
Author
Owner

@Rollbacke commented on GitHub (Nov 2, 2025):

When you say "reset the application", what exactly did you do? TIA

I confirm what @ToxicMushroom said. I cleared the application's storage.

@Rollbacke commented on GitHub (Nov 2, 2025): > When you say "reset the application", what exactly did you do? TIA I confirm what @ToxicMushroom said. I cleared the application's storage.
Author
Owner

@Giterd commented on GitHub (Nov 2, 2025):

Hallelujah! I tried everything, but could not make any new backup uploads. But separately, I also use the Syncthing app. I am visiting family, and using their wifi. I noticed that Syncthing was not running. It provided the helpful message that it would not run when the wifi was flagged as a metered connection. I looked at the wifi, and the network usage was set to "Detect automatically". When I changed it to "Treat as unmetered", the Immich backup immediately started, as did Syncthing. I believe the iOS equivalent wifi setting is "Low data".

So everything ok now, but what a frustration to figure out by accident!

@Giterd commented on GitHub (Nov 2, 2025): Hallelujah! I tried everything, but could not make any new backup uploads. But separately, I also use the Syncthing app. I am visiting family, and using their wifi. I noticed that Syncthing was not running. It provided the helpful message that it would not run when the wifi was flagged as a metered connection. I looked at the wifi, and the network usage was set to "Detect automatically". When I changed it to "Treat as unmetered", the Immich backup immediately started, as did Syncthing. I believe the iOS equivalent wifi setting is "Low data". So everything ok now, but what a frustration to figure out by accident!
Author
Owner

@skarpinis commented on GitHub (Nov 3, 2025):

This is called stable?

@skarpinis commented on GitHub (Nov 3, 2025): This is called stable?
Author
Owner

@shenlong-tanwen commented on GitHub (Nov 3, 2025):

If anyone else is still running into the issue, ping me here and we’ll do some troubleshooting before you try logging out and back in.

@shenlong-tanwen commented on GitHub (Nov 3, 2025): If anyone else is still running into the issue, ping me here and we’ll do some troubleshooting before you try logging out and back in.
Author
Owner

@ToxicMushroom commented on GitHub (Nov 3, 2025):

@shenlong-tanwen lmk what you need, I have kept the broken situation on my phone as I didnt think wiping data was a good solution

@ToxicMushroom commented on GitHub (Nov 3, 2025): @shenlong-tanwen lmk what you need, I have kept the broken situation on my phone as I didnt think wiping data was a good solution
Author
Owner

@shenlong-tanwen commented on GitHub (Nov 3, 2025):

@shenlong-tanwen lmk what you need, I have kept the broken situation on my phone as I didnt think wiping data was a good solution

Thanks. Can you tap the Error: updateMemoryAssetsV1 entry from the log screen and share the detailed traces for the error

@shenlong-tanwen commented on GitHub (Nov 3, 2025): > [@shenlong-tanwen](https://github.com/shenlong-tanwen) lmk what you need, I have kept the broken situation on my phone as I didnt think wiping data was a good solution Thanks. Can you tap the `Error: updateMemoryAssetsV1` entry from the log screen and share the detailed traces for the error
Author
Owner

@ToxicMushroom commented on GitHub (Nov 3, 2025):

Error: updateMemoryAssetsV1
Details:
SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: abc9f691-b9fd-453a-ad4f-d97614bd432d, 6d8e9b46-1b8e-46be-af97-54fb6bb9172d
From: DriftSyncStreamRepository
Trace:

package:sqlite3/src/implementation/exception.dart 87                               throwException
package:sqlite3/src/implementation/statement.dart 109                              StatementImplementation._execute
package:sqlite3/src/implementation/statement.dart 289                              StatementImplementation.executeWith
package:sqlite3/src/statement.dart 81                                              CommonPreparedStatement.execute
package:drift/src/sqlite3/database.dart 131                                        Sqlite3Delegate.runBatchSync
package:drift/native.dart 373                                                      _NativeDelegate.runBatched.<fn>
dart:async/future.dart 315                                                         new Future.sync
package:drift/native.dart 373                                                      _NativeDelegate.runBatched
package:drift/src/runtime/executor/helpers/engines.dart 128                        _BaseExecutor.runBatched.<fn>
package:drift/src/runtime/executor/helpers/engines.dart 62                         _BaseExecutor._synchronized
package:drift/src/runtime/executor/helpers/engines.dart 122                        _BaseExecutor.runBatched
package:drift/src/remote/server_impl.dart 170                                      ServerImplementation._runBatched
package:drift/src/remote/communication.dart 165                                    DriftCommunication.setRequestHandler.<fn>
===== asynchronous gap ===========================
package:drift/src/remote/communication.dart 113                                    DriftCommunication.request
package:drift/src/remote/client_impl.dart 84                                       _BaseExecutor.runBatched
package:drift/src/runtime/api/batch.dart 215                                       Batch._runWith
package:drift/src/runtime/api/batch.dart 199                                       Batch._commit
package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart 408  SyncStreamRepository.updateMemoryAssetsV1
package:immich_mobile/domain/services/sync_stream.service.dart 67                  SyncStreamService._processBatch
package:immich_mobile/domain/services/sync_stream.service.dart 48                  SyncStreamService._handleEvents
package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 110     SyncApiRepository.streamChanges
package:immich_mobile/domain/services/sync_stream.service.dart 30                  SyncStreamService.sync
package:immich_mobile/utils/isolate.dart 58                                        runInIsolateGentle.<fn>.<fn>
package:immich_mobile/utils/isolate.dart 37                                        runInIsolateGentle.<fn>
package:worker_manager/src/worker/worker_io.dart 106                               WorkerImpl._anotherIsolate.<fn>
@ToxicMushroom commented on GitHub (Nov 3, 2025): Error: updateMemoryAssetsV1 Details: `SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: abc9f691-b9fd-453a-ad4f-d97614bd432d, 6d8e9b46-1b8e-46be-af97-54fb6bb9172d` From: DriftSyncStreamRepository Trace: ``` package:sqlite3/src/implementation/exception.dart 87 throwException package:sqlite3/src/implementation/statement.dart 109 StatementImplementation._execute package:sqlite3/src/implementation/statement.dart 289 StatementImplementation.executeWith package:sqlite3/src/statement.dart 81 CommonPreparedStatement.execute package:drift/src/sqlite3/database.dart 131 Sqlite3Delegate.runBatchSync package:drift/native.dart 373 _NativeDelegate.runBatched.<fn> dart:async/future.dart 315 new Future.sync package:drift/native.dart 373 _NativeDelegate.runBatched package:drift/src/runtime/executor/helpers/engines.dart 128 _BaseExecutor.runBatched.<fn> package:drift/src/runtime/executor/helpers/engines.dart 62 _BaseExecutor._synchronized package:drift/src/runtime/executor/helpers/engines.dart 122 _BaseExecutor.runBatched package:drift/src/remote/server_impl.dart 170 ServerImplementation._runBatched package:drift/src/remote/communication.dart 165 DriftCommunication.setRequestHandler.<fn> ===== asynchronous gap =========================== package:drift/src/remote/communication.dart 113 DriftCommunication.request package:drift/src/remote/client_impl.dart 84 _BaseExecutor.runBatched package:drift/src/runtime/api/batch.dart 215 Batch._runWith package:drift/src/runtime/api/batch.dart 199 Batch._commit package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart 408 SyncStreamRepository.updateMemoryAssetsV1 package:immich_mobile/domain/services/sync_stream.service.dart 67 SyncStreamService._processBatch package:immich_mobile/domain/services/sync_stream.service.dart 48 SyncStreamService._handleEvents package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 110 SyncApiRepository.streamChanges package:immich_mobile/domain/services/sync_stream.service.dart 30 SyncStreamService.sync package:immich_mobile/utils/isolate.dart 58 runInIsolateGentle.<fn>.<fn> package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle.<fn> package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate.<fn> ```
Author
Owner

@l-mb commented on GitHub (Nov 3, 2025):

I have a similar issue (Pixel 9 Pro, latest app & immich, though I did use immich-go in the long past when I first imported my photos to immich).

I'm getting "sync failed" and tons of `No linked remote album ID found for local album: ########" in the logs, and before that, also the same two errors as cited above.

@l-mb commented on GitHub (Nov 3, 2025): I have a similar issue (Pixel 9 Pro, latest app & immich, though I *did* use immich-go in the long past when I first imported my photos to immich). I'm getting "sync failed" and tons of `No linked remote album ID found for local album: ########" in the logs, and before that, also the same two errors as cited above.
Author
Owner

@shenlong-tanwen commented on GitHub (Nov 3, 2025):

Error: updateMemoryAssetsV1 Details: SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: abc9f691-b9fd-453a-ad4f-d97614bd432d, 6d8e9b46-1b8e-46be-af97-54fb6bb9172d From: DriftSyncStreamRepository Trace:

Can you export the mobile app's local DB using the Export option under Settings -> Sync status page, connect to it with a SQLite client of your liking, then execute the following two queries against the DB. One of these two should return an empty result.

SELECT * FROM remote_asset_entity WHERE id = 'abc9f691-b9fd-453a-ad4f-d97614bd432d';
SELECT * FROM memory_entity WHERE id = '6d8e9b46-1b8e-46be-af97-54fb6bb9172d';

Once we know which id is returning with no result, kindly connect to the server's DB1 and execute the following query based on the type of id and share us the output of it

-- If it is the remote asset query returning no returns, run this against the server's DB
SELECT * FROM "asset" WHERE "id" = 'abc9f691-b9fd-453a-ad4f-d97614bd432d';
-- If it is the memory query, execute this
SELECT * FROM "memory" WHERE "id" = '6d8e9b46-1b8e-46be-af97-54fb6bb9172d';
@shenlong-tanwen commented on GitHub (Nov 3, 2025): > Error: updateMemoryAssetsV1 Details: `SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: abc9f691-b9fd-453a-ad4f-d97614bd432d, 6d8e9b46-1b8e-46be-af97-54fb6bb9172d` From: DriftSyncStreamRepository Trace: Can you export the mobile app's local DB using the Export option under Settings -> Sync status page, connect to it with a SQLite client of your liking, then execute the following two queries against the DB. One of these two should return an empty result. ```sql SELECT * FROM remote_asset_entity WHERE id = 'abc9f691-b9fd-453a-ad4f-d97614bd432d'; SELECT * FROM memory_entity WHERE id = '6d8e9b46-1b8e-46be-af97-54fb6bb9172d'; ``` Once we know which id is returning with no result, kindly connect to the server's DB[^1] and execute the following query based on the type of id and share us the output of it ```sql -- If it is the remote asset query returning no returns, run this against the server's DB SELECT * FROM "asset" WHERE "id" = 'abc9f691-b9fd-453a-ad4f-d97614bd432d'; -- If it is the memory query, execute this SELECT * FROM "memory" WHERE "id" = '6d8e9b46-1b8e-46be-af97-54fb6bb9172d'; ``` [^1]: https://docs.immich.app/guides/database-queries
Author
Owner

@ToxicMushroom commented on GitHub (Nov 3, 2025):

@shenlong-tanwen
Running on the mobile sqlite db export:

Execution finished without errors.
Result: 0 rows returned in 2ms
At line 1:
SELECT * FROM remote_asset_entity WHERE id = 'abc9f691-b9fd-453a-ad4f-d97614bd432d';

Then immich=# SELECT * FROM "asset" WHERE "id" = 'abc9f691-b9fd-453a-ad4f-d97614bd432d'; in the container:

                  id                  |                  deviceAssetId                   |               ownerId                |  deviceId   | type  |                                   originalPath                                   |     fileCreatedAt      |     fileModifiedAt     | isFavorite | duration | encodedVideoPath |                  checksum                  | livePhotoVideoId |           updatedAt           |          createdAt           |             originalFileName             |                                     sidecarPath                                      |                  thumbhash                   | isOffline | libraryId | isExternal | deletedAt |     localDateTime      | stackId | duplicateId | status |               updateId               | visibility
--------------------------------------+--------------------------------------------------+--------------------------------------+-------------+-------+----------------------------------------------------------------------------------+------------------------+------------------------+------------+----------+------------------+--------------------------------------------+------------------+-------------------------------+------------------------------+------------------------------------------+--------------------------------------------------------------------------------------+----------------------------------------------+-----------+-----------+------------+-----------+------------------------+---------+-------------+--------+--------------------------------------+------------
 abc9f691-b9fd-453a-ad4f-d97614bd432d | 70e743a5-5598-4b77-871b-9c16163d8be5.jpg-3638083 | 6fe18692-e1d4-4a96-9b08-bf8771e8f81a | karamba2000 | IMAGE | /photos/library/merlijn/2022/2022-11-04/70e743a5-5598-4b77-871b-9c16163d8be5.jpg | 2022-11-04 15:06:13+00 | 2022-11-04 15:06:13+00 | f          |          |                  | \xc234d7f9dedeaba33891ed4cc34346e717a6d00f |                  | 2025-05-24 12:19:17.067721+00 | 2024-07-17 02:11:29.23337+00 | 70e743a5-5598-4b77-871b-9c16163d8be5.jpg | /photos/library/merlijn/2022/2022-11-04/70e743a5-5598-4b77-871b-9c16163d8be5.jpg.xmp | \x1c08120d027688af786798478786888860b124750a | f         |           | f          |           | 2022-11-04 15:06:13+00 |         |             | active | 0197023b-b5cb-7e0b-a08a-d01cdd3a6034 | timeline
(1 row)
@ToxicMushroom commented on GitHub (Nov 3, 2025): @shenlong-tanwen Running on the mobile sqlite db export: ``` Execution finished without errors. Result: 0 rows returned in 2ms At line 1: SELECT * FROM remote_asset_entity WHERE id = 'abc9f691-b9fd-453a-ad4f-d97614bd432d'; ``` Then `immich=# SELECT * FROM "asset" WHERE "id" = 'abc9f691-b9fd-453a-ad4f-d97614bd432d';` in the container: ``` id | deviceAssetId | ownerId | deviceId | type | originalPath | fileCreatedAt | fileModifiedAt | isFavorite | duration | encodedVideoPath | checksum | livePhotoVideoId | updatedAt | createdAt | originalFileName | sidecarPath | thumbhash | isOffline | libraryId | isExternal | deletedAt | localDateTime | stackId | duplicateId | status | updateId | visibility --------------------------------------+--------------------------------------------------+--------------------------------------+-------------+-------+----------------------------------------------------------------------------------+------------------------+------------------------+------------+----------+------------------+--------------------------------------------+------------------+-------------------------------+------------------------------+------------------------------------------+--------------------------------------------------------------------------------------+----------------------------------------------+-----------+-----------+------------+-----------+------------------------+---------+-------------+--------+--------------------------------------+------------ abc9f691-b9fd-453a-ad4f-d97614bd432d | 70e743a5-5598-4b77-871b-9c16163d8be5.jpg-3638083 | 6fe18692-e1d4-4a96-9b08-bf8771e8f81a | karamba2000 | IMAGE | /photos/library/merlijn/2022/2022-11-04/70e743a5-5598-4b77-871b-9c16163d8be5.jpg | 2022-11-04 15:06:13+00 | 2022-11-04 15:06:13+00 | f | | | \xc234d7f9dedeaba33891ed4cc34346e717a6d00f | | 2025-05-24 12:19:17.067721+00 | 2024-07-17 02:11:29.23337+00 | 70e743a5-5598-4b77-871b-9c16163d8be5.jpg | /photos/library/merlijn/2022/2022-11-04/70e743a5-5598-4b77-871b-9c16163d8be5.jpg.xmp | \x1c08120d027688af786798478786888860b124750a | f | | f | | 2022-11-04 15:06:13+00 | | | active | 0197023b-b5cb-7e0b-a08a-d01cdd3a6034 | timeline (1 row) ```
Author
Owner

@ToxicMushroom commented on GitHub (Nov 3, 2025):

I have also used immich-go I think to migrate from google photos a long time ago

@ToxicMushroom commented on GitHub (Nov 3, 2025): I have also used immich-go I think to migrate from google photos a long time ago
Author
Owner

@shenlong-tanwen commented on GitHub (Nov 3, 2025):

Execution finished without errors.
Result: 0 rows returned in 2ms
At line 1:
SELECT * FROM remote_asset_entity WHERE id = 'abc9f691-b9fd-453a-ad4f-d97614bd432d';

Interesting, Do you remember deleting this asset recently through the mobile app? Also, Would you be willing to continue this over at a help-desk-support thread in Discord.

@shenlong-tanwen commented on GitHub (Nov 3, 2025): > Execution finished without errors. > Result: 0 rows returned in 2ms > At line 1: > SELECT * FROM remote_asset_entity WHERE id = 'abc9f691-b9fd-453a-ad4f-d97614bd432d'; Interesting, Do you remember deleting this asset recently through the mobile app? Also, Would you be willing to continue this over at a help-desk-support thread in Discord.
Author
Owner

@ToxicMushroom commented on GitHub (Nov 3, 2025):

I do not remember deleting this asset, nor viewing it recently. And yes feel free to send me an invite !

@ToxicMushroom commented on GitHub (Nov 3, 2025): I do not remember deleting this asset, nor viewing it recently. And yes feel free to send me an invite !
Author
Owner

@shenlong-tanwen commented on GitHub (Nov 3, 2025):

I do not remember deleting this asset, nor viewing it recently. And yes feel free to send me an invite !

Can you drop your user name here? Or better if you could create a support thread there at the Discord server and tag me

@shenlong-tanwen commented on GitHub (Nov 3, 2025): > I do not remember deleting this asset, nor viewing it recently. And yes feel free to send me an invite ! Can you drop your user name here? Or better if you could create a support thread there at the Discord server and tag me
Author
Owner

@thoja21 commented on GitHub (Nov 4, 2025):

@shenlong-tanwen @ToxicMushroom not sure how far you both got with it but I also get one record returned for the second query shenlong-tarwen suggested running on the app's SQLite database.
I have never used Immich-Go and have not deleted the related asset.

@thoja21 commented on GitHub (Nov 4, 2025): @shenlong-tanwen @ToxicMushroom not sure how far you both got with it but I also get one record returned for the second query shenlong-tarwen suggested running on the app's SQLite database. I have never used Immich-Go and have not deleted the related asset.
Author
Owner

@barreeeiroo commented on GitHub (Nov 4, 2025):

For App Users

💡 Disabling the new timeline and enabling it again fixes the issue without having to logout

For Maintainers

Just in case it helps with the debugging, I dumped the SQLite and logs in my case (Pixel 8 Pro and Immich 2.2.2), as I was facing the same sync error and came across this. I was having the same log errors:

2025-11-01 17:34:10.611208 | severe   | DriftSyncStreamRepository | Error: updateMemoryAssetsV1 | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787)
  Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: 3b30f8eb-4084-4e3e-b4f4-61359ad811a2, d57c4b83-929f-499f-a276-b24669244b6f |
  • Asset ID: 3b30f8eb-4084-4e3e-b4f4-61359ad811a2
  • Memory ID: d57c4b83-929f-499f-a276-b24669244b6f

Verified that both asset, memory and memory_asset were present in the server:

select * from asset where id = '3b30f8eb-4084-4e3e-b4f4-61359ad811a2';

select * from memory where id = 'd57c4b83-929f-499f-a276-b24669244b6f';

select * from memory_asset where "memoriesId" = 'd57c4b83-929f-499f-a276-b24669244b6f' and "assetsId" = '3b30f8eb-4084-4e3e-b4f4-61359ad811a2';

Verified that the memory exists in local SQLite:

Image

However, the missing entity in the local SQLite is the remote asset:

Image

It seems like the local Immich App is failing to correctly pull the remote assets to build the memory?

Also, I came across something interesting: the affected memory was due to be displayed on 4th November (quite close uh?). Maybe it's a red herring though...

I did also notice that the affected asset did have A LOT of text, so I guess the OCR related stuff for that entry might be quite large. Maybe it could also be related?

I did also try something else: disable new timeline, and enable it again. It actually resolved the issue. It probably forced some kind of hard refresh on the remote assets, and this got the missing remote assets in sync...
The reason why I tried this was because I saw that there was a workflow in the mobile source code that, if the photos "refreshes twice", it will force a reload on all the remote assets. I was not able to actually force that refresh in the "photos activity", so I thought it was only in the old timeline. So, I disabled and enabled, and saw the issue was solved.

Feel free to ping me in case further debugging is needed, as I do still have the corrupted SQLite and logs.

@barreeeiroo commented on GitHub (Nov 4, 2025): ### For App Users **💡 Disabling the new timeline and enabling it again fixes the issue without having to logout** ### For Maintainers Just in case it helps with the debugging, I dumped the SQLite and logs in my case (Pixel 8 Pro and Immich 2.2.2), as I was facing the same sync error and came across this. I was having the same log errors: ``` 2025-11-01 17:34:10.611208 | severe | DriftSyncStreamRepository | Error: updateMemoryAssetsV1 | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "memory_asset_entity" ("asset_id", "memory_id") VALUES (?, ?) ON CONFLICT("asset_id", "memory_id") DO NOTHING, parameters: 3b30f8eb-4084-4e3e-b4f4-61359ad811a2, d57c4b83-929f-499f-a276-b24669244b6f | ``` * Asset ID: `3b30f8eb-4084-4e3e-b4f4-61359ad811a2` * Memory ID: `d57c4b83-929f-499f-a276-b24669244b6f` Verified that both `asset`, `memory` and `memory_asset` were present in the server: ```sql select * from asset where id = '3b30f8eb-4084-4e3e-b4f4-61359ad811a2'; select * from memory where id = 'd57c4b83-929f-499f-a276-b24669244b6f'; select * from memory_asset where "memoriesId" = 'd57c4b83-929f-499f-a276-b24669244b6f' and "assetsId" = '3b30f8eb-4084-4e3e-b4f4-61359ad811a2'; ``` Verified that the memory exists in local SQLite: <img width="1609" height="901" alt="Image" src="https://github.com/user-attachments/assets/6dca0689-ec09-4a50-b810-932d7b67aa24" /> However, the missing entity in the local SQLite is the remote asset: <img width="1609" height="901" alt="Image" src="https://github.com/user-attachments/assets/862472ec-9f62-4ac4-9358-642c8162840b" /> It seems like the local Immich App is failing to correctly pull the remote assets to build the memory? Also, I came across something interesting: the affected memory was due to be displayed on 4th November (quite close uh?). Maybe it's a red herring though... I did also notice that the affected asset did have A LOT of text, so I guess the OCR related stuff for that entry might be quite large. Maybe it could also be related? I did also try something else: disable new timeline, and enable it again. It actually resolved the issue. It probably forced some kind of hard refresh on the remote assets, and this got the missing remote assets in sync... The reason why I tried this was because I saw that there was a workflow in the mobile source code that, if the photos "refreshes twice", it will force a reload on all the remote assets. I was not able to actually force that refresh in the "photos activity", so I thought it was only in the old timeline. So, I disabled and enabled, and saw the issue was solved. Feel free to ping me in case further debugging is needed, as I do still have the corrupted SQLite and logs.
Author
Owner

@flo-m commented on GitHub (Nov 4, 2025):

thanks, disabling the new timeline + reenabling it solved the issue for me !

@flo-m commented on GitHub (Nov 4, 2025): thanks, disabling the new timeline + reenabling it solved the issue for me !
Author
Owner

@zettseb commented on GitHub (Nov 9, 2025):

Unfortunately, for me the error appears again and again.

What helps:

  • deleting the entire app data (not only cache)
  • disabling & re-enabling the new timeline

Then, after toggling on the backup slider again (which gets disabled automatically), it works for a while, but after some time (minutes to hours) I run into the same issue again...

Logging out & in does not help at all. The backup first seems to be accepted, but uploading does not happen, and after closing & opening the app, I see the error again.

Also, I cannot see the (foreground & background) backup option screen as displayed in the docs in my app anymore. 🤔

Running server 2.2.2. and Android app 2.2.3.

@zettseb commented on GitHub (Nov 9, 2025): Unfortunately, for me the error appears again and again. What helps: - deleting the entire app data (not only cache) - disabling & re-enabling the new timeline Then, after toggling on the backup slider again (which gets disabled automatically), it works for a while, but after some time (minutes to hours) I run into the same issue again... Logging out & in does not help at all. The backup first seems to be accepted, but uploading does not happen, and after closing & opening the app, I see the error again. Also, I cannot see the (foreground & background) backup option screen as displayed in the [docs](https://docs.immich.app/features/automatic-backup) in my app anymore. 🤔 Running server 2.2.2. and Android app 2.2.3.
Author
Owner

@l-mb commented on GitHub (Nov 10, 2025):

I've also disabled and re-enabled the new timeline and that cleared up the error for me.

@l-mb commented on GitHub (Nov 10, 2025): I've also disabled and re-enabled the new timeline and that cleared up the error for me.
Author
Owner

@ItsJustRuby commented on GitHub (Nov 12, 2025):

@-ing @bo0tzz and @barreeeiroo to aid in debugging:

I also encountered this issue

  • having used "replace with upload"
  • for completely OCR-less images

(in my case, to fix incorrect EXIF rotations)

(Resetting the app's sqlite db fixed the issue for me so far, thank you for the advice!)

@ItsJustRuby commented on GitHub (Nov 12, 2025): @-ing @bo0tzz and @barreeeiroo to aid in debugging: I also encountered this issue * having used "replace with upload" * for completely OCR-less images (in my case, to fix incorrect EXIF rotations) (Resetting the app's sqlite db fixed the issue for me so far, thank you for the advice!)
Author
Owner

@Tirarex commented on GitHub (Nov 14, 2025):

2 weeks and still not fixed.

@Tirarex commented on GitHub (Nov 14, 2025): 2 weeks and still not fixed.
Author
Owner

@zettseb commented on GitHub (Nov 14, 2025):

Is there any work being done on investigating and fixing the root cause?
For me Immich is 100% unusable since this occurred the first time a week ago, since (as I've written above) I can only mitigate the bug for a few hours till it appears again. 😢

@zettseb commented on GitHub (Nov 14, 2025): Is there any work being done on investigating and fixing the root cause? For me Immich is 100% unusable since this occurred the first time a week ago, since (as I've written above) I can only mitigate the bug for a few hours till it appears again. 😢
Author
Owner

@zch6348135 commented on GitHub (Nov 17, 2025):

The same issue. I found the same key in the assettable of my PostgreSQL database. This record was imported via the External Library. After I deleted this record, the mobile client could upload pictures normally. Here's app log 2025-11-17 11:07:37.721468 | severe | IsolateLogger | Error in runInIsolateGentle for remote-sync | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "remote_exif_entity" ("asset_id", "city", "state", "country", "date_time_original", "description", "height", "width", "exposure_time", "f_number", "file_size", "focal_length", "latitude", "longitude", "iso", "make", "model", "lens", "orientation", "time_zone", "rating", "projection_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT("asset_id") DO UPDATE SET "city" = ?, "state" = ?, "country" = ?, "date_time_original" = ?, "description" = ?, "height" = ?, "width" = ?, "exposure_time" = ?, "f_number" = ?, "file_size" = ?, "focal_length" = ?, "latitude" = ?, "longitude" = ?, "iso" = ?, "make" = ?, "model" = ?, "lens" = ?, "orientation" = ?, "time_zone" = ?, "rating" = ?, "projection_type" = ?, parameters: 9cd6b303-53f4-4f9a-8c37-89b2551c00d0, null, null, null, 2024-02-29T06:59:27.870Z, , 1280, 720, null, null, 167070, null, null, null, null, null, null, null, 1, null, null, null, null, null, null, 2024-02-29T06:59:27.870Z, , 1280, 720, null, null, 167070, null, null, null, null, null, null, null, 1, null, null, null | package:sqlite3/src/implementation/exception.dart 87 throwException package:sqlite3/src/implementation/statement.dart 109 StatementImplementation._execute package:sqlite3/src/implementation/statement.dart 289 StatementImplementation.executeWith

@zch6348135 commented on GitHub (Nov 17, 2025): The same issue. I found the same key in the assettable of my PostgreSQL database. This record was imported via the External Library. After I deleted this record, the mobile client could upload pictures normally. Here's app log `2025-11-17 11:07:37.721468 | severe | IsolateLogger | Error in runInIsolateGentle for remote-sync | SqliteException(787): while executing statement, FOREIGN KEY constraint failed, constraint failed (code 787) Causing statement: INSERT INTO "remote_exif_entity" ("asset_id", "city", "state", "country", "date_time_original", "description", "height", "width", "exposure_time", "f_number", "file_size", "focal_length", "latitude", "longitude", "iso", "make", "model", "lens", "orientation", "time_zone", "rating", "projection_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT("asset_id") DO UPDATE SET "city" = ?, "state" = ?, "country" = ?, "date_time_original" = ?, "description" = ?, "height" = ?, "width" = ?, "exposure_time" = ?, "f_number" = ?, "file_size" = ?, "focal_length" = ?, "latitude" = ?, "longitude" = ?, "iso" = ?, "make" = ?, "model" = ?, "lens" = ?, "orientation" = ?, "time_zone" = ?, "rating" = ?, "projection_type" = ?, parameters: 9cd6b303-53f4-4f9a-8c37-89b2551c00d0, null, null, null, 2024-02-29T06:59:27.870Z, , 1280, 720, null, null, 167070, null, null, null, null, null, null, null, 1, null, null, null, null, null, null, 2024-02-29T06:59:27.870Z, , 1280, 720, null, null, 167070, null, null, null, null, null, null, null, 1, null, null, null | package:sqlite3/src/implementation/exception.dart 87 throwException package:sqlite3/src/implementation/statement.dart 109 StatementImplementation._execute package:sqlite3/src/implementation/statement.dart 289 StatementImplementation.executeWith `
Author
Owner

@alextran1502 commented on GitHub (Nov 17, 2025):

Is there any work being done on investigating and fixing the root cause?

@zettseb Yes, the root cause of this issue is from the feature "Replace at" and its API usage in immich-go, which essentially replaces the hash value of the asset while keeping the asset ID the same.

We introduced a new API to replace that problematic endpoint and have communicated to the library author to make the change

@alextran1502 commented on GitHub (Nov 17, 2025): > Is there any work being done on investigating and fixing the root cause? @zettseb Yes, the root cause of this issue is from the feature "Replace at" and its API usage in immich-go, which essentially replaces the hash value of the asset while keeping the asset ID the same. We introduced a new API to replace that problematic endpoint and have communicated to the library author to make the change
Author
Owner

@binnichtaktiv commented on GitHub (Nov 17, 2025):

Is there any work being done on investigating and fixing the root cause?

@zettseb Yes, the root cause of this issue is from the feature "Replace at" and its API usage in immich-go, which essentially replaces the hash value of the asset while keeping the asset ID the same.

We introduced a new API to replace that problematic endpoint and have communicated to the library author to make the change

What do you think how long will it take? It’s really annoying

@binnichtaktiv commented on GitHub (Nov 17, 2025): > > Is there any work being done on investigating and fixing the root cause? > > [@zettseb](https://github.com/zettseb) Yes, the root cause of this issue is from the feature "Replace at" and its API usage in immich-go, which essentially replaces the hash value of the asset while keeping the asset ID the same. > > We introduced a new API to replace that problematic endpoint and have communicated to the library author to make the change What do you think how long will it take? It’s really annoying
Author
Owner

@l-mb commented on GitHub (Nov 17, 2025):

@alextran1502 Thanks for the update! Will that update then also address & and cleanup existing inconsistencies? (I've not used immich-go for over a year, and would hopefully not need to reimport ...)

@l-mb commented on GitHub (Nov 17, 2025): @alextran1502 Thanks for the update! Will that update then also address & and cleanup existing inconsistencies? (I've not used immich-go for over a year, and would hopefully not need to reimport ...)
Author
Owner

@Pepp12 commented on GitHub (Nov 18, 2025):

Can confirm this bug on Android 12. Iam logging out and in for the sync to find the latest pictures on the mobile app. But its only working like a day or so...then the sync just stops working, no matter what I try.

@Pepp12 commented on GitHub (Nov 18, 2025): Can confirm this bug on Android 12. Iam logging out and in for the sync to find the latest pictures on the mobile app. But its only working like a day or so...then the sync just stops working, no matter what I try.
Author
Owner

@zettseb commented on GitHub (Nov 22, 2025):

Unfortunately the referenced commit did not fix it for me. 😢
I'm running both server and app now on version 2.3.1, and still a logout only fixes the issue temporarily.
Can I please understand more in detail what's the root cause @alextran1502?
I've used immich-go only once weeks ago and not again since then. I'm running https://github.com/romainrbr/immich-face-to-album/ on a schedule though, maybe this uses the problematic API endpoint as well.

@zettseb commented on GitHub (Nov 22, 2025): Unfortunately the referenced commit did not fix it for me. 😢 I'm running both server and app now on version 2.3.1, and still a logout only fixes the issue temporarily. Can I please understand more in detail what's the root cause @alextran1502? I've used immich-go only once weeks ago and not again since then. I'm running https://github.com/romainrbr/immich-face-to-album/ on a schedule though, maybe this uses the problematic API endpoint as well.
Author
Owner

@alextran1502 commented on GitHub (Nov 22, 2025):

@zettseb, I am not sure. Maybe try not running that script for a week and see if it fixes the issue.

@alextran1502 commented on GitHub (Nov 22, 2025): @zettseb, I am not sure. Maybe try not running that script for a week and see if it fixes the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7676