Closed IgorButirsky closed 1 year ago
Hi @IgorButirsky thanks for using the Braintree SDK for Android. Is this reproducible every time the app attempts a 3DS transaction?
Hi @sshropshire. No, this is not reproducible on each device. For example, I reproduced it on Pixel 7 Pro, but not on OnePlus 7 Pro. But if this crash happens on some devices, it happens on them all the time. Also, this issue probably depends on the bank. We were able to reproduce it for credit cards emitted by some European banks.
@IgorButirsky ok. Are there any banks in particular? And if possible, could you reproduce the error and set a breakpoint here to inspect if the resulting JSON is abnormally large?
@sshropshire, For us it was Universal Bank. Here is the screenshot: In general, the resulting json looks fine except one value :
{
...
"lookup": {
...
"pareq": "..."
}
}
the pareq
string is a way long - 339268 characters
@IgorButirsky interesting. ~I'll reach out to Cardinal, our 3rd party MPI to see if this is a known issue.~ Actually this could also be an issue on the Braintree side. I'll gather more info and report back when I have new details.
Hi @IgorButirsky would you mind providing the merchant id and a transaction id for one of these requests that's triggering the Android error? I can forward this to the appropriate team and they can take a more in depth look.
👋 @IgorButirsky If you can contact Support referencing this issue, your merchant ID and a sample transaction ID, they can coordinate with the appropriate teams at PayPal/Braintree to investigate further. In the meantime, I'm going to go ahead and close this issue since it's been quiet for a few weeks.
Hi @hollabaq86, the issue is still relevant, we moved the conversation to emails.
@IgorButirsky we do have some internal tracking on this issue. Would you prefer us to re-open this for visibility?
@sshropshire yeah, would be good.
So it's nice that #711 prevents the crash from happening, but is there more to this than The 3D Secure response returned is too large to continue. Please contact Braintree Support for assistance.
? How do we support these users that our trying to use our applications?
Is there anyway to make the transactions smaller, so that they don't hit this limit?
We now catch this error to prevent a crash and forward it to the merchant in version 4.27.0 of the SDK.
@cltnschlosser unfortunately Braintree support will be the best resource since this is technically not an issue with the SDK. The issuing bank is responsible for enforcing a 3DS limit on the PaReq per spec. Support will help route communication to the correct server side team to help identify and fix the root issue.
Wanted to post one more update, our colleagues who own Braintree's API have updated their logic to screen for abnormally large sized responses like this so that they can cap the size and not send so much info that they crash merchant apps.
This still doesn't resolve the source of these issues - the ACS provider - but we've added as much we can defensively to prevent these type exceptions
@hollabaq86 I think this is actually causing new crashes, we're getting truncated data <base-64-string>...
and then it ends with the ellipse. Results in:
Caused by java.lang.IllegalArgumentException: bad base-64
at android.util.Base64.decode(Base64.java:163)
at android.util.Base64.decode(Base64.java:138)
at android.util.Base64.decode(Base64.java:120)
at com.cardinalcommerce.cardinalmobilesdk.Cardinal.cca_continue(:16179)
at com.braintreepayments.api.CardinalClient.continueLookup(CardinalClient.java:44)
at com.braintreepayments.api.ThreeDSecureActivity.onCreateInternal(ThreeDSecureActivity.java:43)
at com.braintreepayments.api.ThreeDSecureActivity.onCreate(ThreeDSecureActivity.java:31)
@cltnschlosser ack, I'd follow #724 for updates on this issue
quick update: we're also working on reverting our changes to the API that I mentioned in this issue
Integration Details (please complete the following information):
Describe the bug The app crashes during the 3D Secure payment with
TransactionTooLargeException
.Stacktrace:
Stacktrace at the moment of starting ThreeDSecureActivity:
The crash happens not always and most likely depends on the payload that is transferred to the ThreeDSecureActivity within the extras.