Realm Integration Breaks React Native Debugger

Hello all,
My team is working on a project that uses the Realm integration for mobile.

The project is a React Native project and it uses Realm on the react-native side and also has realm integrated on the native iOS and Android layers as well as our project has custom native modules that also depend on realm.

We are using the following versions:
react-native realm: 10.8.0
RealmSwift: 15.15.0
Android io.realm.react package: 10.8.0

In our react-native project, one other useful details to share is that we do not currently have the JS engine, Hermes enabled.

When attaching the react native debugger to our project we receive the error “Realm is not defined”, which also causes application crashes. This issue exists on both Android and iOS platforms.

Red Screen In React Native:

After doing some online research, it seems that realm may actually not support the chrome / RN debugger:
Realm in Debug Mode kills React Native on iOS and Android · Issue #2702 · realm/realm-js · GitHub (see the post by takameyer a core contributor)

As such, our team has explored using a flipper integration. Though unfortunately, such an integration has not been trivial and our team has been unsuccessful at integrating the flipper debugger so far as well.

So my question is twofold:

  1. Is it the case that Realm just does not support the react native debugger?
  2. If we cannot use the RN debugger, then it is the case that we may need support in getting flipper to actually work with our project which in our case is not straightforward.

That is correct that the Chrome debugger does not work well for RN apps that run native code (which Realm’s core database is). You can read the gory details here -

Our recommendations are documented here, either Flipper or the Safari debugger -