davide-scalzo/react-native-mixpanel

Null Reference used for synchronization

Opened this issue · 1 comments

This error has been come up on my development on android
Screenshot_2019-09-18-16-22-36-98_233f7b86106e68c480f88fc37b8473e2

implementation

      const mixpanel = new MixpanelInstance(REACT_APP_MIXPANEL_ID);
      mixpanel.initialize().then(() => {
        mixpanel.track(currentScreen);
      });
  • "react-native-mixpanel": "^1.1.4", (tried to downgrade to "^1.1.4" still no luck)
  • "react-native": "0.59.10"
  • Android Build

In my case this was caused by passing an undefined token to Mixpanel.sharedInstanceWithToken.

if you're using react-native-config:
please check that you've followed this extra step, otherwise your Config values will be undefined.