-
Type: Bug
-
Resolution: Incomplete
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
Sometimes
Description
We are experiencing corruptions of Realm databases following client resets triggered by permission/role changes on the server. This issue is not reliably reproducible, and unfortunately, we do not have logs to provide more insight. We only have the incorrect Realm files, which we have examined using Realm Studio.
It is suspected that this issue may arise when the client undergoes multiple client resets in quick succession.
It appears there may be flaws in the client reset logic that need to be addressed!
Stacktrace & log output
No response
Can you reproduce the bug?
No
Reproduction Steps
Roughly speaking, our scenario is as follows
- We manage SyncPermissions via CustomUser data. Any change in this data typically triggers a client reset.
- We handle projects. When a project is added, a Server-Trigger adds a Managed-Team object to the project. This change also modificats our Permission-Properties to the CustomUser data.
- A client reset occurs, and usually, everything on the client side appears as it should. However, when a project is deleted, another trigger modifies the CustomUser data changing permissions again, leading to another client reset.
Due to the above workflow, situations may arise where multiple client resets occur in quick succession due to permission/role changes on the server.
However, in some cases, the following issues have been observed:
- The ManagedTeam object, which should be added to the Project object by the server trigger, is missing after the client reset.
- Lists containing the Project object, or Lists that are included in the project, display incorrect behavior: contents appear duplicated and incorrectly structured (In Realm Studio the List-Elements are duplicated but share the same index) When the Realm is opened in Realm Studio, it seems that identical objects appear duplicated. (Screenshot from RealmStudio attached)
Version
<= 10.49.1
What Atlas Services are you using?
Atlas Device Sync
Are you using encryption?
No
Platform OS and version(s)
macOS
Build environment
Xcode version: ...
Dependency manager and version: ...