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

App Crashes upon returning from browser while rotating the screen in landscape mode #487

Open
yosrri opened this issue Oct 9, 2024 · 2 comments

Comments

@yosrri
Copy link

yosrri commented Oct 9, 2024

Braintree SDK Version

6.13.0 Drop in UI

Environment

Sandbox

Android Version & Device

samsng A52S Android 14

Braintree dependencies

implementation "com.braintreepayments.api:drop-in:6.13.0"

Describe the bug

Upon opening paypal browser from the drop in, rotating the phone in landscape mode and successfully saving and continuing, the app crashes when i return to it from browser

Process: com.mailbox.debug, PID: 13668
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mailbox.debug/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:4164)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6499)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:6378)
at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:76)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
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:2685)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
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:8975)
at android.app.Activity.performCreate(Activity.java:8944)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322) 
at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6499) 
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:6378) 
at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:76) 
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) 
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:2685) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:230) 
at android.os.Looper.loop(Looper.java:319) 
at android.app.ActivityThread.main(ActivityThread.java:8919) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) 

To reproduce

Open Drop in UI
Choose PayPal
Rotate the phone in browser
add credentials save and continue

Expected behavior

that it shouldn't crash

Screenshots

No response

@saperi22
Copy link
Contributor

@yosrri Thanks for reporting this. We'll take a look at this and will let you know of any action we'll take.

@yosrri11
Copy link

@saperi22 A note to mention also that we lock orientation to portrait for Mobile phones while tablets can do orientation freely

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