braintree / braintree_android

Braintree SDK for Android
https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
MIT License
409 stars 235 forks source link

CCInitProvider - Caused by java.lang.ClassNotFoundException #355

Closed maxlooland closed 3 years ago

maxlooland commented 3 years ago

General information

Issue description

Hi, I recently updated the SDK from "3.7.1" to "5.0.2" and found crashes among users:

Caused by java.lang.ClassNotFoundException Didn't find class "com.cardinalcommerce.shared.cs.utils.CCInitProvider" on path: DexPathList.....

Do you know anything about this problem?

sshropshire commented 3 years ago

Hi @maxlooland thanks for using the Braintree SDK for Android.

Does upgrading to com.braintreepayments.api:drop-in:5.2.0 resolve the issue? Cardinal Commerce is our third-party MPI provider and it is included as a transitive dependency of our Drop-in library through Gradle.

maxlooland commented 3 years ago

Yes, we have already tried the new version. In version "com.braintreepayments.api:drop-in:5.2.0" also reproduced

sshropshire commented 3 years ago

@maxlooland that's interesting, the Cardinal Commerce dependency is listed here as an api dependency, so it should propagate into your app's dependencies. You may have to authenticate with Cardinal Commerce in order to fetch the dependency. In this section of our dev guide, we show how to add cardinal credentials to your app's top-level Gradle file.

nikitin-da commented 3 years ago

Hi @sshropshire, Of course we've added these credentials. We've met ClassNotFoundException in runtime on certain users Without cardinalcommerce credentials I believe we couldn't even sync the project

sshropshire commented 3 years ago

@nikitin-da right had to ask for good measure. Could proguard be a factor here?

nikitin-da commented 3 years ago

@sshropshire Looks like CCInitProvider is added to exceptions Because we can see it without renaming in the obfuscated build

Снимок экрана 2021-04-01 в 10 02 02
sshropshire commented 3 years ago

@nikitin-da I see. Is this common on your local workstations as well? Also, is there additional information about the crashes observed in the user crash reports like device, Android version, etc.?

nikitin-da commented 3 years ago

@sshropshire

Is this common on your local workstations as well?

No, we can see these crashes in Firebase only. 192 crash events affecting 95 users: all devices are Sumsung on Android 10

Screenshot 2021-04-07 at 13 08 59
sshropshire commented 3 years ago

@nikitin-da that is odd. I wonder if the issue could be with Samsung. I don't see any reason why CCInitProvider would not be present at runtime since the three-d-secure dependency is present. Is there a Samsung phone available on your end to help reproduce?

nikitin-da commented 3 years ago

Is there a Samsung phone available on your end to help reproduce? Hi @sshropshire we found similar device but didn't reproduce the crash. As I can see in crashlytics, the number of crashes has decreased. Probably Sumsung has released some fix

sarahkoop commented 3 years ago

Hi @nikitin-da - Closing this since it sounds like this issue has been resolved by Samsung. Please feel free to re-open if the issue persists.