Closed jonathan-opuscope closed 3 years ago
I can reproduce this in the tutorial app, but when I try to reduce it to a test case it works.
This is fixed by https://github.com/realm/realm-cocoa/pull/7455.
Apologies, I confused this issue with #7447.
Realising that now— though the Smalltalk app does work, so my fix must be a red herring.
I've successfully reproduced this in a reduced test case now. It's a race condition in asyncOpen and so only happens when that is used.
In my case, the issue is that observation on the background thread fires only after forced realm.refresh()
or on local changes. Example project - https://github.com/anton-plebanovich/SingleView/tree/327674397f998a1d668c56afd6322d4409f5f9d8
It doesn't work for both
jf/smalltalk
- https://github.com/anton-plebanovich/SingleView/tree/327674397f998a1d668c56afd6322d4409f5f9d8
tg/sync-notifications
- https://github.com/anton-plebanovich/SingleView/tree/7a7180ef60acb8e66429bb185c1ee93866fb74bc
Actually, it doesn't work even if I pass DispatchQueue.main
for a callbackQueue
.
Not reproducible on version v10.14.0
and introduced in version v10.15.0
.
The cause seems to be Realm Core
Was it fixed?
Hello, this still doesn't work in version 10.18.0! If you connect to the existing realm, subscribe to changes to collections or objects, and then update something on another device or in the collection viewer in the Atlas - observe callback is not called. Is there any news on this?
Looks fine on the latest 10.20.1
Realm - https://github.com/anton-plebanovich/SingleView/tree/bug/realm-observe
Bug occurring in 10.22.0 for me. Has this been solved completely or not? #7456 mentions a bug in realm core.
We're getting the issue on the current
let coreVersionStr = "11.15.0" let cocoaVersionStr = "10.25.2"
Hi guys! Using the latest 10.28.6 we are facing the same issue but in some particular circumstances. When we try the Realm.asyncOpen() and tasks.observe() for the first time everything is fine and the callback with changes is fired properly. But when we cancel the task and log out, doing the Realm.asyncOpen() + tasks.observe() for the second time, the issue occurs to happen. After the realm.refresh() the callback is fired but only once, so it doesn’t fix the problem for the next changes.
How frequently does the bug occur?
All the time
Description
Using the tutorial task tracker app, the expected sync behavior (which is observed on the .NET and Android tutorial apps) is that when i make a change to a task in the backend the observe callback is called immediately on the client iOS SDK Results
What actually happens is that the observe callback is not called immediately. However if I change the status of another task on the iOS client, I get all the previous expected observe callbacks in one burst which seems to indicate that the sync occurred correctly but the callback was not called.
I might be doing something wrong as I'm not too familiar with the system but this is unchanged tutorial app, tried waiting for realm sync session connection and different ways of opening the realms but still observe the same behavior.
Stacktrace & log output
No response
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
Realm 10.15.1 RealmDatabase 11.4.1
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iPadOS 15.0
Build environment
Xcode version: 13.0 Dependency manager and version: Realm 10.15.1 RealmDatabase 11.4.1