Skip to content
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

IllegalStateException when com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.init #624

Closed
Auronake opened this issue Sep 17, 2019 · 3 comments

Comments

@Auronake
Copy link

Auronake commented Sep 17, 2019

Hello!

We have an issue on some devices (not reproduce for now with our devices).
We use mixpanel Android SDK 5.6.4
The issue is reported by the Playstore/crashes like this :

java.lang.RuntimeException:
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6259)
at android.app.ActivityThread.access$1100 (ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1703)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:210)
at android.app.ActivityThread.main (ActivityThread.java:7124)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:898)

Caused by: java.lang.IllegalStateException:
at com.google.firebase.FirebaseApp.getInstance (SourceFile:219)
at com.google.firebase.iid.FirebaseInstanceId.getInstance (Unknown Source:1)
at com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.init (SourceFile:117)
at com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance (SourceFile:423)
at com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance (SourceFile:369)
at hide.S.else. (SourceFile:5130)
at hide.S.goto. (SourceFile:3082)
at hide.Code.catch.get (SourceFile:1155)
at dagger.internal.do.get (SourceFile:47)
at hide.Code.cz.Code (SourceFile:52900)
at hide.AppLifeCycleHandler. (SourceFile:71)
at hide.do.onCreate (SourceFile:2070)
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1167)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6254)

Do you have an idea about that ? Or do you need more informations ?

We use Firebase already, we received push. Mixpanel works fine with almost devices.

Actually, we have these statisics about impacted devices :
Android 9 | 139 | 95.9% Android 6.0 | 4 | 2.8% Android 10 | 2 | 1.4%

@pablortsal
Copy link

pablortsal commented Sep 25, 2019

I don't know if this is your case, but im having the same issue in a Ionic App with the cordova plugin, for me when i remove the push notifications plugins the FCM plugin, the error disapear and mixpanel starting to work, i imagine that maybe its a dependency problem between mixpanel and FCM.

What works for me in build.gradle:

implementation "com.google.android.gms:play-services-auth:15.0.0" implementation "com.google.android.gms:play-services-identity:15.0.0" implementation "com.mixpanel.android:mixpanel-android:5.6.0" implementation "com.google.android.gms:play-services-base:15.0.0" implementation "com.google.firebase:firebase-messaging:17.6.0"

@patedit
Copy link
Contributor

patedit commented Oct 15, 2019

Your firebase messaging dependency needs to be 16.2.0 or above. @Auronake what version are you using?

@patedit
Copy link
Contributor

patedit commented Nov 23, 2019

This should be fixed in 5.6.7. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants