Skip to content
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

Android App crash instantly after add Realm + React Navigation Drawer (screens/gesture handler/hermes) #4301

Closed
gabrielporcher opened this issue Feb 2, 2022 · 5 comments

Comments

@gabrielporcher
Copy link

gabrielporcher commented Feb 2, 2022

How frequently does the bug occur?

All the time

Description

Hello,

I'm working on a fresh react native project (CLI). So I started adding and configuring React navigation (Stack and Drawer). Also i added React-native gesture handler, react native screens and hermes (because both are dependencies to react navigation). Until here, everything was fine.

After this, I added MongoDB Realm (npm install realm) but then my app started to fail. The app install with build successful, but when I try to open app in emulator it just close instantly, without any errors. The only messaged displayed is this:

error

I spent a whole day researching and trying to fix it, but i just couldnt do anything.

So I created a new project and started in reverse way. First, installed and configured Realm, and everything was fine. Then, I added react-navigation stack and still ok. But when I added react native navigation Drawer and configured its dependencies (gesture handler and react native screens, also I had to enable hermes because its a screens must have) the app started to crashes exactly the same as the previous app.

I tried to fix it in so many ways but nothing seems to work. I'm starting to get desperate, because it's been 2 days since I can't do anything in my app :C

In addition, I just cant create a log because my app doesnt even start.

Stacktrace & log output

I cant make a log because my app even start.

Can you reproduce the bug?

Yes, always

Reproduction Steps

  • Add Realm
  • Add react navigation/drawer
  • Add react-native-gesture-handler
  • Add and configure react-native-screens
  • enable hermes

Version

30

What SDK flavour are you using?

MongoDB Realm (i.e. Sync, auth, functions)

Are you using encryption?

No, not using encryption

Platform OS and version(s)

Android

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

@gabrielporcher
Copy link
Author

I forgot to mention that i had to add react-native-reanimated too for the react-navigation/drawer.
Then I just saw #4176 and looks like Realm isnt compatible with reanimation V2. I'll try to change it to V1 and see what happens next

@takameyer
Copy link
Contributor

@gabrielporcher alternatively, you can try our Hermes release branch, which is compatible with reanimated v2:

npm install realm@hermes

Let us know if that helps!

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Feb 3, 2022
@gabrielporcher
Copy link
Author

gabrielporcher commented Feb 3, 2022

Hi @takameyer,

Last night I was debuggin my app dependencies and doing some researches to found the root of the problem, and i found your commentary #3837 .

I tried your Hermes release branch and looks like its working perfectly with reanimated v2.

Thank you!

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Feb 3, 2022
@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Feb 4, 2022
@sync-by-unito sync-by-unito bot closed this as completed Feb 4, 2022
@takameyer
Copy link
Contributor

@gabrielporcher Happy its working for you :)

@ansh
Copy link

ansh commented Sep 12, 2022

@takameyer is Realm JavaScript v11.0.0-rc.1 this version compatible with RN 0.66 and below 0.69? Because, v11.0.0-rc.0 is compatible with those.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants