realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.78k stars 575 forks source link

Conflict between Realm and Reanimated 2 #3878

Closed bnobre closed 3 years ago

bnobre commented 3 years ago

Goals

I'm trying to install Realm along with Reanimated 2 without preventing my app from loading.

Expected Results

Install Realm together with Reanimated 2 without preventing my app from loading.

Actual Results

I am using React Navigation with Drawer. It keeps showing the alert "If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation" and that's why I need to install Reanimated 2.

The problem is that I use Realm SDK to connect my app to MongoDB Atlas and when I configure Reanimated 2 according to the steps on the site the app just doesn't load and doesn't show any errors in Metro Bundler.

If I remove Realm the program opens normal and without the Reanimated 2 alert. If I revert the configuration of the Reanimated 2 the program opens, but the alert persists "If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation".

Another thing, when Realm is installed I always get the following alert when running react-native run-android: “Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.”.

Steps to Reproduce

1 - Start a new project: react-native init testApp 2 - Install the Realm with the command: yarn add realm 3 - Install the Reanimated 2 with the following steps: https://docs.swmansion.com/react-native-reanimated/docs/installation] 4 - Start the app: react-native run-android

Version of Realm and Tooling

KyoungHwanLee commented 3 years ago

~~I think it's because you turned hermes on. Reanimated2 supports JSC. Just try turn off hermes~~

@bnobre I tested it just now and got some bugs. In my case, app launched successfully but couldn't create any object. Anyway, it seems to be a problem 😰

bnobre commented 3 years ago

I think it's because you turned hermes on. Reanimated2 supports JSC. Just try turn off hermes

Hi @KyoungHwanLee . I turned off hermes, but the problem persists.

takameyer commented 3 years ago

Closing. Please move discussion to #3837