-
Type:
Bug
-
Resolution: Incomplete
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sync
How frequently does the bug occur?
Sometimes
Description
The crash occurs from time to time and triggers at :
`Realm.asyncOpen(configuration: getFlexibleConfig()) { (result) in
}`
configuration :
func getFlexibleConfig() -> Realm.Configuration{ let user = app!.currentUser var config = user!.flexibleSyncConfiguration(initialSubscriptions: { subs in subs.append( QuerySubscription<uploads> { $0.deviceId == self.RLM_DEVICE_ID && $0.realmUserId == user!.id }) },rerunOnOpen: true) config.objectTypes = [uploads.self,place.self,details.self] return config }
Right after the auth using
login(credentials: Credentials.emailPassword(email: username, password: password))
Stacktrace & log output
/Users/realm/workspace/realm_realm-core_release_12.11.0/src/realm/sync/client.cpp:1002: [realm-core-12.11.0] Assertion failed: m_flx_latest_version <= version 0 Realm 0x00000001040de154 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28 1 Realm 0x00000001040de09c _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 328 2 Realm 0x0000000104109434 _ZN5realm4sync14SessionWrapper17on_flx_sync_errorExNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE + 412 3 Realm 0x0000000104138898 _ZN5realm4sync10ClientImpl10Connection27receive_query_error_messageEiNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEExy + 236 4 Realm 0x0000000104134ee4 _ZN5realm5_impl14ClientProtocol22parse_message_receivedINS_4sync10ClientImpl10ConnectionEEEvRT_NSt3__117basic_string_viewIcNS8_11char_traitsIcEEEE + 360 5 Realm 0x0000000104132ab4 _ZN5realm4sync10ClientImpl10Connection33websocket_binary_message_receivedEPKcm + 60 6 Realm 0x0000000104191ea8 _ZN12_GLOBAL__N_19WebSocket17frame_reader_loopEv + 1188 7 Realm 0x0000000104184e04 _ZN5realm4util7network7Service9AsyncOper22do_recycle_and_executeINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEJRS7_RmEEEvbRT_DpOT0_ + 152 8 Realm 0x000000010418498c _ZN5realm4util7network7Service14BasicStreamOpsINS1_3ssl6StreamEE16BufferedReadOperINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEE19recycle_and_executeEv + 240 9 Realm 0x00000001041878f0 _ZN5realm4util7network7Service4Impl3runEv + 408 10 Realm 0x000000010410d1b0 _ZN5realm4sync6Client3runEv + 36 11 Realm 0x0000000104291824 _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN5realm5_impl10SyncClientC1ENS2_INS7_4util6LoggerENS4_ISB_EEEERKNS7_16SyncClientConfigENS_8weak_ptrIKNS7_11SyncManagerEEEEUlvE0_EEEEEPvSN_ + 44 12 libsystem_pthread.dylib 0x000000022d5e19ac _pthread_start + 148 13 libsystem_pthread.dylib 0x000000022d5e0e68 thread_start + 8!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choosedyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
Can you reproduce the bug?
Yes, sometimes
Reproduction Steps
Try Realm.asyncOpen with a flexibleSync configuration that has queries. I did however tested to query with an optional field and saw the crash immediately, it was resolved when I removed that and rebuilt. Then it started to reproduce again without the optional field and any other changes.
Version
10.32.2
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)
IOS 15.6
Build environment
Xcode version: 14.0
Dependency manager and version: Cocoapods 1.11.3
Note: We downgraded the xCode from 14.1 inorder to be able to build Realm 10.32.2. Related Issue