‘java.lang.NullPointerException: config.checkoutBaseActivity must not be null’ causing crash
Closed this issue · 1 comments
PayPal Android SDK Version
1.4.1
Environment
Sandbox
Android Version & Device
samsung Galaxy S23 -Android14
PayPal dependencies
implementation("com.paypal.android:paypal-native-payments:1.4.1")
implementation "com.paypal.android:payment-buttons:1.4.1"
Describe the bug
java.lang.NullPointerException: config.checkoutBaseActivity must not be null
at com.paypal.pyplcheckout.ui.utils.PYPLCheckoutUtils.fallBackToWeb(PYPLCheckoutUtils.kt:397)
at com.paypal.pyplcheckout.ui.utils.PYPLCheckoutUtils.fallbackIndefinite(PYPLCheckoutUtils.kt:358)
at com.paypal.pyplcheckout.ui.utils.PYPLCheckoutUtils.fallBack(PYPLCheckoutUtils.kt:324)
at com.paypal.pyplcheckout.ui.utils.PYPLCheckoutUtils.fallBack$default(PYPLCheckoutUtils.kt:315)
at com.paypal.pyplcheckout.ui.feature.home.viewmodel.PostAuthSuccessHandler.handleEligibility(PostAuthSuccessHandler.kt:159)
at com.paypal.pyplcheckout.ui.feature.home.viewmodel.PostAuthSuccessHandler.handleFlowAfterAuth$lambda-0(PostAuthSuccessHandler.kt:120)
at com.paypal.pyplcheckout.ui.feature.home.viewmodel.PostAuthSuccessHandler.$r8$lambda$4ImPTlj70bbScm67-q3jFQsaA1g(Unknown Source:0)
at com.paypal.pyplcheckout.ui.feature.home.viewmodel.PostAuthSuccessHandler$$ExternalSyntheticLambda0.invoke(Unknown Source:2)
at com.paypal.pyplcheckout.domain.featureflag.FetchUserExperimentsUseCase$invoke$1$1.invoke(FetchUserExperimentsUseCase.kt:45)
at com.paypal.pyplcheckout.domain.featureflag.FetchUserExperimentsUseCase$invoke$1$1.invoke(FetchUserExperimentsUseCase.kt:44)
at com.paypal.pyplcheckout.ui.feature.sca.ScaUiListenerKt.runOnUiThread$lambda-0(ScaUiListener.kt:18)
at com.paypal.pyplcheckout.ui.feature.sca.ScaUiListenerKt.$r8$lambda$5HKKje5dh_9lE2lXh6tMap1Cr-U(Unknown Source:0)
at com.paypal.pyplcheckout.ui.feature.sca.ScaUiListenerKt$$ExternalSyntheticLambda0.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
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
When the Internet speed is very slow, after calling the payPalClient.startCheckout(new PayPalNativeCheckoutRequest(this.orderId, null)) method, the "Secure login for you" prompt will pop up. At this time, quickly close and press the return key to close the current payment page. Will trigger config.checkoutBaseActivity must not be null
Expected behavior
no crash
Screenshots
No response