question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realm in Debug Mode kills React Native on iOS and Android

See original GitHub issue

Installing Realm kills React Native app if debugger is enabled. Without the debugger, everything works fine.

Goals

Using Realm in React Native.

Expected Results

App would continue to work when debugger enabled.

Actual Results

If debugger is enabled, the app crashes and exits when run using npx react-native run-ios. If the app is run from XCode, XCode pauses and shows the error: TypeError: snapshot method was not called on a Realm object!. Note that even without any listeners or Realm code running, this happens (only by installing Realm).

Safari debugger works fine.

Steps to Reproduce

  • Install Realm (latest beta or latest stable version)
  • Open React Native app
  • Enabled debugger
  • App crashes

Version of Realm and Tooling

  • Realm JS SDK Version: 4 beta or 3 stable
  • Node or React Native: 0.61
  • Client OS & Version: iOS / Android both simulator and real devices
  • Which debugger for React Native: Chrome

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sallarcommented, Dec 13, 2021

@Hassan-Riaz I decided not to use Realm.

0reactions
knethcommented, Jan 10, 2022

@WenLonG12345 Currently we don’t have a plugin to inspect Realms directly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Realm Integration Breaks React Native Debugger - MongoDB
When attaching the react native debugger to our project we receive the error “Realm is not defined”, which also causes application crashes. This ......
Read more >
Using Realm and Remote Debugging fails on android
Easy fix is to goto node_modules/realm/lib/browser/rpc.js and replace line 216 with let url = 'http://127.0.0.1:8083/' + command;.
Read more >
Using Realm and Remote Debugging fails on android-React ...
Coding example for the question Using Realm and Remote Debugging fails on android-React Native.
Read more >
Amila Dulanjana on Twitter: "It is better to start using flipper to debug ...
applications, with the new #reactnative architecture which will break the ... Realm in Debug Mode kills React Native on iOS and Android ·...
Read more >
Troubleshooting - React Native
When you're debugging a process or need to know a little more about the error being thrown, you may want to use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found