More details down below.
1. Error #1
- MESSAGE `Error in runIsolateGentle for remote-sync`
- FROM `IsolateLogger`
- DETAILS
SqliteException(2067): while executing statement, UNIQUE constraint failed: remote_asset_entity.owner_id, remote_asset_entity.checksum, constraint failed (code 2067)
Causing statement: INSERT INTO "remote_asset_entity" ("name", "type", "created_at", "updated_at", "duration_in_seconds", "id", "checksum", "is_favorite", "owner_id", "local_date_time", "thumb_hash", "deleted_at", "live_photo_video_id", "visibility", "stack_id", "library_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT("id") DO UPDATE SET "name" = ?, "type" = ?, "created_at" = ?, "updated_at" = ?, "duration_in_seconds" = ?, "checksum" = ?, "is_favorite" = ?, "owner_id" = ?, "local_date_time" = ?, "thumb_hash" = ?, "deleted_at" = ?, "live_photo_video_id" = ?, "visibility" = ?, "stack_id" = ?, "library_id" = ?, parameters: IMG_1278.HEIC, 1, 2023-10-14T19:49:09.435Z, 2024-12-26T10:35:48.000Z, 0, f36c41c6-506c-45bd-8d7a-4c7fa42fc3c1, RYtJZzi7BdcmzlwZhp/+PdSDxBM=, 0, 6f050171-161e-4c3f-b5b0-6ca80b6f4ffa, 2023-10-14T21:49:09.435Z, null, 2025-10-15T04:09:47.783Z, null, 0, null, null, IMG_1278.HEIC, 1, 2023-10-14T19:49:09.435Z, 2024-12-26T10:35:48.000Z, 0, RYtJZzi7BdcmzlwZhp/+PdSDxBM=, 0, 6f050171-161e-4c3f-b5b0-6ca80b6f4ffa, 2023-10-14T21:49:09.435Z, null, 2025-10-15T04:09:47.783Z, null, 0, null, null
- STACK 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 179 SyncStreamRepository.updateAssetsV1
package:immich_mobile/domain/services/sync_stream.service.dart 67 SyncStreamService._processBatch
package:immich_mobile/domain/services/sync_stream.service.dart 58 SyncStreamService._handleEvents
package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 105 SyncApiRepository.streamChanges
package:immich_mobile/domain/services/sync_stream.service.dart 30 SyncStreamService.sync
package:immich_mobile/utils/isolate.dart 57 runInIsolateGentle.<fn>.<fn>
package:immich_mobile/utils/isolate.dart 36 runInIsolateGentle.<fn>
package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate.<fn>
2. Error #2
- MESSAGE `Error: updateAssetsV1 - user`
- FROM `DriftSyncStreamRepository`
- DETAILS
SqliteException(2067): while executing statement, UNIQUE constraint failed: remote_asset_entity.owner_id, remote_asset_entity.checksum, constraint failed (code 2067)
Causing statement: INSERT INTO "remote_asset_entity" ("name", "type", "created_at", "updated_at", "duration_in_seconds", "id", "checksum", "is_favorite", "owner_id", "local_date_time", "thumb_hash", "deleted_at", "live_photo_video_id", "visibility", "stack_id", "library_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT("id") DO UPDATE SET "name" = ?, "type" = ?, "created_at" = ?, "updated_at" = ?, "duration_in_seconds" = ?, "checksum" = ?, "is_favorite" = ?, "owner_id" = ?, "local_date_time" = ?, "thumb_hash" = ?, "deleted_at" = ?, "live_photo_video_id" = ?, "visibility" = ?, "stack_id" = ?, "library_id" = ?, parameters: IMG_1278.HEIC, 1, 2023-10-14T19:49:09.435Z, 2024-12-26T10:35:48.000Z, 0, f36c41c6-506c-45bd-8d7a-4c7fa42fc3c1, RYtJZzi7BdcmzlwZhp/+PdSDxBM=, 0, 6f050171-161e-4c3f-b5b0-6ca80b6f4ffa, 2023-10-14T21:49:09.435Z, null, 2025-10-15T04:09:47.783Z, null, 0, null, null, IMG_1278.HEIC, 1, 2023-10-14T19:49:09.435Z, 2024-12-26T10:35:48.000Z, 0, RYtJZzi7BdcmzlwZhp/+PdSDxBM=, 0, 6f050171-161e-4c3f-b5b0-6ca80b6f4ffa, 2023-10-14T21:49:09.435Z, null, 2025-10-15T04:09:47.783Z, null, 0, null, null
- STACK 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 179 SyncStreamRepository.updateAssetsV1
package:immich_mobile/domain/services/sync_stream.service.dart 67 SyncStreamService._processBatch
package:immich_mobile/domain/services/sync_stream.service.dart 58 SyncStreamService._handleEvents
package:immich_mobile/infrastructure/repositories/sync_api.repository.dart 105 SyncApiRepository.streamChanges
package:immich_mobile/domain/services/sync_stream.service.dart 30 SyncStreamService.sync
package:immich_mobile/utils/isolate.dart 57 runInIsolateGentle.<fn>.<fn>
package:immich_mobile/utils/isolate.dart 36 runInIsolateGentle.<fn>
package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate.<fn>
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
The bug
After upgrading Immich from 2.0.1 to 2.1.0 via
docker pull && docker compose up -d, the iOS app (also updated to 2.1.0) does not synchronize the photos anymore and shows two errors.More details down below.
The OS that Immich Server is running on
QNAP Linux distro (TS-873) via docker compose
Version of Immich Server
2.1.0
Version of Immich Mobile App
2.1.0
Platform with the issue
Device make and model
iPhone 13 Pro
Your docker-compose.yml content
Your .env content
Reproduction steps
Relevant log output
Additional information
No response