Realm in Debug Mode kills React Native on iOS and Android
See original GitHub issueInstalling 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:
- Created 4 years ago
- Comments:21 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Hassan-Riaz I decided not to use Realm.
@WenLonG12345 Currently we don’t have a plugin to inspect Realms directly.