Realm Crashes on App Startup [React-Native]
See original GitHub issueHow frequently does the bug occur?
All the time
Description
I have a rather strange bug. It only appears when creating a release build of the ios app. Realm will crash the app right away. I’m using RealmJS version 11.0.0-rc.1 which should be the proper version according to the compatibility matrix. I am on Expo version 46.0.16 and using Hermes.
Local builds work fine, but when I build for release the app crashes instantly on startup. Sadly I produce my release builds through EAS, so getting dsym for the crash log is a little tricky. However, after much fiddling around, I believe the crash is related to building the app with Static Frameworks turned on.
Sadly, I really need this setting enabled as our app also uses React-Native Firebase and enabling Static Frameworks is a requirement for their more recent versions.
Perhaps the compatibility matrix needs updating or I would love to know if you have some sort of workaround or patch I can perform
Stacktrace & log output
Sadly this is non-symbolicated:
Thread 12 Crashed:
0 libsystem_kernel.dylib 0x1ddbfa200 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1ede371ac pthread_kill + 268
2 libsystem_c.dylib 0x1a8a493f4 __abort + 128
3 libsystem_c.dylib 0x1a89f1cac abort + 192
4 libc++abi.dylib 0x1edd79b8c abort_message + 132
5 libc++abi.dylib 0x1edd69a80 demangling_terminate_handler() + 336
6 libobjc.A.dylib 0x19a8d9eec _objc_terminate() + 144
7 SaidThatDEV 0x104aa75d4 0x104474000 + 6501844
8 libc++abi.dylib 0x1edd78f28 std::__terminate(void (*)()) + 20
9 libc++abi.dylib 0x1edd7becc __cxa_rethrow + 148
10 libobjc.A.dylib 0x19a8d5854 objc_exception_rethrow + 44
11 CoreFoundation 0x1a15892a8 CFRunLoopRunSpecific + 808
12 SaidThatDEV 0x104f58d10 0x104474000 + 11422992
13 Foundation 0x19b9a6ce8 __NSThread__start__ + 716
14 libsystem_pthread.dylib 0x1ede316cc _pthread_start + 148
15 libsystem_pthread.dylib 0x1ede30ba4 thread_start + 8
Can you reproduce the bug?
Yes, always
Reproduction Steps
Create a release build of the app on EAS 46.0.16, with realm version 11.0.0-rc.1 and static frameworks turned on using the ‘expo-build-properties’ package. The app will build successfully, but crash on launch.
Version
11.0.0-rc.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
ios 15.2
Build environment
Which debugger for React Native: …
Cocoapods version
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:17 (6 by maintainers)
Experiencing the same issue on production iOS build after installing
app
andcrashlytics
packages from@react-native-firebase
. The issue output mentions missing Realm constructor@kneth Yup, sorry for not specifying. I was implying it through my usage of Expo 47, but I’m on RN version 0.70.5. Also still no issues 🎊