-
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.create Crashes Android Emulator with a SIGABRT fatal error 6 when called from inside Redux Thunk #3968
Comments
Thank you for repoting it. Let us read your report once more - and digest it - before answering. |
Thanks @kneth for the prompt reply. I just edited the original report to include the written stack trace of the Flipper Crash Report, which I accidentally left out initially. |
@jimfoambox I'm not sure if this is related to the issue, but we have many problems being with being compatible with react-native-reanimated v2, which should clear up after we have hermes support. Can you try version 1 and see if the issue persists? |
@takameyer thank you so much for this: downgrading react-native-reanimated to version 1.13.3 worked! The downgrade was a little finnicky, so in case anyone else is attempting this work-around these are the steps that worked for me: 1.)
6.) Removed:
and
in MainApplication.java in the android directory. These steps are a mix-and-match that I pulled from here: software-mansion/react-native-reanimated#399 and it appears somewhat project dependent so trying some other ideas from that thread may work in case what worked for me doesn't work for someone else. Big thanks to @kneth , @takameyer , @realm-support: very much appreciate your patience and enthusiasm to help. Very much looking forward to the new Hermes supported version of Realm! |
@jimfoambox thanks for providing the steps to downgrade! Hopefully that helps others in the future. |
How frequently does the bug occur?
All the time
Description
I have been attempting to set up an environment when upon a User Logging into a React Native App, a Redux thunk makes an API call that authenticates the user, and then the local user instance is either newly created or instantiated from the local Realm Database. Other thunks populate this Realm local database with relevant info when their API calls are made. So far my set up works 100% fine in IOS simulator, and the realm.default file for IOS reflects all the information as desired from my schema and calls, etc. With Android, however, the app silently crashes 100% of the time, with no relevant error messages in Metro, but a SIGABRT Fatal Error 6 message in Android Studio and Flipper.
Calling other Realm functions in the thunk, like deleteAll(), causes no issues. It is only when realm.create() is invoked.
In addition, realm.create invoked in other parts of the App, like within React components, causes no issues and behaves as expected.
Here is the Thunk :
which is then exported in a new instance via an index file (which is what is imported into the thunk):
Hermes has been disabled in both IOS and Android.
Because the stack trace from Flipper is so huge, I thought it might be easier to read from these screenshots:
I am completely new to Realm, about 6 months experience in React Native. Thanks in advance for any help, I realize this is a lot of code and info, and had I not been banging my head against the wall for the last 2 days without finding anything else online that worked I wouldn't have resorted to opening a new issue.
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.7.0, 10.5.0
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
Realm JS 10.7.0, I am on a Macbook Pro Big Sur, the Android emulator is failing on multiple APIs (tested on 26,29,30)
Build environment
"react-native": "0.64.1"
"react-native-reanimated": "^2.2.1"
"realm": "^10.7.0"
"redux": "^4.1.0"
"redux-logger": "^3.0.6"
"redux-thunk": "^2.3.0"
"react": "17.0.1"
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "^6.0.0",
"@react-native-firebase/app": "^12.2.0",
"@react-native-firebase/crashlytics": "^12.2.0",
The text was updated successfully, but these errors were encountered: