collectPaymentMethod method call using NFC reader (Tap to Pay) when NFC reader is disabled leads to an exception:
FATAL EXCEPTION: main
Process: com.stripe.cots.aidlservice, PID: 26554
java.lang.RuntimeException: Unable to destroy activity {*****/com.s.q.Connect}: java.lang.NullPointerException: null receiver
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5424)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5457)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:179)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2306)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7918)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.NullPointerException: null receiver
at java.lang.reflect.Method.invoke(Native Method)
at com.s.q.Connect.onDestroy(:109)
at android.app.Activity.performDestroy(Activity.java:8599)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1452)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5411)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5457)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:179)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2306)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7918)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Code to reproduce
Android version
Android 13
Impacted devices (Android devices or readers)
NFC reader
SDK version
3.0.0
Other information
Happens only when NFC reader is disconnected. Shortly after this exception SDK drops the connection to the NFC reader with unexpected disconnect message
This is now fixed in version 3.6.0 of the SDK – you should receive a LOCAL_MOBILE_NFC_DISABLED error if you attempt to take a Tap to Pay payment while the NFC feature is disabled on the device.
Summary
collectPaymentMethod
method call using NFC reader (Tap to Pay) when NFC reader is disabled leads to an exception:Code to reproduce
Android version
Android 13
Impacted devices (Android devices or readers)
NFC reader
SDK version
3.0.0
Other information
Happens only when NFC reader is disconnected. Shortly after this exception SDK drops the connection to the NFC reader with
unexpected disconnect
message