braintree / braintree-android-drop-in

Braintree Drop-In SDK for Android
https://developers.braintreepayments.com/guides/drop-in/android/v2
MIT License
124 stars 78 forks source link

CI Build: Could not resolve cardinalmobilesdk: Received status code 403 from server: Forbidden #474

Closed ersen-lw closed 2 months ago

ersen-lw commented 5 months ago

Braintree SDK Version

6.15.0

Environment

Both

Android Version & Device

N/A

Braintree dependencies

Using Gradle version catalogs

braintreeDropInUi = "6.15.0"

braintree-dropin-ui = { group = "com.braintreepayments.api", name = "drop-in", version.ref = "braintreeDropInUi" }

Describe the bug

NOTE I made a new issue because the previous is closed and I cannot reopen see https://github.com/braintree/braintree-android-drop-in/issues/325

This issue occurs when our CI builds our application. Locally, do not have this issue because I guess the dependency is cached.

The repository that hosts the cardinalcommerce dependency appears to be unstable lately.

Occurred a few times last week Yesterday was fine Today encounter the same issue

This is the error:

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mapDebugSourceSetPaths'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform cardinalmobilesdk-2.2.7-5.aar (org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.7-5) to match attributes {artifactType=android-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not download cardinalmobilesdk-2.2.7-5.aar (org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.7-5)
         > Could not get resource 'https://cardinalcommerceprod.jfrog.io/artifactory/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-5/cardinalmobilesdk-2.2.7-5.aar'.
            > Could not HEAD 'https://cardinalcommerceprod.jfrog.io/artifactory/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-5/cardinalmobilesdk-2.2.7-5.aar'. Received status code 403 from server

I double checked the credentials here https://developer.paypal.com/braintree/docs/guides/3d-secure/migration/android/v4 which is correct.

This is a snippet from the build.gradle file from the app module.

repositories {
    google()
    mavenCentral()
    maven {
        url = uri("https://cardinalcommerceprod.jfrog.io/artifactory/android")
        credentials {
            username = "braintree_team_sdk"
            password = "AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp"
        }
    }
}

dependencies {
    ...
    implementation(libs.braintree.dropin.ui)
}

To reproduce

Build the application. It is intermittent.

Expected behavior

I can build the application without any dependency errors from cardinalmobilesdk

Screenshots

When this error occurs, you can't use those credentials on JFrog which implies the user is locked out?

image
ersen-lw commented 5 months ago

Failing again at the moment

Out of curiosity, can this be because someone enters the wrong credentials on purpose causing it to be locked? Since the credentials are public does it make sense to have a username or password?

image
sarahkoop commented 5 months ago

Hey @ersen-lw - Unfortunately, this intermittent access issue is due to the hosting platform (Jfrog) of the Cardinal Mobile SDK, so we do not have control over it. We have ongoing communication with the Cardinal teams to try and improve this. Currently, we suggest retrying as the issue usually resolves in a few hours. The credentials included in your build.gradle to access the Cardinal mobile SDK are not login credentials for Jfrog. Please do not attempt to log into Jfrog with those credentials.