Skip to main content

Troubleshoot

Contents


I am getting the Android SDK callbacks, but I am unable to see the trips on the dashboard. I see the following error in my logs "java.lang.NoClassDefFoundError: com.amazonaws.http.StaxResponseHandler"?

Solution

Add the following rules to your proguard file (proguard-rules.pro)

-dontwarn org.xmlpull.v1.**
-keep class org.xmlpull.** { *; }

Explanation

If you get the following error in your logs after taking a trip.

java.lang.NoClassDefFoundError: com.amazonaws.http.StaxResponseHandler
at com.amazonaws.services.sqs.AmazonSQSClient.u(SourceFile:2793)
at com.amazonaws.services.sqs.AmazonSQSClient.v(SourceFile:1311)
at e42.c(SourceFile:93)
at y42.a(SourceFile:227)
at y42.b(SourceFile:68)
at y42.c(SourceFile:28)
at com.zendrive.sdk.services.ZendriveWorker.b(SourceFile:97)
at com.zendrive.sdk.services.ZendriveWorker$b$a.l(SourceFile:94)
at nd2.e(SourceFile:33)
at uh2.run(SourceFile:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.ExceptionInInitializerError
... 13 more
Caused by: com.amazonaws.AmazonClientException: Couldn't initialize XmlPullParserFactory
at com.amazonaws.http.StaxResponseHandler.<clinit>(SourceFile:57)
... 13 more

The problem is that the proguard obfuscates the fields before sending the information to Fairmatic servers. The issue occurs due to some third-party library in the app that defines XmlPullParser.


I have enabled minify in build.gradle and I am using GSON to serialize and store SDK trip data. I am receiving a "java.lang.AssertionError" exception while serializing Fairmatic SDK classes?

Solution

Add the following rules to your proguard file (proguard-rules.pro)

-keep class com.zendrive.sdk.** { *; }
-keepclassmembers class zendrive.sdk.** {*;}

Explanation

If you receive the following error in your stack trace

java.lang.AssertionError
at v4.c.<init>(SourceFile:1)
at v4.a.a(SourceFile:161)
at s4.j.c(SourceFile:68)
.....
at com.fairmatic.fmsdktest.FairmaticBroadcastReceiverImpl.onDriveStart(SourceFile:18)
at com.fairmatic.sdk.ZendriveBroadcastReceiverImpl.onDriveStart(SourceFile:83)
at c5.q.a(SourceFile:54)

We suggest that these serialization libraries should not be used with Fairmatic classes. Please create your own data class to store trip-related data if needed.

AWS SQS uploader exception

Solution

If you're using Fairmatic Android SDK 1.x.x. and Gradle/AGP version 8.x.x for your app, please add the following in the proguard-rules.pro of the app:

-keep public class com.amazonaws.** { *;

Explanation

If you receive the following message in your logs

Exception in creating SQS uploader

The trip data is not getting uploaded to the backend system. So add the above rule.

iOS - Motion and Fitness permission

Our SDK utilizes barometer data as part of its collision detection algorithm. With the release of iOS 17.4, the "Motion & Fitness" permission is now required to access data from the barometer sensor.

Due to this change, it is mandatory to include the NSMotionUsageDescription key in your application's Info.plist file with an appropriate message explaining its use to the end user. Failure to include this key may result in the App Store Review team rejecting your app. If you already have this string in your Info.plist, no further action is needed from your end.

Please update your application accordingly to ensure continued compatibility with our SDK and successful app review submissions.