Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-1997

Making non-breaking changes to Device Sync sometimes triggers clientUserError

      How frequently does the bug occur?

      Sometimes

      Description

      A few days ago, we added a new object (model) which, according to the documentation, is a non-breaking change.

      However, we have noticed a few users (~10% so far) triggering the sync manager's error handler with a clientUserError.
      This can become an annoying behavior as we follow up with a logout and users have to re-login.

      We also believe there is another related bug where the clientUserError isn't triggered instantaneously. I'll explain the flow :

      1. User opens the app
      2. App does a Realm.asyncOpen(configuration: config) (with config = partition-based and using recoverOrDiscardUnsyncedChanges) so that we are sure to be 100% sync every time. User is stuck on a loading screen meanwhile.
      3. Upon success, user can finally continue with the app, and we set up one Realm listener on a specific object.
      4. Client User Error is now triggered <- Why only now and not at step 2?

      Unfortunately, we can't reproduce the bug on our side (+ it is too complex to set up the same conditions as our users who are crashing).

      By the way, is there a way to manually trigger a clientUserError? How does the Realm team simulate this error in their unit test?

      Stacktrace & log output

      No response

      Can you reproduce the bug?

      No

      Reproduction Steps

      No response

      Version

      10.33.0

      What Atlas Services are you using?

      Both Atlas Device Sync and Atlas App Services

      Are you using encryption?

      Yes

      Platform OS and version(s)

      iOS 15.x and 16.x

      Build environment

      Xcode version: 14.2
      Dependency manager and version: SPM

            Assignee:
            lee.maguire@mongodb.com Lee Maguire
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: