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

Google Play Error: SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0) #115

Open
mgdeveloper7 opened this issue Aug 18, 2023 · 16 comments

Comments

@mgdeveloper7
Copy link

Hi,

We are using the latest version of the react-native-braintree-dropin-ui in our app. I recently submitted a build of an app to Google Play Store. The app got rejected giving the following reason:

**Issue found: Violation of User Data policy

We reviewed SDKs used by your app and found noncompliant version(s) of SDK(s) which collects persistent device identifiers. Persistent device identifiers may not be linked to other personal and sensitive user data or resettable device identifiers.

Issue details

We found an issue in the following area(s):

SPLIT_BUNDLE 28: :
SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0)

Additionally, follow these steps to bring your app into compliance:

You may consider upgrading to a policy-compliant version of this SDK, if available from your SDK provider or removing the SDK.**

I've been submitting builds for this app for the last 18 months without issue until this week where it's been rejected. The User Data Policy on Google Play store had been updated recently.

Is there any way to upgrade the plugin to use version 4.31.0 of com.braintreepayments.api:data-collector as suggested?

Thanks

@mgdeveloper7 mgdeveloper7 changed the title SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0) Google Play Error: SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0) Aug 18, 2023
@mgdeveloper7
Copy link
Author

mgdeveloper7 commented Aug 18, 2023

I found that version 4.27.0 is currently being pulled in after the build command is issued.

<library
name="com.braintreepayments.api:data-collector:4.27.0@aar"
jars="/Users/xxx/.gradle/caches/transforms-3/e55554a7a0707949ccc860a39bfa495d/transformed/jetified-data-collector-4.27.0/jars/classes.jar:/Users/xxx/.gradle/caches/transforms-3/e55554a7a0707949ccc860a39bfa495d/transformed/jetified-data-collector-4.27.0/jars/libs/kount-data-collector-3.2.jar"
resolved="com.braintreepayments.api:data-collector:4.27.0"

Plug in needs version 4.31.0 or above.

@Jigs6720
Copy link

Jigs6720 commented Aug 22, 2023

add this line and upgrade braintree sdk to version 6.+

implementation 'com.braintreepayments.api:data-collector:4.31.0'

in app/build.gradle

like this

dependencies {

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "io.card:android-sdk:5.+"
implementation 'com.braintreepayments.api:data-collector:4.31.0'
implementation 'org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.7-2'

@ysudharsono
Copy link
Contributor

I encountered the same issue and ended up upgrading the library from v1.1.3 to v1.1.5, essentially upgrading the Braintree Android SDK to v4 and Braintree iOS SDK to v5. That seemed to have fixed the issue.

I had to upgrade the deployment targets for both Android & iOS to make it work with the latest version, plus some other changes. I would advise reviewing the latest readme file & make the necessary changes.

@mgdeveloper7
Copy link
Author

Thanks for you comments @Jigs6720 and @ysudharsono.

I managed to solve the problem in my app by changing the following in my build.gradle. I upgraded the version from to 6.9.0 to 6.11.0

implementation 'com.braintreepayments.api:drop-in:6.11.0'.

This seemed to pull in an updated version of the dependency on com.braintreepayments.api:data-collector to a version above 4.31.0.

I submitted the build to Play Store and it got approved so seemed to solve the problem :-).

@pckz
Copy link

pckz commented Aug 28, 2023

Hello everyone,

I'm experiencing a Duplicate class issue in my React Native app (react-native: 0.63.2) when trying to integrate Braintree. I've gone through the solutions suggested in this thread but haven't had any luck solving the problem.

I'm specifically facing this issue with react-native-braintree-dropin-ui versions:

  • 1.1.3 adding implementation 'com.braintreepayments.api:data-collector:4.31.0' and
  • 1.1.5 not adding aditionals implementations, or adding implementation 'com.braintreepayments.api:drop-in:6.11.0'.

in three scenarios I got same error

Here's the error message I get during the build:

> Task :app:checkFirstDermReleaseDuplicateClasses FAILED

> Task :app:processFirstDermReleaseManifestForPackage
Execution optimizations have been disabled for task ':app:processFirstDermReleaseManifestForPackage' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/pckz/Apps/firstderm.native/android/app/build/intermediates/merged_manifests/FirstDermRelease'. Reason: Task ':app:processFirstDermReleaseManifestForPackage' uses this output of task ':app:copyFirstDermReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkFirstDermReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.braintreepayments.api.BuildConfig found in modules jetified-braintree-3.21.1-runtime (com.braintreepayments.api:braintree:3.21.1) and jetified-braintree-core-4.31.0-runtime (com.braintreepayments.api:braintree-core:4.31.0)
     Duplicate class com.braintreepayments.api.CrashReporter found in modules jetified-braintree-3.21.1-runtime (com.braintreepayments.api:braintree:3.21.1) and jetified-braintree-core-4.31.0-runtime (com.braintreepayments.api:braintree-core:4.31.0)
     Duplicate class com.braintreepayments.api.DataCollector found in modules jetified-braintree-3.21.1-runtime (com.braintreepayments.api:braintree:3.21.1) and jetified-data-collector-4.31.0-runtime (com.braintreepayments.api:data-collector:4.31.0)

