-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MixPanel causing app to crash on latest react native #179
Comments
I've double checked and every instance of this error weve seen was on iOS 16.1+ with React Native .71 (hermes enabled) |
This comment was marked as resolved.
This comment was marked as resolved.
@Allanbcruz which version of react native are you on? |
This comment was marked as resolved.
This comment was marked as resolved.
Yup same for me only had issues after upgrade. I was on .65 before though. |
It's very inconsistent for me though - what about you? The app still works a good amount of the time it just crashes a lot more than it used to (usually after opening the app). |
making a "My bad", sorry @matthewmturner, the error I reported was actually caused by me calling the mixpanel track before it had initialized |
@Allanbcruz Had you changed anything about your Mixpanel code when upgrading React Native? |
No @matthewmturner, due to a failure of the team to manage the releases of our application, there was a coincidence that the faulty code (failed implementation trying to call the mixpanel track before Init()) and the React-Native update version were on the same branch. |
@Allanbcruz Ah ok, thanks for information! |
were going to try upgrading to 0.71.4 to see if that helps. if not we will likely have to disable mixpanel |
Were also going to upgrade from mixpanel 2.1 to 2.2, i see that updated the target deployment version so maybe that will help |
Any feedback from the Mixpanel team please? We updated on our side but it seems likely that the bug is persisting as already saw an instance of it on the version with the fix |
@matthewmturner I'm not able to reproduce the crash and this is the only report we have of such a crash, so I'm not sure what the cause is. But from the screenshot of the stack trace we can see that the crash occurs in Which is called from here: https://github.com/mixpanel/mixpanel-react-native/blob/master/ios/MixpanelReactNative.swift#L22 Which receives the Are you providing |
@jaredmixpanel thanks for the response! we dont use and unfortunately i havent been able to reproduce this in development. im only getting the sentry crash reports in production.
|
Not sure how this crash is possible then. The stack trace shows AutomaticProperties.swift line 9 being executed: https://github.com/mixpanel/mixpanel-react-native/blob/master/ios/AutomaticProperties.swift#L9 That line is only executed for each key, value pair in that properties dictionary, so if that dictionary is nil... no idea how we could get to that line. As a workaround it may be worth providing an empty object for the |
@matthewmturner Okay, try updating to |
@jaredmixpanel will do, thanks much. |
@jaredmixpanel unfortunately i'm still getting this error even with the update. Same stack trace. is there anything else we could try? |
@matthewmturner ok, i've tried something else, let me know if |
@jaredmixpanel great thanks - will include in our next release and let you know. |
@matthewmturner |
@jaredmixpanel updating in our release today, will keep you posted. thanks. |
@jaredmixpanel FYI were still having this issue, currently on 2.2.5 |
@jaredmixpanel the only other thing I can think to mention is that we've only seen this issue since switching to Hermes / upgrade to RN 0.71. Not sure how those would be related though as this seems to be from the native side. |
Do you have any ideas for hacks I can do to get around this? |
@jaredmixpanel from the error seems like it could be related to serverUrl? But we aren't touching that so not sure why its causing issue |
@jaredmixpanel do you have any thoughts here? |
hi @matthewmturner , I'm reopening this issue for now, I will take a look. |
@zihejia Thank you! |
@zihejia hi - just checking in on this. |
hi @matthewmturner , please try the latest version v2.3.0, and let me know how it goes. |
@zihejia we are continuing to have the problem (the error looks a little different though - image attached). I appreciate that your team has tried putting out several releases to fix this but unless you have a quick fix we are going to stop using mixpanel, its significantly downgrading the quality / experience of using our app and it appears we are no closer to resolving the issue after months. |
Closing as we no longer use mixpanel |
haha I was just about to comment I am switching to amplitude. I just implemented it and kept getting crashes on production (iOS), in development is works fine. I couldn't even get any errors in sentry cause the app crashes as soon as it's opened. I'm not a native dev so wouldn't even know what to make of the native logs even if I could get em. Screw it the way it's being managed in this thread makes mixpanel looks amateur anyway. and looks like it happens often, I don't think this lib is production ready one bit: |
Hi @TowhidKashem (and anyone who is running into this issue), we have recently looked into this issue again but are not able to reproduce the issue. If you are still running into this issue, can you write into [email protected] citing this Github issue, attach a sample app that gets the errors/crash issue, and the error messages you're getting? You can mention my name in the email, so it will get assigned to me. Thank you very much in advance. |
We are in 2024, Was still having this issue out of nowhere, mix panel just started to crash while calling
Was able to fix it while installing the latest version of the library switching away from native side operations as follows
|
Since upgrading to react native .71 and enabling hermes we have been seeing more crashes and I think they are coming from the native implementation of mixpanel based on the reports we are getting from Sentry. Stack trace included below. We are on version 2.1.
Is this something that you can fix on your side?
The text was updated successfully, but these errors were encountered: