realm-js
realm-js copied to clipboard
React native can't get Realm Module on the android when activate new architecture
Description
I enable new architecture on the android and ios with react native 0.69.1. On ios, It's working. But on android, It's can't connect with realm native module.
Stacktrace & log output
Missing Realm constructor. Did you run "pod install".
Can you reproduce a bug?
Yes, always
Reproduction Steps
- in file android/gradle.properties set newArchEnabled=true
- in file android/app/build.gradle set enableHermes: true
- After that, I new Realm connection
const realm = await Realm.open({ path: "testdatabase", schema: [UserSchema], schemaVersion: 1 })
- yarn android
I receive the error below.
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)
Android Simulator '10.1_WXGA_Tablet_API_31(AVD) - 12'
If i set newArchEnabled=false in file android/gradle.properties. it's working on android.
@phanmduong thanks for reporting this. The new architecture is quite experimental, so at the moment we cannot guarantee everything will work when it is activated. We will, however, be working to ensure we are fully compatible with it before it is activated by default.
In any case, we will be investigating this issue.
@takameyer thanks guy, I will wait for you to fix this problem
Same problem here in RN 0.69.4
@phanmduong thanks for reporting this. The new architecture is quite experimental, so at the moment we cannot guarantee everything will work when it is activated. We will, however, be working to ensure we are fully compatible with it before it is activated by default.
In any case, we will be investigating this issue.
@takameyer
The point is that the Realm 11.0.0-rc.1 doesn't work at all with the new version of the react native (react native 0.69 or 0.70rc) when hermes is enable. Not to mention here the new architecture that become a legend.
Try to create a new RN project from the scratch (react native 0.69 or 0.70rc) and then install realm 11.0.0-rc.1. It doesn't work in any circumstances.
I believe that should be a priority for the Realm team, otherwise developers and companies who adopted React Native as solution will not be able to use Realm in their projects anymore. Depending on the project the migration from Realm to Watermelon is a hard task. But I think we're running out of options here.
@joaotmachado Please create a new issue with details on what is not working and how you configured your project. This is definitely a priority for us.
@joaotmachado Please create a new issue with details on what is not working and how you configured your project. This is definitely a priority for us.
here it goes @takameyer thank you in advance: https://github.com/realm/realm-js/issues/4866
@takameyer i updated the issue https://github.com/realm/realm-js/issues/4866 because React Native 0.70 is officially released and as expected Realm doesn`t work at all with 11.0.0-rc.1.
@joaotmachado Please try to upgrade to RJS v10.2.0.
This should be fixed for the latest Realm at v11 and react-native
at v70