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

SyncManager.errorHandler not fired after read limit error

      Goals

      Be able to handle the SyncError if the change set is too large e.g. by chunking the change set.

      Expected Results

      app.syncManager.errorHandler should get called when I see the following error in the application log

      Error:
      could not decode next message: error reading body failed to read: read limited at 16777217 bytes
      

      Actual Results

      app.syncManager.errorHandler is not called. Occasionally I can see the following message in the xcode console
      ``Sync: Connection[1]: Connection Closed Due to Error``

      Steps for others to Reproduce

      1. Set up a syncManager.errorHandler in your application
      2. Create a large database, and then open a synced realm to trigger the read limited at xxx application error

      Code Sample

      app.syncManager.errorHandler    = {  error, session in
              print("Sync Error ", error) // not fired
      }
      syncedRealm.write {
          //create a lot of rows with blobs 
      }
      

      Version of Realm and Tooling

      <!---
      In the CONTRIBUTING guidelines, you will find a script,
      which will help determining some of these versions.
      -->
      Realm framework version: 10.10.0

      Xcode version: 12.5

      iOS/OSX version: 14.4

            Assignee:
            jason.flax@mongodb.com Jason Flax
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: