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.

[Android] undefined is not an object (evaluating '_NativeModules$Realm.debugHosts')

See original GitHub issue

Goals

Simply trying to launch the app. After installing Realm Database it has worked and I could successfully write data to it. Since then, it just doesn’t launch anymore. Tried to rebuild, clear caches, and really, tried everything I know of. Followed all steps from the docs and troubleshooting, and tried many solutions from the other related issues (#1150, #527, #762), but nothing seems to work.

Expected Results

Launch the app normally (not using Realm on startup or anything like that, it only gets called upon touching a button).

Actual Results

image

Above image is from an emulator.

Also tried to get a stacktrace from the Android Device Monitor, however, I am being unsuccessful.

Steps to Reproduce

Install Realm normally, check all changes from react-native link are OK, write some data, and restart the app.

Version of Realm and Tooling

  • Realm JS SDK Version: 2.25.0
  • React Native: 0.57.4
  • Which debugger for React Native: None

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
matheusgriegercommented, Aug 19, 2019

We gave up on React Native and went back to hybrid solutions using Cordova. RN was running too slow for our project…

0reactions
borysstachcommented, Oct 2, 2019

I have very similar issue on upgrade from 1.13.0 to 2.29.2 “null is not an object (evaluating ‘_NativeModules$Realm.debugHosts’)” only without debugger Fixed it by removing this check: https://github.com/borysstach/realm-js/commit/5518dd3c700d90cf9c1b2deadfdcc29425c9d814

Read more comments on GitHub >

github_iconTop Results From Across the Web

realm react native null is not an object - Stack Overflow
You'd better use the object, not the class. const Realm = require('realm'); const Todo = { name: 'Todo', properties: { done: {type: 'bool', ......
Read more >
in android we are getting error - RevenueCat Community
Hi @Michele Laurelli ,. For the null is not an object (evaluating 'RNPurchases.setDebugLogsEnabled') in the stack trace, it looks like the SDK ...
Read more >
undefined is not an object (evaluating 'rctvideoinstance ...
I want to play video on my react-native application on iOS & Android. Platform. Which player are you experiencing the problem on: iOS...
Read more >
[Solved]-Undefined is not an object (evaluating '_this.camera')
Coding example for the question Undefined is not an object (evaluating '_this.camera')-React Native.
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