realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Realm incompatible with Expo 45 on Android

Open takameyer opened this issue 3 years ago • 7 comments

How frequently does the bug occur?

All the time

Description

There appears to be a conflict with Realm and Expo 45 when running on Android. The symptoms are similar to our incompatibility with react-native-reanimated v2 (see https://github.com/realm/realm-js/issues/4176). As soon as Realm data is accessed, the running application will crash.

Stacktrace & log output

No response

Can you reproduce the bug?

Yes, always

Reproduction Steps

Use our expo templates and run on android.

Version

10.19.1

What SDK flavour are you using?

Atlas Device Sync

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

takameyer avatar Jun 10 '22 09:06 takameyer

We will be focusing on our Hermes branch to solve this problem. In the meantime, we do not recommend updating expo to SDK 45 if you are using Realm.

takameyer avatar Jun 10 '22 09:06 takameyer

@takameyer thanks for documenting this. I see that there is a warning about this in the Realm React Native docs here as well, which is helpful. Could be useful to link to this issue here too so others can follow the updates.

I'm not familiar with the internal Hermes project, but is there an ETA on when that's expected to land in master? Would this be fixed in v46 of the Expo SDK, or would it be a minor version like 45.X? Trying to assess how long we'll be locked on v44 for. Thanks!

tsheaff avatar Jun 28 '22 23:06 tsheaff

Could be useful to link to this issue here too so others can follow the updates.

@tsheaff Good idea 🙂

I'm not familiar with the internal Hermes project, but is there an ETA on when that's expected to land in master? Would this be fixed in v46 of the Expo SDK, or would it be a minor version like 45.X?

We are currently digging into a performance regression in the Hermes branch, which needs to be addressed before this hits master. That being said, I'll see if we can get a new -beta or -rc release in the near future, so that others can opt in and test out Expo 45 with Realm.

takameyer avatar Jun 29 '22 06:06 takameyer

Thanks so much @takameyer , sounds like the update is rather imminent either way. I'll be following along. Cheers.

tsheaff avatar Jun 30 '22 05:06 tsheaff

We have two release candidates. v11.0.0-rc.0 will work with Expo 45 and v11.0.0-rc.1 will work with React Native 0.69.1. @realm/react version 0.3.2 will work with both of these releases.

takameyer avatar Jul 14 '22 11:07 takameyer

@takameyer Hi, I was trying version 10.19.5 with react-native 0.67.3. It also crashes the first time realm is accessed. I've uninstalled react-native-reanimated.

Which realm version should I've tried? I was testing the hermes branch, but I hit some performance issues.

The error is a SIGSEV caused by a null pointer dereference.

sdandois avatar Jul 18 '22 19:07 sdandois

@sdandois That should be compatible. Feel free to create a separate issue containing any logs of the error, the platform on which the crash occurs and your package.json so we can try and reproduce it. A sample project the reliably reproduces the crash would also be very helpful.

takameyer avatar Jul 19 '22 05:07 takameyer

Is there an ETA for the fix?

solrubado avatar Aug 17 '22 12:08 solrubado

@solrubado We have a great deal of improvements and breaking changes we need to finish before the v11 is ready for release. In the meantime, the release candidates I posted earlier are available.

takameyer avatar Aug 17 '22 13:08 takameyer

Closing this issue, as the solution is to use v11. If you would like to use Expo 45 and greater, please use one of our RC releases.

takameyer avatar Aug 17 '22 14:08 takameyer

@takameyer Please update the docs as it still points to this issue.

https://www.mongodb.com/docs/realm/sdk/react-native/install/

ansh avatar Sep 04 '22 08:09 ansh