I've tried changing my dependencies based on the suggestions provided by @Jigs6720 and @mgdeveloper7 but still encounter the same issue.

Is anyone else facing a similar issue or have a working solution for this? Any guidance would be much appreciated.

Thank you.

@Bob-MYMC
Copy link

@ysudharsono Thanks for the upgrade.
After updating the Braintree library, the promise isn't being triggered (neither resolved nor rejected) after the completion of the payment input.
The RN version in the project is 0.63.4.
However it works well in a new RN project with RN version 0.71.7

Could you please help?

@Harisene
Copy link

I too got this problem in Google and updated the library to the latest. But now I'm getting this error when building the app.

react-native-braintree-dropin-ui/android/src/main/java/tech/power/RNBraintreeDropIn/RNBraintreeDropInModule.java:41: error: lambda expressions are not supported in -source 7 callback -> { ^ (use -source 8 or higher to enable lambda expressions) 1 error

I have OpenJDK 11 installed. Can someone help me with this? Cheers!

@Bob-MYMC
Copy link

Bob-MYMC commented Aug 30, 2023

I too got this problem in Google and updated the library to the latest. But now I'm getting this error when building the app.

react-native-braintree-dropin-ui/android/src/main/java/tech/power/RNBraintreeDropIn/RNBraintreeDropInModule.java:41: error: lambda expressions are not supported in -source 7 callback -> { ^ (use -source 8 or higher to enable lambda expressions) 1 error

I have OpenJDK 11 installed. Can someone help me with this? Cheers!

@Harisene please try this solution #111

@Harisene
Copy link

Harisene commented Aug 31, 2023

Earlier I was getting these two issues from Google.

SPLIT_BUNDLE 1691611302: :
SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0)
SPLIT_BUNDLE 1693378699: :
SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0)

Then I updated the react-native-braintree-dropin-ui to 1.1.5 and added implementation 'com.braintreepayments.api:data-collector:4.31.0' to the app/build.gradle file and sent a new build to Google.

Now I'm getting this issue no matter what change I make.

SPLIT_BUNDLE 1691611302: :
SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0)

Does anyone have any solution for this?

@Harisene
Copy link

Harisene commented Sep 4, 2023

Hi @ysudharsono how did you update Android SDK to v4?

@Harisene
Copy link

Harisene commented Sep 5, 2023

Hi, @mgdeveloper7 Could you please explain in detail what did you do to fix this issue and the version of the package you are using? Cheers!

@mgdeveloper7
Copy link
Author

Hi, @mgdeveloper7 Could you please explain in detail what did you do to fix this issue and the version of the package you are using? Cheers!

Hi Harisene,

I was using react-native-braintree-dropin-ui, version 1.1.5.
React-Native version 0.72.4

I only changed the following line in my android/app/build.gradle, updated from 6.9.0 to 6.11.0

implementation 'com.braintreepayments.api:drop-in:6.11.0'

After recompiling, the dependency file, com.braintreepayments.api:data-collector automatically got raised to a version above 4.31.0, which is what I wanted. The app worked fine after that and Google accepted the submission.

Hope that helps.

@Mangat0702
Copy link

Hi @mgdeveloper7 @ysudharsono @pckz @Harisene @Bob-MYMC

i am using react-native-braintree-dropin-ui, version 1.1.7.
react native version "0.65.1"

buildToolsVersion = "33.0.1"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
ndkVersion = "21.4.7075529"

I am successfully able to open braintree Drop in Ui but after selecting saved card or added new card dropIn UI just hides nothing happened after that.It neither goes to then and nor to catch.
it is happening only for android and for ios it is working fine.
onDropInSuccess and onDropInFailure methods in library is not working.

can you please help me in this ?

@Harisene
Copy link

Hi @Mangat0702 did you find a solution? I'm also using 1.1.7. No issue so far. Maybe you could try downgrading the version and try it out?

@Mangat0702
Copy link

Hi @Mangat0702 did you find a solution? I'm also using 1.1.7. No issue so far. Maybe you could try downgrading the version and try it out?

Hi @Harisene
version 1.1.3 is working fine.
1.1.4, 5, 6 and 1.1.7 not working
still facing same issue

@Harisene
Copy link

thanks for the reply @Mangat0702 - I will update the thread soon if I experience the same

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

7 participants