mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
105 stars 44 forks source link

Error: mixpanel-react-native: MixpanelReactNative is null. #214

Closed helians11 closed 6 months ago

helians11 commented 11 months ago

Error: mixpanel-react-native: MixpanelReactNative is null.

Still getting this error. mixpanel-react-native: ^2.3.1 react-native: 0.71.8

import { Mixpanel } from 'mixpanel-react-native';

const mixpanel = new Mixpanel(projectToken, true);

elvniv commented 11 months ago

were you able to solve it? i am getting the same error and nothing online is helping

import { Mixpanel } from 'mixpanel-react-native'; import { MIXPANEL_TOKEN } from './env';

const trackAutomaticEvents = true;

export const mixpanel = new Mixpanel(MIXPANEL_TOKEN, trackAutomaticEvents);

helians11 commented 11 months ago

Nope... nothing is helping.

elvniv commented 11 months ago

its super annoying because they aren't responding either

elvniv commented 11 months ago

hey, any luck?

OOCAZ commented 11 months ago

same issue, not a clue what is going on, just using boilerplate docs, will see if I can get to the bottom of this quickly.

elvniv commented 11 months ago

yeah, switch the product. use the library managed by someone else. they don't actually have any library that works with expo according to them.

On Tue, Oct 17, 2023 at 5:36 PM Zac Poorman @.***> wrote:

same issue, not a clue what is going on, just using boilerplate docs, will see if I can get to the bottom of this quickly.

— Reply to this email directly, view it on GitHub https://github.com/mixpanel/mixpanel-react-native/issues/214#issuecomment-1767228917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUBODESREMMB7MUMXZLX4LX73267AVCNFSM6AAAAAA5KS2MSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXGIZDQOJRG4 . You are receiving this because you commented.Message ID: @.***>

OOCAZ commented 11 months ago

@zihejia Any input?

OOCAZ commented 11 months ago

To update this issue I found a work around by just importing and using: https://www.npmjs.com/package/mixpanel-browser. However this is not direct react-native support...

But in the event of a work around just use that according to the guides @elvniv and @helians11, it should work for you.

elvniv commented 11 months ago

Thanks for the tip!

On Tue, Oct 17, 2023 at 5:59 PM Zac Poorman @.***> wrote:

To update this issue I found a work around by just importing and using: https://www.npmjs.com/package/mixpanel-browser. However this is not direct react-native support...

But in the event of a work around just use that according to the guides @elvniv https://github.com/elvniv and @helians11 https://github.com/helians11, it should work for you.

— Reply to this email directly, view it on GitHub https://github.com/mixpanel/mixpanel-react-native/issues/214#issuecomment-1767256345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUBODABXYQFRRJ2QXZ6XQDX735ULAVCNFSM6AAAAAA5KS2MSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXGI2TMMZUGU . You are receiving this because you were mentioned.Message ID: @.***>

OOCAZ commented 11 months ago

Adding additional documentation, I tried the last three previous version and those did not work, going to see if I can fork and fix after business hours.

elvniv commented 11 months ago

let me see if i can dig up the email mixpanel sent me they gave me a third party library i could use

On Tue, Oct 17, 2023 at 6:12 PM Zac Poorman @.***> wrote:

Adding additional documentation, I tried the last three previous version and those did not work, going to see if I can fork and fix after business hours.

— Reply to this email directly, view it on GitHub https://github.com/mixpanel/mixpanel-react-native/issues/214#issuecomment-1767270490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUBODB4B7KQHHQQZ4LOHLLX737D3AVCNFSM6AAAAAA5KS2MSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXGI3TANBZGA . You are receiving this because you were mentioned.Message ID: @.***>

elvniv commented 11 months ago

here https://github.com/mixpanel/mixpanel-react-native/issues/82

On Tue, Oct 17, 2023 at 6:13 PM Elvin Atwine @.***> wrote:

let me see if i can dig up the email mixpanel sent me they gave me a third party library i could use

On Tue, Oct 17, 2023 at 6:12 PM Zac Poorman @.***> wrote:

Adding additional documentation, I tried the last three previous version and those did not work, going to see if I can fork and fix after business hours.

— Reply to this email directly, view it on GitHub https://github.com/mixpanel/mixpanel-react-native/issues/214#issuecomment-1767270490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUBODB4B7KQHHQQZ4LOHLLX737D3AVCNFSM6AAAAAA5KS2MSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXGI3TANBZGA . You are receiving this because you were mentioned.Message ID: @.***>

zihejia commented 6 months ago

hi, it seems like you are trying to run it without the Native module, we have just released a beta version, v3.0.0-beta.1. This version allows you to enable JavaScript mode when initializing Mixpanel, which should work with your case. For more details and installation guidelines, please refer to the release notes at Mixpanel React Native v3.0.0-beta.1. I'm consolidating all the similar issues, please use #82 or open a new one for any feedback or issues in 3.0.0-beta versions 🙏