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

DropIn crashing when trying to add Paypal payment method on Android 14 phones only #494

Open
amijsul opened this issue Jan 9, 2025 · 1 comment

Comments

@amijsul
Copy link

amijsul commented Jan 9, 2025

Braintree SDK Version

6.16.0

Environment

Both

Android Version & Device

Android 14

Braintree dependencies

group = "com.braintreepayments.api", name = "drop-in"

Describe the bug

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amientertainment.AMISmartBar/com.braintreepayments.api.DropInActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3782)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference
at com.braintreepayments.api.DropInActivity.getDropInRequest(DropInActivity.java:124)
at com.braintreepayments.api.DropInActivity.onCreate(DropInActivity.java:78)
at android.app.Activity.performCreate(Activity.java:8595)
at android.app.Activity.performCreate(Activity.java:8573)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3764)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:205) 
at android.os.Looper.loop(Looper.java:294) 
at android.app.ActivityThread.main(ActivityThread.java:8177) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 

To reproduce

Only on Android 14,
I open the drop in and select to add a Paypal payment method.
Log into paypal and authorizing the payment
Actual: the webview leaves itself open and my app crashes in the background with the exception above in the DropInActivity from the sdk.

Expected behavior

the webview is supposed to close itself and return to my app with paypal nonce

Screenshots

No response

@amijsul
Copy link
Author

amijsul commented Jan 15, 2025

can anyone at Braintree take a look at this?

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

1 participant