radarlabs / react-native-radar

React Native module for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
170 stars 32 forks source link

java.lang.RuntimeException: Unable to start receiver com.onradar.react.RNRadarReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.onradar.react.RNRadarEventEmitter.sendEvent(java.lang.String, java.lang.Object)' on a null object reference #1

Closed smartdevdom closed 7 years ago

smartdevdom commented 7 years ago

java.lang.RuntimeException: Unable to start receiver com.onradar.react.RNRadarReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.onradar.react.RNRadarEventEmitter.sendEvent(java.lang.String, java.lang.Object)' on a null object reference

nickpatrick commented 7 years ago

Hey @smartdevdom, sorry to hear that you're having trouble! Looking into this now.

nickpatrick commented 7 years ago

@smartdevdom Can you share more about how you're registering your receiver? Snippets of code and your Android manifest would help.

nickpatrick commented 7 years ago

Looks like RNRadarReceiver is trying to emit an event through RNRadarEventEmitter, which has not been initialized. I will look into https://facebook.github.io/react-native/docs/headless-js-android.html as a solution.

smartdevdom commented 7 years ago

I have one problem NativeModules.RNRadar is undefined

nickpatrick commented 7 years ago

@smartdevdom This should be resolved in version 1.0.5.