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

Reanimated breaks Realm on Android #2028

Closed
1 of 3 tasks
limpbrains opened this issue May 17, 2021 · 8 comments
Closed
1 of 3 tasks

Reanimated breaks Realm on Android #2028

limpbrains opened this issue May 17, 2021 · 8 comments
Labels
Bug bug-bash-jan22 Issues visited during Bug Bash Jan 2022 🏠 Reanimated 2

Comments

@limpbrains
Copy link

Description

After adding Realm to reanimated-2-playground project and switching off Hermes (Realm doesn't support it) app starts crashing when Realm saves data.

Expected behavior

Both packages should work fine together

Actual behavior & steps to reproduce

App crashes with error like

A/libc: Fatal signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0 in tid 6328 (mqt_js), pid 6272 (llet.bluewallet)

Snack or minimal code example

I've created a fork of playground to make it easy to reproduce https://github.com/limpbrains/reanimated-2-playground

App crashes here

const realm = await Realm.open({
  path: 'myrealm',
  schema: [TaskSchema],
});

let task1, task2;
realm.write(() => {
  task1 = realm.create('Task', {
    _id: 1,
    name: 'go grocery shopping',
    status: 'Open',
  });
  task2 = realm.create('Task', {
    _id: 2,
    name: 'go exercise',
    status: 'Open',
  });
  console.log(`created two tasks: ${task1.name} & ${task2.name}`);
});

Emulator was created by this script:

sdkmanager "system-images;android-28;default;x86_64"
echo no | sdkmanager --licenses
echo no | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_29_AOSP --force --package "system-images;android-28;default;x86_64"
printf "\nhw.lcd.height=1334\nhw.lcd.width=750\nhw.lcd.density=320\nskin.name=750x1334" >> ~/.android/avd/Pixel_API_29_AOSP.avd/config.ini

Package versions

  • React Native: 0.63.4
  • React Native Reanimated: 2.1.0
  • NodeJS: 14.16.1
  • Java: openjdk version "12.0.1" 2019-04-16

Affected platforms

  • Android
  • iOS
  • Web
@github-actions
Copy link

Issue validator

The issue is valid!

@somebody32
Copy link

I would link another issue with realm and reanimated 2 here: #1424, maybe it would be easier to debug them together

@klandell
Copy link

Are there any updates on this? Based on my previous experiences with Realm, the issue is probably on their side and may never be fixed, but just wondering if anyone has any leads on this issue. The incompatibility between Realm and Reanimated v2 is a pretty big blocker in my app.

@Obhenimen
Copy link

The issue is from realm library. Currently, realm does not support Hermes....or let me say the support for hermes on realm is still on going. Since the reanimated 2 library depends on hermes, it won't be possible to use reanimated 2 with realm.
Remedy: You can either use the reanimated library version 1x which would work fine with realm or you use another database like watermelon DB together with the reanimated 2x library. The choice is yours

@liamjones
Copy link

liamjones commented Sep 3, 2021

the reanimated 2 library depends on hermes

No longer true, JSC also works since 2.2.0 but there's still a conflict - see realm/realm-js#3837

@j-piasecki
Copy link
Member

Hi! Are you still experiencing this problem after upgrading the libraries?

@j-piasecki j-piasecki added bug-bash-jan22 Issues visited during Bug Bash Jan 2022 Close when stale This issue is going to be closed when there is no activity for a while labels Jan 28, 2022
@liamjones
Copy link

FYI Realm have apparently fixed it from their side but it's only on their pre-release Hermes branch atm: realm/realm-js#3837 (comment)

Note, while it is the Hermes branch, they've confirmed it fixes things for the JSC too: realm/realm-js#3837 (comment)

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Jan 31, 2022
@j-piasecki
Copy link
Member

In that case, I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug bug-bash-jan22 Issues visited during Bug Bash Jan 2022 🏠 Reanimated 2
Projects
None yet
Development

No branches or pull requests

6 participants