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

com.braintreepayments.api.ThreeDSecureActivity instance is Leaking #898

Open
AnastasiyaVia opened this issue Jan 28, 2024 · 2 comments
Open

Comments

@AnastasiyaVia
Copy link

Braintree SDK Version

4.39.0

Environment

Both

Android Version & Device

all devices & versions

Braintree dependencies

def brainTreeVersion = '4.39.0'

implementation "com.braintreepayments.api:card:$brainTreeVersion"
implementation "com.braintreepayments.api:google-pay:$brainTreeVersion"
implementation "com.braintreepayments.api:paypal:$brainTreeVersion"
implementation "com.braintreepayments.api:local-payment:$brainTreeVersion"
implementation "com.braintreepayments.api:data-collector:$brainTreeVersion"
implementation "com.braintreepayments.api:paypal-data-collector:$brainTreeVersion"
implementation("com.braintreepayments.api:three-d-secure:$brainTreeVersion") {
    exclude group: 'org.bouncycastle'
}
implementation 'com.braintreepayments.api:drop-in:6.13.0'
implementation 'com.braintreepayments:encryption:2.1.0'
implementation 'com.braintreepayments:popup-bridge:3.2.0'

Describe the bug

I've encountered an issue while 3DS payments with BraintreeSDK. During the payment process, specifically when adding payment information or attempting to complete a transaction with 3DS security enabled, we're experiencing a leak detection within the SDK.

Any guidance or steps you could share to address this leak would be greatly appreciated.

Thank you for your prompt attention to this urgent issue.

Please see the leak below:
┬─── │ GC Root: Thread object │ ├─ android.net.ConnectivityThread instance │ Leaking: NO (PathClassLoader↓ is not leaking) │ Thread name: 'ConnectivityThread' │ ↓ Thread.contextClassLoader ├─ dalvik.system.PathClassLoader instance │ Leaking: NO (init↓ is not leaking and A ClassLoader is never leaking) │ ↓ ClassLoader.runtimeInternalObjects ├─ java.lang.Object[] array │ Leaking: NO (init↓ is not leaking) │ ↓ Object[11001] ├─ com.cardinalcommerce.a.init class │ Leaking: NO (a class is never leaking) │ ↓ static init.cca_continue │ ~~~~~~~~~~~~ ├─ com.cardinalcommerce.a.CardinalError instance │ Leaking: UNKNOWN │ Retaining 95.2 kB in 284 objects │ ↓ CardinalError.cca_continue │ ~~~~~~~~~~~~ ├─ com.cardinalcommerce.cardinalmobilesdk.models.CardinalChallengeObserver instance │ Leaking: UNKNOWN │ Retaining 143.0 kB in 2214 objects │ ↓ init.getSDKVersion │ ~~~~~~~~~~~~~ ├─ com.cardinalcommerce.shared.userinterfaces.ProgressDialog instance │ Leaking: UNKNOWN │ Retaining 41.8 kB in 843 objects │ configure instance of com.braintreepayments.api.ThreeDSecureActivity with mDestroyed = true │ ↓ ProgressDialog.configure │ ~~~~~~~~~ ╰→ com.braintreepayments.api.ThreeDSecureActivity instance ​ Leaking: YES (ObjectWatcher was watching this because com.braintreepayments.api.ThreeDSecureActivity received ​ Activity#onDestroy() callback and Activity#mDestroyed is true) ​ Retaining 8.1 kB in 263 objects ​ key = 86017ee6-7b58-4081-a181-38cf2cbd85f8 ​ watchDurationMillis = 45169 ​ retainedDurationMillis = 40168 ​ mApplication instance of via.rider.ViaRiderDebugApplication ​ mBase instance of androidx.appcompat.view.ContextThemeWrapper
an

To reproduce

  1. add credit card
  2. pay with credit card including 3ds challenge
  3. every time just after we close 3ds screen - the leak from the leak canary is detected

Expected behavior

No leak should be on this scenario

Screenshots

Screenshot 2024-01-28 at 16 22 07
@sarahkoop
Copy link
Contributor

Hi @AnastasiyaVia, thanks for reporting this issue - we are actively investigating it and will post an update here when we have more info.

@DBroli
Copy link

DBroli commented Nov 14, 2024

Hello, are there any updates on this issue?
Still reproducible on 4.49.1

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

3 participants