-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Realm-JS and RealmSwift integration in a React Native application doesn't work when compiled with Xcode 9. #1440
Comments
@rajeshdongre Just to absolutely sure: you only see this crash with Xcode 9? Can you provide us with a sample app with can reproduce the crash? You are welcome to send it privately to [email protected]. |
@kneth Thank you for your quick response. Answer to your first question is Yes. We were using above mentioned Realm-JS SDK and RealmSwift versions for our brownfield application with Xcode 8. I will share a sample application which will resemble our existing application over [email protected]. |
@kneth I tried to email you Sample application, which explains the scenario that we are facing in our app. But email got rejected by [email protected]. Finally I uploaded the same source on Github repository. Please have a look at https://github.com/rajeshdongre/RNRealmSample repo. Sample app doesn’t include node_modules, so it will need ‘npm install’ to be executed before running the application using Xcode 8/9. |
Sorry to hear that you had issues email us. What was the error message? I believe we have seen issues with Xcode 9 and we need to investigate a bit more. |
@kneth Once again thank you for your quick response. When I tried to send an email with Sample app attached, it gave me below error: [email protected] ([email protected]) mx.google.com gave this error: |
@rajeshdongre Looks like Google is blocking emails if you attached zip files. I better stop asking people to send us files but ask them to provide a link to the file 😄 |
@kneth Were you able to replicate the issue? Let me know if you need help in replicating the same. |
Hello @kneth and @bmunkholm, We have a project depending on getting a fix to this issue. Our due date is mid December. Can you provide status update on the fix or how we can move forward on this issue? Your urgent resonse is greatly appreciated. |
Version 2.1.0 tries to improve the situation with Xcode 9. Please upgrade. |
@kneth and @bmunkholm, We are seeing the same issue on version 2.1.0 as well. Can you please confirm? |
@msimons0 Thanks for the update. Is it the mixture of Realm JS and Realm Swift which is causing the issue? Do you have a simple project to share? |
@kneth Yes that's possible. I'm able to replicate the exact same issue with @rajeshdongre's app at https://github.com/rajeshdongre/RNRealmSample |
@kneth Any updates? |
@msimons0 No progress to report but one issue could be that Realm JS 1.3.x and Realm Swift 2.7.x are using a different Realm Core version. You might be better off with Realm Swift 2.8, 2.9 or 2.10. |
@kneth As suggested by you, we tried using updated version of Realm Swift but with no success. We even used updated version of Realm JS. We have updated the old sample application shared with you (https://github.com/rajeshdongre/RNRealmSample). |
@kneth I have run into the same issue while integration Realm js and Realm swift , have you guys found any solution? |
@kbs95 To be honest, we haven't had time to investigate a solution. |
This is the output I get, in case it helps any. RealmSwift 3.3.0
|
@thatjuan It looks like a crash when doing a query. Do you by any chance do the query on another thread that where the Realm was opened? |
I'm also experiencing same problem but I'm using Realm for objective-C
It occured first with the same Realm core version 4.0.2
I updated to latest with the same Realm core version 5.4.0
|
Tried latest version objc dynamic/static realm framework with react native realm.
And I found the error had nothing to do with the objc code, just related to framework itself. You don't need to write any native objc code, just add the dynamic framework, then the app crashed. |
@rajeshdongre did you manage to solve this issue? If so, could you share how do you guys configure the project to use both react native and native with realm? I am able to do this in Android, but can't figure it out on iOS. |
I'm hitting the same issue on iOS when trying to share realms between React Native and Native. Works perfect on the Android side but on iOS I hit the following...
I'm using Is sharing realms between React Native and Native something that should work (and is supported)? |
@mrbrentkelly We haven't actively worked on it so your mileage may vary. I think the hard part is to get the package dependency on iOS/Xcode right. Do you have a complete stack trace from the assertion? |
@kneth sure thing...
|
It is similar to #884. |
@kneth is there any progress on the issue? Could you please suggest any working workarounds? Any method mentioned on related threads fails. |
@dsemenov Just returned from vacation so no progress to report. It comes up regularly, and it is a useful feature. I hope that we will be able to return to it later this year but I can't promise it. |
Hi @rajeshdongre I was having this issue you have described and have managed to fix it in my project. I am using RealmSwift 3.20.0 and RealmJS 3.4.2. RealmJS as of 3.4.0 includes a podspec which allows you to do a pod install instead of manually linking. I assume this means that the core issue causing this error is a linking issue. |
I will close the issue as we finally have support for it. Please see the comment above! |
➤ Kenneth Geisshirt commented: Fixed by suppoting Podspec (from Realm JavaScript v3.4.0). |
Hi,
We are writing a brownfield React Native application wherein we need realm-js as well as RealmSwift integration. It worked till date with realm-js version 1.3.1 and RealmSwift version 2.7.0. But when we are trying to migrate to Xcode 9, we are getting below mentioned runtime error logs. If you could help us on the same.
Error logs
`table.cpp:2665: [realm-core-2.6.0] Assertion failed: dynamic_cast<Parent*>(array_parent)
0 MyApp 0x00000001101ac55f _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 40
1 MyApp 0x00000001101ac920 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 445
2 MyApp 0x00000001102610a7 _ZNK5realm5Table20get_parent_table_ptrEPm + 183
3 MyApp 0x000000010ff157ed _ZNK5realm5Table12bump_versionEb + 221
4 MyApp 0x000000011025f923 _ZN5realm5Table16insert_empty_rowEmm + 103
5 MyApp 0x000000011005a445 _ZN5realm5Table13add_empty_rowEm + 69
6 MyApp 0x000000011005964a _ZN5realm6Object6createIPK13OpaqueJSValuePK15OpaqueJSContextEES0_T0_NSt3__110shared_ptrINS_5RealmEEERKNS_12ObjectSchemaET_b + 1370
7 MyApp 0x0000000110103740 _ZN5realm2js10RealmClassINS_3jsc5TypesEE6createEPK15OpaqueJSContextP13OpaqueJSValueS9_mPKPKS8_RNS0_11ReturnValueIS3_EE + 1152
8 MyApp 0x00000001100d2065 ZN5realm2js4wrapIXadL_ZNS0_10RealmClassINS_3jsc5TypesEE6createEPK15OpaqueJSContextP13OpaqueJSValueSA_mPKPKS9_RNS0_11ReturnValueIS4_EEEEEESC_S8_SA_SA_mSE_PSC
9 JavaScriptCore 0x0000000116ee84e5 _ZN3JSC19APICallbackFunction4callINS_18JSCallbackFunctionEEExPNS_9ExecStateE + 501
10 JavaScriptCore 0x0000000116ff7d01 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 577
11 JavaScriptCore 0x0000000117000f7d llint_entry + 27269
12 JavaScriptCore 0x0000000116ffa310 vmEntryToJavaScript + 304
13 JavaScriptCore 0x0000000116e8b2ef _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 127
14 JavaScriptCore 0x0000000116e51981 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 433
15 JavaScriptCore 0x0000000116b429a2 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 178
16 JavaScriptCore 0x0000000116f4c3bd JSObjectCallAsFunction + 461
17 MyApp 0x000000010ff52529 ZN5realm2js8FunctionINS_3jsc5TypesEE4callEPK15OpaqueJSContextRKP13OpaqueJSValueSB_mPKPKS8 + 89
18 MyApp 0x0000000110104a0b _ZN5realm2js10RealmClassINS_3jsc5TypesEE5writeEPK15OpaqueJSContextP13OpaqueJSValueS9_mPKPKS8_RNS0_11ReturnValueIS3_EE + 331
19 MyApp 0x00000001100d23f5 ZN5realm2js4wrapIXadL_ZNS0_10RealmClassINS_3jsc5TypesEE5writeEPK15OpaqueJSContextP13OpaqueJSValueSA_mPKPKS9_RNS0_11ReturnValueIS4_EEEEEESC_S8_SA_SA_mSE_PSC + 101
20 JavaScriptCore 0x0000000116ee84e5 _ZN3JSC19APICallbackFunction4callINS_18JSCallbackFunctionEEExPNS_9ExecStateE + 501
21 JavaScriptCore 0x0000000116ff7d01 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 577
22 JavaScriptCore 0x0000000117000f7d llint_entry + 27269
23 JavaScriptCore 0x00000001170012c6 llint_entry + 28110
24 JavaScriptCore 0x00000001170012c6 llint_entry + 28110
25 JavaScriptCore 0x0000000117000f8b llint_entry + 27283
26 JavaScriptCore 0x00000001170012c6 llint_entry + 28110
27 ??? 0x00000587e50acfcf 0x0 + 6081221414863
28 ??? 0x00000587e50aa53d 0x0 + 6081221403965
29 JavaScriptCore 0x0000000117000f8b llint_entry + 27283
30 JavaScriptCore 0x0000000116ffa310 vmEntryToJavaScript + 304
31 JavaScriptCore 0x0000000116e8b2ef _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 127
32 JavaScriptCore 0x0000000116e515b3 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 13075
33 JavaScriptCore 0x0000000116b9f13f _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 303
34 JavaScriptCore 0x0000000116ee65d0 JSEvaluateScript + 432
35 MyApp 0x000000010fb0e691 _ZL24executeApplicationScript12TaggedScriptP5NSURLP20RCTPerformanceLoggerP15OpaqueJSContext + 1873
36 MyApp 0x000000010fb18470 __64-[RCTJSCExecutor executeApplicationScript:sourceURL:onComplete:]_block_invoke + 496
37 MyApp 0x000000010fb187df -[RCTJSCExecutor executeBlockOnJavaScriptQueue:] + 335
38 Foundation 0x000000011434b948 __NSThreadPerformPerform + 334
39 CoreFoundation 0x000000011565a2b1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
40 CoreFoundation 0x00000001156f9d31 __CFRunLoopDoSource0 + 81
41 CoreFoundation 0x000000011563ec19 __CFRunLoopDoSources0 + 185
42 CoreFoundation 0x000000011563e1ff __CFRunLoopRun + 1279
43 CoreFoundation 0x000000011563da89 CFRunLoopRunSpecific + 409
44 MyApp 0x000000010fb0c989 ﹍[RCTJSCExecutor runRunLoopThread]﹍ 489
45 Foundation 0x00000001143138ac NSThread__start + 1197
46 libsystem_pthread.dylib 0x000000011bc2593b _pthread_body + 180
47 libsystem_pthread.dylib 0x000000011bc25887 _pthread_body + 0
48 libsystem_pthread.dylib 0x000000011bc2508d thread_start + 13
IMPORTANT: if you see this error, please send this log to [email protected].`
Please suggest if any other workaround is available.
The text was updated successfully, but these errors were encountered: