2025-11-04 16:51:11.066948 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:51:11.059881 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:51:10.557884 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:50:42.488190 | info | HashService | Hashing took - 1ms | 2025-11-04 16:50:42.486816 | info | HashService | Starting hashing of assets | 2025-11-04 16:50:40.466010 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:50:40.462358 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:50:40.087748 | info | DeviceSyncService | Device sync took - 5ms | 2025-11-04 16:50:40.082191 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:50:39.489551 | info | AppLifeCycleNotifier | Using server URL: null | 2025-11-04 16:49:07.630992 | warning | DriftBackupOptionsPage | Background sync failed, not starting backup | 2025-11-04 16:49:05.628071 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:49:05.623112 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:49:05.198090 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:45:51.577584 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:45:51.572199 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:45:51.190928 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:45:48.969570 | info | HashService | Hashing took - 1ms | 2025-11-04 16:45:48.968379 | info | HashService | Starting hashing of assets | 2025-11-04 16:45:46.955911 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:45:46.953642 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:45:46.225745 | info | DeviceSyncService | Device sync took - 7ms | 2025-11-04 16:45:46.219242 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:45:09.288576 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:45:09.285350 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:45:06.753153 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:41:28.400613 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:41:28.396241 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:41:27.999209 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:41:26.725512 | info | HashService | Hashing took - 0ms | 2025-11-04 16:41:26.724897 | info | HashService | Starting hashing of assets | 2025-11-04 16:41:24.715780 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:41:24.711077 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:41:24.329204 | info | DeviceSyncService | Device sync took - 6ms | 2025-11-04 16:41:24.322152 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:41:23.647363 | info | AppLifeCycleNotifier | Using server URL: null | 2025-11-04 16:40:49.337955 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:40:49.331609 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:40:49.006407 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:40:45.865723 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:40:45.860161 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:40:45.359168 | info | SyncStreamService | Remote sync request for user | 2025-11-04 16:40:43.816627 | info | HashService | Hashing took - 10ms | 2025-11-04 16:40:43.806178 | info | HashService | Starting hashing of assets | 2025-11-04 16:40:41.801498 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:40:41.800177 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 16:40:41.713610 | info | DeviceSyncService | Device sync took - 427ms | 2025-11-04 16:40:41.287020 | info | SyncStreamService | Remote sync request for user | 2025-11-04 15:40:21.208516 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 15:40:21.208304 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-04 15:40:21.208177 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 15:40:19.205850 | info | HashService | Hashing took - 6ms | 2025-11-04 15:40:19.199218 | info | HashService | Starting hashing of assets | 2025-11-04 15:40:17.184588 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 15:40:17.175917 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 15:40:16.449549 | info | SyncStreamService | Remote sync request for user | 2025-11-04 15:40:14.429643 | info | DeviceSyncService | Device sync took - 252ms | 2025-11-04 15:40:14.171763 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 14:15:50.857804 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 14:15:50.857301 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-04 14:15:50.856943 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 14:15:48.855307 | info | HashService | Hashing took - 2ms | 2025-11-04 14:15:48.853133 | info | HashService | Starting hashing of assets | 2025-11-04 14:15:46.842264 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 14:15:46.833684 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 14:15:46.307369 | info | SyncStreamService | Remote sync request for user | 2025-11-04 14:15:44.285979 | info | DeviceSyncService | Device sync took - 288ms | 2025-11-04 14:15:43.992397 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 13:50:38.976412 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 13:50:38.975972 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-04 13:50:38.975788 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 13:50:36.973852 | info | HashService | Hashing took - 6ms | 2025-11-04 13:50:36.967669 | info | HashService | Starting hashing of assets | 2025-11-04 13:50:34.952971 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 13:50:34.949797 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 13:50:34.340756 | info | SyncStreamService | Remote sync request for user | 2025-11-04 13:50:32.320459 | info | DeviceSyncService | Device sync took - 147ms | 2025-11-04 13:50:32.162555 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 13:21:28.423697 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 13:21:28.423387 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-04 13:21:28.422983 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 13:21:26.421526 | info | HashService | Hashing took - 6ms | 2025-11-04 13:21:26.414564 | info | HashService | Starting hashing of assets | 2025-11-04 13:21:24.401144 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 13:21:24.393354 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 13:21:23.518609 | info | SyncStreamService | Remote sync request for user | 2025-11-04 13:21:21.494071 | info | DeviceSyncService | Device sync took - 314ms | 2025-11-04 13:21:21.174436 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 12:43:27.352478 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 12:43:27.352168 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-04 12:43:27.351866 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 12:43:25.349645 | info | HashService | Hashing took - 6ms | 2025-11-04 12:43:25.343436 | info | HashService | Starting hashing of assets | 2025-11-04 12:43:23.329424 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 12:43:23.322789 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 12:43:22.393344 | info | SyncStreamService | Remote sync request for user | 2025-11-04 12:43:20.371944 | info | DeviceSyncService | Device sync took - 238ms | 2025-11-04 12:43:20.128151 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 12:00:11.993699 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 12:00:11.993382 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-04 12:00:11.993219 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 12:00:09.991108 | info | HashService | Hashing took - 6ms | 2025-11-04 12:00:09.984425 | info | HashService | Starting hashing of assets | 2025-11-04 12:00:07.970361 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 12:00:07.961821 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 12:00:06.972128 | info | SyncStreamService | Remote sync request for user | 2025-11-04 12:00:04.965654 | info | DeviceSyncService | Device sync took - 320ms | 2025-11-04 12:00:04.640341 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 11:14:55.456065 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 11:14:55.455715 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-04 11:14:55.455562 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 11:14:53.453942 | info | HashService | Hashing took - 6ms | 2025-11-04 11:14:53.447305 | info | HashService | Starting hashing of assets | 2025-11-04 11:14:51.432433 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 11:14:51.426 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 11:14:50.612559 | info | SyncStreamService | Remote sync request for user | 2025-11-04 11:14:48.596949 | info | DeviceSyncService | Device sync took - 237ms | 2025-11-04 11:14:48.353005 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 09:51:18.378682 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 09:51:18.378366 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-04 09:51:18.378187 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 09:51:16.376574 | info | HashService | Hashing took - 6ms | 2025-11-04 09:51:16.370296 | info | HashService | Starting hashing of assets | 2025-11-04 09:51:14.356169 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 09:51:14.348304 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 09:51:13.743082 | info | SyncStreamService | Remote sync request for user | 2025-11-04 09:51:11.724995 | info | DeviceSyncService | Device sync took - 285ms | 2025-11-04 09:51:11.432237 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 08:31:16.972661 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 08:31:16.972473 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-04 08:31:16.972393 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 08:31:14.971333 | info | HashService | Hashing took - 5ms | 2025-11-04 08:31:14.965686 | info | HashService | Starting hashing of assets | 2025-11-04 08:31:12.950545 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 08:31:12.940939 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 08:31:12.300731 | info | SyncStreamService | Remote sync request for user | 2025-11-04 08:31:10.287879 | info | DeviceSyncService | Device sync took - 226ms | 2025-11-04 08:31:10.053730 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-04 08:08:42.241575 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-04 08:08:42.241309 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-04 08:08:42.241152 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-04 08:08:40.238884 | info | HashService | Hashing took - 7ms | 2025-11-04 08:08:40.231646 | info | HashService | Starting hashing of assets | 2025-11-04 08:08:38.216065 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 08:08:38.207357 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-04 08:08:36.621619 | info | SyncStreamService | Remote sync request for user | 2025-11-04 08:08:34.600759 | info | DeviceSyncService | Device sync took - 236ms | 2025-11-04 08:08:34.353700 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 17:19:41.351496 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 17:19:41.351146 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 17:19:41.350961 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 17:19:39.348682 | info | HashService | Hashing took - 1ms | 2025-11-03 17:19:39.346638 | info | HashService | Starting hashing of assets | 2025-11-03 17:19:37.331121 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 17:19:37.324598 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 17:19:36.809650 | info | SyncStreamService | Remote sync request for user | 2025-11-03 17:19:34.790043 | info | DeviceSyncService | Device sync took - 229ms | 2025-11-03 17:19:34.555553 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 17:00:56.811613 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 17:00:56.811125 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-03 17:00:56.810546 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 17:00:54.809185 | info | HashService | Hashing took - 4ms | 2025-11-03 17:00:54.804089 | info | HashService | Starting hashing of assets | 2025-11-03 17:00:52.789320 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 17:00:52.780565 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 17:00:52.033638 | info | SyncStreamService | Remote sync request for user | 2025-11-03 17:00:50.015536 | info | DeviceSyncService | Device sync took - 359ms | 2025-11-03 17:00:49.647440 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 16:05:30.288039 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 16:05:30.285163 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 16:05:30.284882 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 16:05:28.280510 | info | HashService | Hashing took - 3ms | 2025-11-03 16:05:28.276842 | info | HashService | Starting hashing of assets | 2025-11-03 16:05:26.265070 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 16:05:26.260632 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 16:05:25.670452 | info | SyncStreamService | Remote sync request for user | 2025-11-03 16:05:23.613563 | info | DeviceSyncService | Device sync took - 267ms | 2025-11-03 16:05:23.328551 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 14:50:36.499449 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 14:50:36.499290 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 14:50:36.499181 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 14:50:34.497246 | info | HashService | Hashing took - 4ms | 2025-11-03 14:50:34.492561 | info | HashService | Starting hashing of assets | 2025-11-03 14:50:32.483849 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 14:50:32.481936 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 14:50:31.927427 | info | SyncStreamService | Remote sync request for user | 2025-11-03 14:50:29.911762 | info | DeviceSyncService | Device sync took - 139ms | 2025-11-03 14:50:29.767750 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 14:43:59.301445 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 14:43:59.301362 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-03 14:43:59.301307 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 14:43:57.300535 | info | HashService | Hashing took - 3ms | 2025-11-03 14:43:57.296891 | info | HashService | Starting hashing of assets | 2025-11-03 14:43:55.284224 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 14:43:55.281929 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 14:43:54.574409 | info | SyncStreamService | Remote sync request for user | 2025-11-03 14:43:52.564723 | info | DeviceSyncService | Device sync took - 254ms | 2025-11-03 14:43:52.301078 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 14:01:13.164625 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 14:01:13.164200 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 14:01:13.164024 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 14:01:11.161676 | info | HashService | Hashing took - 3ms | 2025-11-03 14:01:11.158352 | info | HashService | Starting hashing of assets | 2025-11-03 14:01:09.145186 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 14:01:09.138394 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 14:01:08.583246 | info | SyncStreamService | Remote sync request for user | 2025-11-03 14:01:06.567783 | info | DeviceSyncService | Device sync took - 260ms | 2025-11-03 14:01:06.298558 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 13:58:53.375078 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 13:58:53.374793 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 13:58:53.374632 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 13:58:51.372389 | info | HashService | Hashing took - 5ms | 2025-11-03 13:58:51.366315 | info | HashService | Starting hashing of assets | 2025-11-03 13:58:49.353700 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 13:58:49.348006 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 13:58:48.712940 | info | SyncStreamService | Remote sync request for user | 2025-11-03 13:58:46.696516 | info | DeviceSyncService | Device sync took - 238ms | 2025-11-03 13:58:46.453325 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 13:37:26.454096 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 13:37:26.453673 | info | BackgroundWorkerBgService | Android background processing completed in 7s | 2025-11-03 13:37:26.453491 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 13:37:24.451117 | info | HashService | Hashing took - 7ms | 2025-11-03 13:37:24.443697 | info | HashService | Starting hashing of assets | 2025-11-03 13:37:22.427684 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 13:37:22.418678 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 13:37:21.663447 | info | SyncStreamService | Remote sync request for user | 2025-11-03 13:37:19.640534 | info | DeviceSyncService | Device sync took - 214ms | 2025-11-03 13:37:19.411356 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 11:44:23.923556 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 11:44:23.923244 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 11:44:23.923093 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 11:44:21.920611 | info | HashService | Hashing took - 4ms | 2025-11-03 11:44:21.915931 | info | HashService | Starting hashing of assets | 2025-11-03 11:44:19.903016 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 11:44:19.896490 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 11:44:19.205160 | info | SyncStreamService | Remote sync request for user | 2025-11-03 11:44:17.185567 | info | DeviceSyncService | Device sync took - 212ms | 2025-11-03 11:44:16.968438 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 09:11:13.676203 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 09:11:13.675867 | info | BackgroundWorkerBgService | Android background processing completed in 6s | 2025-11-03 09:11:13.675708 | warning | BackgroundWorkerBgService | Remote sync did not complete successfully, skipping backup | 2025-11-03 09:11:11.673883 | info | HashService | Hashing took - 5ms | 2025-11-03 09:11:11.668713 | info | HashService | Starting hashing of assets | 2025-11-03 09:11:09.655494 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 09:11:09.646859 | 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: 6e07a3b0-86fc-4d82-b4ee-a156fd1bfedc, 7d80e6f2-145b-425e-8083-6875103594b3 | 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. 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. 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. ===== 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.. package:immich_mobile/utils/isolate.dart 37 runInIsolateGentle. package:worker_manager/src/worker/worker_io.dart 106 WorkerImpl._anotherIsolate. 2025-11-03 09:11:09.044343 | info | SyncStreamService | Remote sync request for user | 2025-11-03 09:11:07.030031 | info | DeviceSyncService | Device sync took - 317ms | 2025-11-03 09:11:06.709150 | info | BackgroundWorkerBgService | Android background processing started | 2025-11-03 08:01:59.632994 | info | BackgroundWorkerBgService | Cleaning up background worker | 2025-11-03 08:01:59.632664 | info | BackgroundWorkerBgService | Android background processing completed in 7s |