-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix: album asset sync must sync new assets in a shared album #20655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6cf750a
to
5fcd42d
Compare
5fcd42d
to
9bd86cd
Compare
33bce32
to
94c57dc
Compare
@@ -139,14 +139,18 @@ class SyncStreamService { | |||
return _syncStreamRepository.updateAlbumUsersV1(data.cast(), debugLabel: 'backfill'); | |||
case SyncEntityType.albumUserDeleteV1: | |||
return _syncStreamRepository.deleteAlbumUsersV1(data.cast()); | |||
case SyncEntityType.albumAssetV1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this down to the section of TO BE REMOVED
so that the user can keep using the v1.137.x
if they haven't updated yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how much I want to maintain backwards compatibility for the beta timeline, doing this means we need to keep the types in the server there so they are generated too. I would just put a note that says albums on beta timeline need you to update to continue working. We have enough to be doing without maintaining compatibility 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not finished syncing because the type is missing
I/flutter (13374): Parsed JSON: {type: AlbumAssetV1, data: {id: 55d2791a-8a08-4ea4-bc28-d36af78a8f6a, ownerId: 7f9087b2-3f6e-4b08-9b8f-f16999c3c89d, originalFileName: IMG_0212.HEIC, fileCreatedAt: 2023-05-02T16:24:05.655Z, fileModifiedAt: 2023-05-02T17:54:47.000Z, localDateTime: 2023-05-02T11:24:05.655Z, type: IMAGE, deletedAt: null, isFavorite: false, visibility: timeline, duration: null, livePhotoVideoId: null, stackId: null, libraryId: null, checksum: PYzuD7wsJJgedORkz9gAu5Qsa3Y=, thumbhash: HfgJBQBTiH+Wpofnh3hoiNw/AckI}, ack: AlbumAssetV1|01983305-99a0-74c9-a39a-6a76da61eae0}
I/flutter (13374): [SEVERE] [2025-08-05 09:42:55.456653] [SyncApiRepository] Error processing stream
I/flutter (13374): Error: Null check operator used on a null value
I/flutter (13374): Stack: #0 SyncApiRepository._parseLines (package:immich_mobile/infrastructure/repositories/sync_api.repository.dart:119:61)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and worked well, although it is breaking when connecting to instance v1.137.x and v1.136.x
Fixes #20458
Fixes an issue with
setTimeout
not actually waiting the2ms
we were asking it to. It turns out that when used with such small values it may or may not actually wait that long. In 1,000 runs,setTimeout(2)
would consistently have a few instances where it waited less than1ms
, resulting in flaky medium tests which rely on the database query happening at least1ms
after the last insert/update.