realm-swift: [realm-core-2.8.1] Assertion failed: m_schema_version != ObjectStore::NotVersioned

Reported by a user from HelpScout: https://secure.helpscout.net/conversation/381267285/10294/?folderId=440773

Pods/Realm/Realm/ObjectStore/src/shared_realm.cpp:358: [realm-core-2.8.1] Assertion failed: m_schema_version != ObjectStore::NotVersioned
0 Realm 0x00000001042c23d0 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 44
1 Realm 0x00000001042c26a8 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 388
2 Realm 0x00000001040c1e04 _ZN5realm5Realm17set_schema_subsetENS_6SchemaE + 312
3 Realm 0x000000010400d704 +[RLMRealm realmWithConfiguration:error:] + 5476
4 RealmSwift 0x00000001055b489c _TTOFCSo8RLMRealmCfzT13configurationCSo21RLMRealmConfiguration_S_ + 160
5 RealmSwift 0x00000001055b4b8c _TFC10RealmSwift5RealmcfzT13configurationVS0_13Configuration_S0_ + 600
6 RealmSwift 0x00000001055b4f38 _TFC10RealmSwift5RealmCfzT13configurationVS0_13Configuration_S0_ + 488
7 0x00000001006adfd4 _TFFFC1214KMRealmManager6updateFT6objectCS_8MFYImage6paramsGVs10DictionarySSP___T_U_FT_T_U_FT_T_ + 640
8 0x00000001006ae138 _TTRXFo__zoPs5Error__XFo__iT_zoPS___ + 36
9 libswiftObjectiveC.dylib 0x00000001061196b4 _TF10ObjectiveC15autoreleasepoolurFzT8invokingFzT_x_x + 68
10 0x00000001006adc5c _TFFC1214KMRealmManager6updateFT6objectCS_8MFYImage6paramsGVs10DictionarySSP___T_U_FT_T_ + 240
11 0x000000010057fde8 _TTRXFo___XFdCb___ + 44
12 libdispatch.dylib 0x0000000180fa5200 <redacted> + 24
13 libdispatch.dylib 0x0000000180fa51c0 <redacted> + 16
14 libdispatch.dylib 0x0000000180fb3444 <redacted> + 928
15 libdispatch.dylib 0x0000000180fa89a8 <redacted> + 652
16 libdispatch.dylib 0x0000000180fb538c <redacted> + 572
17 libdispatch.dylib 0x0000000180fb50ec <redacted> + 124
18 libsystem_pthread.dylib 0x00000001811ae2b8 _pthread_wqthread + 1288
19 libsystem_pthread.dylib 0x00000001811adda4 start_wqthread + 4
IMPORTANT: if you see this error, please send this log to help@realm.io.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Sorry for the misunderstanding:

  1. Yes, my issue is fixed 😃
  2. In general, any (tgoyne) hints about how to make Realm properly close, is welcomed (on my side ) 😃

@WiesnerPeti Really sorry about the lacking response here! I know tgoyne wanted to write up something for you, but he has been rather backlogged for a while. The gist of it is that until we can make this easier for you, you will have to ensure that you don’t use a realm that isn’t properly closed. tgoyne may be able to give you more hints on how to do that when he frees up.

HI @bmunkholm , I got the same issue. it keeps throws this issue in my Xcode. the Realm file is created but empty without any models. And I don’t know how to make it work again.

realm Version: 3.19.0

/Users/mac/code/3-bitmark/ourbeat/ios/Pods/Realm/Realm/ObjectStore/src/shared_realm.cpp:433: [realm-core-5.23.5] Assertion failed: m_schema_version != ObjectStore::NotVersioned
0   Realm                               0x000000011136c29c _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Realm                               0x000000011136c556 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 390
2   Realm                               0x0000000111054e9d _ZN5realm5Realm17set_schema_subsetENS_6SchemaE + 189
3   Realm                               0x0000000110f7e878 +[RLMRealm realmWithConfiguration:error:] + 2104
4   RealmSwift                          0x00000001126afcd1 $sSo8RLMRealmC13configurationABSo0A13ConfigurationC_tKcfCTO + 145
5   RealmSwift                          0x00000001126afe87 $s10RealmSwift0A0C13configurationA2C13ConfigurationV_tKcfC + 183
6   OurBeat Dev                         0x000000010e73dca2 $s11OurBeat_Dev11RealmConfigO07currentD00D5Swift0D0CyKFZ + 850
7   OurBeat Dev                         0x000000010e7386d1 $s11OurBeat_Dev7StorageC28performSerialBackgroundWrite33_0FFAEE7E3C7FDDC84B4052F48C9C9023LL10writeBlock010completionR0yy10RealmSwift0T0CKc_ys5Error_pSgcSgtFyycfU_ + 97
8   OurBeat Dev                         0x000000010e72121d $sIeg_IeyB_TR + 45
9   libdispatch.dylib                   0x0000000116093dd4 _dispatch_call_block_and_release + 12
10  libdispatch.dylib                   0x0000000116094d48 _dispatch_client_callout + 8
11  libdispatch.dylib                   0x000000011609b5ef _dispatch_lane_serial_drain + 788
12  libdispatch.dylib                   0x000000011609c17f _dispatch_lane_invoke + 422
13  libdispatch.dylib                   0x00000001160a7a4e _dispatch_workloop_worker_thread + 719
14  libsystem_pthread.dylib             0x0000000116510763 _pthread_wqthread + 290
15  libsystem_pthread.dylib             0x00000001165105c3 start_wqthread + 15!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.