mixpanel / mixpanel-flutter

Official Flutter Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
68 stars 75 forks source link

Events are not reaching dashboard. #39

Closed kadariyaujwal closed 2 years ago

kadariyaujwal commented 2 years ago

Device: Redmi Note 7 Pro

[✓] Flutter (Channel stable, 2.2.0, on Linux, locale en_US.UTF-8)

To reproduce: Clone the repo, Update the token, and run the example app. Click on events. Try doing everything. Events are not recorded. But an error is seen on terminal.


Rejecting re-init on previously-failed class java.lang.Class<com.mixpanel.android.mpmetrics.InstallReferrerPlay>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/android/installreferrer/api/InstallReferrerStateListener;
I/flutter_exampl(28573):   at com.mixpanel.android.mpmetrics.MixpanelAPI com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance(android.content.Context, java.lang.String, boolean, org.json.JSONObject) (MixpanelAPI.java:349)
I/flutter_exampl(28573):   at void com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.handleInitialize(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (MixpanelFlutterPlugin.java:200)
I/flutter_exampl(28573):   at void com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (MixpanelFlutterPlugin.java:57)
I/flutter_exampl(28573):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:233)
I/flutter_exampl(28573):   at void io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(java.lang.String, byte[], int) (DartMessenger.java:85)
I/flutter_exampl(28573):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:818)
I/flutter_exampl(28573):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/flutter_exampl(28573):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:326)
I/flutter_exampl(28573):   at void android.os.Looper.loop() (Looper.java:160)
I/flutter_exampl(28573):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6718)
I/flutter_exampl(28573):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/flutter_exampl(28573):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493)
I/flutter_exampl(28573):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
I/flutter_exampl(28573): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.installreferrer.api.InstallReferrerStateListener" on path: DexPathList[[zip file "/data/app/com.mixpanel.mixpanel_flutter_example-L1TjLrfozZ4iIlRGlRROyg==/base.apk"],nativeLibraryDirectories=[/data/app/com.mixpanel.mixpanel_flutter_example-L1TjLrfozZ4iIlRGlRROyg==/lib/arm64, /data/app/com.mixpanel.mixpanel_flutter_example-L1TjLrfozZ4iIlRGlRROyg==/base.apk!/lib/arm64-v8a, /system/lib64]]
I/flutter_exampl(28573):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
I/flutter_exampl(28573):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
I/flutter_exampl(28573):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/flutter_exampl(28573):   at com.mixpanel.android.mpmetrics.MixpanelAPI com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance(android.content.Context, java.lang.String, boolean, org.json.JSONObject) (MixpanelAPI.java:349)
I/flutter_exampl(28573):   at void com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.handleInitialize(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (MixpanelFlutterPlugin.java:200)
I/flutter_exampl(28573):   at void com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (MixpanelFlutterPlugin.java:57)
I/flutter_exampl(28573):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:233)
I/flutter_exampl(28573):   at void io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(java.lang.String, byte[], int) (DartMessenger.java:85)
I/flutter_exampl(28573):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:818)
I/flutter_exampl(28573):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/flutter_exampl(28573):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:326)
I/flutter_exampl(28573):   at void android.os.Looper.loop() (Looper.java:160)
I/flutter_exampl(28573):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6718)
I/flutter_exampl(28573):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/flutter_exampl(28573):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493)
I/flutter_exampl(28573):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
I/flutter_exampl(28573): 
W/MixpanelAPI.SysInfo(28573): Permission READ_PHONE_STATE not granted. Property $radio will not be available.
thecodepapaya commented 2 years ago

This is probably unrelated to the events not being reported. Take a look at https://github.com/mixpanel/mixpanel-android/issues/746.

zihejia commented 2 years ago

Hi @kadariyaujwal , please try our latest version 1.4.2 which has a fix for this exception. I'm closing this one now, please feel free to reopen if the problem still exists.