-
Notifications
You must be signed in to change notification settings - Fork 584
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 Crashes on App Startup [React-Native] #5026
Comments
@marcfrankel It looks like it is similar to #4735. Unfortunately we haven't found a solution yet but you mention "related to building the app with Static Frameworks turned on" which is interesting. |
Do you see the crash if you use the debug build instead? |
@kneth As you can see I commented on that thread, I definitely think they are related. Apologies if I caused a duplicate issue. To answer your question no I do not see the issue with the debug build. Works fine on the simulator. Pretty sure it worked on a debug build for my physical phone too, but I can check again. I believe I've isolated it to working with Static Frameworks off even in release, but I'll also kick off a build rn and re-confirm |
Okay created a couple of builds. Can confirm that toggling Static Frameworks on and off for me seems to control whether or not it fails. So to summarize, having Static Frameworks turned on causes RealmJS V 11.0.0-rc.1 to crash my app running Expo 46.0.16 and Hermes. However, the crash only occurs on release builds. In debug mode, it works for simulators and physical devices. |
@marcfrankel Could be related to expo/expo#19517? |
It very well could be. I was never able to test just static frameworks without Realm Js and the main reason I thought realm was the culprit was that it appeared in the crash logs. However, maybe that's just due to how early realm starts up in the app startup sequence. I'll follow along on these issues. But my guess from looking at those bug reports it likely goes all the way to the top (meaning React Native itself). Not expo. So this fix might be a while. |
I'll leave the issue open, and if either you or we see any updates, we can share them. |
Experiencing the same issue on production iOS build after installing
|
And it works if these packages are not installed? It is similar to #5071. |
I wanted to update that it appears to be working now for us with the following combination of stuff: Expo 47 So I believe we're all good. Thanks to the team for apparently fixing this! Will report back if it regresses |
@marcfrankel Thank you for the update. I imagine you are using React Native 0.70. |
@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 🎊 |
I have a minimal example that reliably reproduces the app crashing on iOS characterized by this issue as well as #5071 and #5083. The particular combination of dependencies:
Steps to reproduce:
Further observations:
Other info about the setup I used to repro the issue:
Sample stack trace on crash (iOS):
Please let me know if I can provide any other info to help figure this one out (or whether I should open a new issue if this comment doesn't belong here). I appreciate you, Realm team! |
I got same issue, app crashed on launching Using: M1
if i uninstall realm. then run app on real device then app working fine any solution? |
Can u please tell me how did you fix this issue I have almost the same combination but still crashes? |
any update on this ?? |
I think this issue can be closed. See #4735. |
This issue has been fixed by expo by upgrading to |
Just to let you know that this still happens on the latest version. Install latest version "realm": "^11.4.0" (i.e. "npm i realm") and the app still crashes on iOS. I haven't tested on Android. When I debugged the app on Xcode I was getting the same error as @klcantrell |
having the same issue on android, did u also downgraded your react native version? |
Mine crashes on first realm.write() |
@FN-FAL113 I will ask you to create a new issue to ensure we get all needed information. |
How 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
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
The text was updated successfully, but these errors were encountered: