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

Crash in braintree #470

Open
maidt2212 opened this issue Apr 8, 2024 · 7 comments
Open

Crash in braintree #470

maidt2212 opened this issue Apr 8, 2024 · 7 comments

Comments

@maidt2212
Copy link

maidt2212 commented Apr 8, 2024

Braintree SDK Version

6.15.0

Environment

Production

Android Version & Device

Vivo X70 android 14

Braintree dependencies

com.braintreepayments.api:drop-in:6.15.0
com.google.android.gms:play-services-wallet:16.0.0

Describe the bug

Crash occurs:
Fatal Exception: java.lang.IllegalStateException: Attempting to launch an unregistered ActivityResultLauncher with contract com.braintreepayments.api.k8@f2ff5e7 and input com.braintreepayments.api.s8@c024594. You must ensure the ActivityResultLauncher is registered before calling launch().
at androidx.activity.result.ActivityResultRegistry$2.void launch(java.lang.Object,androidx.core.app.ActivityOptionsCompat)(ActivityResultRegistry.java:6)
at androidx.activity.result.ActivityResultLauncher.void launch(java.lang.Object)(:1)
at com.braintreepayments.api.ThreeDSecureLifecycleObserver.void launch(com.braintreepayments.api.ThreeDSecureResult)(:2)
at com.braintreepayments.api.ThreeDSecureClient.void startVerificationFlow(androidx.fragment.app.FragmentActivity,com.braintreepayments.api.Configuration,com.braintreepayments.api.ThreeDSecureRequest,com.braintreepayments.api.ThreeDSecureResult,com.braintreepayments.api.ThreeDSecureResultCallback)(ThreeDSecureClient.java:16)
at com.braintreepayments.api.ThreeDSecureClient.void access$400(com.braintreepayments.api.ThreeDSecureClient,androidx.fragment.app.FragmentActivity,com.braintreepayments.api.Configuration,com.braintreepayments.api.ThreeDSecureRequest,com.braintreepayments.api.ThreeDSecureResult,com.braintreepayments.api.ThreeDSecureResultCallback)()
at com.braintreepayments.api.ThreeDSecureClient$6.void onResult(com.braintreepayments.api.Configuration,java.lang.Exception)(:11)
at com.braintreepayments.api.BraintreeClient.void getConfiguration$lambda-1$lambda-0(com.braintreepayments.api.ConfigurationCallback,com.braintreepayments.api.Configuration,java.lang.Exception)(BraintreeClient.kt:1)
at com.braintreepayments.api.BraintreeClient.void $r8$lambda$ATZ2el4WaLLTJccvUdiEX_8XZQU(com.braintreepayments.api.ConfigurationCallback,com.braintreepayments.api.Configuration,java.lang.Exception)()
at com.braintreepayments.api.BraintreeClient$$ExternalSyntheticLambda9.void com.braintreepayments.api.BraintreeClient$$InternalSyntheticLambda$1$f36fdbbd43a6319674ebce7ee85bfb8515f655d86f82d1089636c225158f6c1c$0.onResult(com.braintreepayments.api.Configuration,java.lang.Exception)(:2)
at com.braintreepayments.api.ConfigurationLoader.void loadConfiguration(com.braintreepayments.api.Authorization,com.braintreepayments.api.ConfigurationLoaderCallback)(ConfigurationLoader.kt:10)
at com.braintreepayments.api.BraintreeClient.void getConfiguration$lambda-1(com.braintreepayments.api.BraintreeClient,com.braintreepayments.api.ConfigurationCallback,com.braintreepayments.api.Authorization,java.lang.Exception)(BraintreeClient.kt:1)
at com.braintreepayments.api.BraintreeClient.void $r8$lambda$uXb_Q2SC3tZeqa7FJDcACDNy02I(com.braintreepayments.api.BraintreeClient,com.braintreepayments.api.ConfigurationCallback,com.braintreepayments.api.Authorization,java.lang.Exception)()
at com.braintreepayments.api.BraintreeClient$$ExternalSyntheticLambda0.void com.braintreepayments.api.BraintreeClient$$InternalSyntheticLambda$0$4f6b5f1da9dca7697b7be9a84da0522ad87eb07f5c9b3b53a6095a4669734d0f$0.onAuthorizationResult(com.braintreepayments.api.Authorization,java.lang.Exception)(:4)
at com.braintreepayments.api.AuthorizationLoader.void loadAuthorization(com.braintreepayments.api.AuthorizationCallback)(AuthorizationLoader.kt:2)
at com.braintreepayments.api.BraintreeClient.void getAuthorization(com.braintreepayments.api.AuthorizationCallback)(:7)
at com.braintreepayments.api.BraintreeClient.void getConfiguration(com.braintreepayments.api.ConfigurationCallback)(:10)
at com.braintreepayments.api.ThreeDSecureClient.void continuePerformVerification(androidx.fragment.app.FragmentActivity,com.braintreepayments.api.ThreeDSecureRequest,com.braintreepayments.api.ThreeDSecureResult,com.braintreepayments.api.ThreeDSecureResultCallback)(:13)
at com.braintreepayments.api.ThreeDSecureClient.void continuePerformVerification(androidx.fragment.app.FragmentActivity,com.braintreepayments.api.ThreeDSecureRequest,com.braintreepayments.api.ThreeDSecureResult)(:5)

To reproduce

I just add credit card to payment

Expected behavior

No crash

Screenshots

No response

@sshropshire
Copy link
Contributor

Hi @maidt2212 can you provide more information on how to reproduce this issue? Also as a test, does it work when minifyEnabled is set to false in your app's build.gradle?

@maidt2212
Copy link
Author

maidt2212 commented Apr 8, 2024

Hi @sshropshire Actually we cannot reproduce it. I see this crash from firebase crashlytic. Let me add minifyEnabled and observe it. Can you give us some other suggestion like keep class in proguard file in case we cannot change minifyEnabled to false? Thank you

@sshropshire
Copy link
Contributor

@maidt2212 ok got it thank you. I mention that only because the stack trace appears minified. I wonder if the obfuscation process might cause a bug somehow.

@maidt2212
Copy link
Author

maidt2212 commented Apr 9, 2024

Hi @sshropshire We refer implementation from this source https://github.com/pikaju/flutter-braintree So Can you check if it have any issue? crash from https://github.com/pikaju/flutter-braintree/blob/main/android/src/main/java/com/example/flutter_braintree/FlutterBraintreeCustom.java. And device is in foreground.

@sshropshire
Copy link
Contributor

@maidt2212 we actually don't own that repo. We don't offer official support for Flutter at the moment. Can you file an issue with pikaju/flutter-braintree and let us know if you have additional information?

@maidt2212
Copy link
Author

maidt2212 commented Apr 25, 2024

Hi @sshropshire I updated the log without encode in issue description above. Can you check if it is possible to fix in braintree. Otherwise I will check again in flutter side

@maidt2212
Copy link
Author

Hi @sshropshire Sorry for remind again, But can you please help to check in braintree lib? Although this lib is used in flutter app but we implement it as native code and integrate. So as you see the crash occur in native android code of braintree.

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

2 participants