mixpanel / mixpanel-android

Official Android Tracking Library for Mixpanel Analytics
http://mixpanel.com/
Apache License 2.0
1.02k stars 366 forks source link

Crash Fatal Exception: java.lang.NoClassDefFoundError Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId; #768

Closed rmazajev closed 2 years ago

rmazajev commented 2 years ago

Hi,

Getting a lot of crashes with this stractrace: Fatal Exception: java.lang.NoClassDefFoundError Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId; com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.init (MixpanelFCMMessagingService.java:84) com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance (MixpanelAPI.java:655) com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance (MixpanelAPI.java:536) com.mixpanel.android.mpmetrics.MixpanelAPI.getInstanceFromMpPayload (MixpanelAPI.java:380) com.mixpanel.android.mpmetrics.MixpanelAPI.trackPushNotificationEvent (MixpanelAPI.java:358) com.mixpanel.android.mpmetrics.MixpanelPushNotification.trackCampaignReceived (MixpanelPushNotification.java:623) com.mixpanel.android.mpmetrics.MixpanelPushNotification.parseIntent (MixpanelPushNotification.java:236) com.mixpanel.android.mpmetrics.MixpanelPushNotification.createNotification (MixpanelPushNotification.java:75) com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.showPushNotification (MixpanelFCMMessagingService.java:166) com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.showPushNotification (MixpanelFCMMessagingService.java:150) com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.onMessageReceived (MixpanelFCMMessagingService.java:118) com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.onMessageReceived (MixpanelFCMMessagingService.java:100)

SDK version: 5.9.5

renclav commented 2 years ago

same for me, but looks like a duplicate of https://github.com/mixpanel/mixpanel-android/issues/744

looks like there are a couple of use sites with FirebaseInstanceId.getInstance().getInstanceId() when it needs to use something like FirebaseMessaging.getInstance().getToken().addOnSuccessListener(...) if you're using a more recent version of firebase messaging

dicarlomagnus commented 2 years ago

Me too!! I have This problem currently, please fix it! Thank you! :D

zihejia commented 2 years ago

Sorry for the inconvenience. We have released v6.0.0 which no longer contains the Messaging feature so you should not experience this issue anymore. I'm closing this one now, please feel free to reopen if the problem exists.