You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I click on the 'Collect payment' button multiple times, the app starts multiple card reader connection flows => when I attempt to cancel them, the app sometimes crash.
To Reproduce
Steps to reproduce the behavior:
Go to More Menu -> POS
Add a product
Tap on 'Checkout'
Tap on 'Collect Payment' multiple times within a short timespan
Tap on cancel -> notice the app sometimes crashes.
Expected behavior
Multiple clicks on the collect payment button should still start only a single connection flow.
Logs
Process: com.woocommerce.android.prealpha, PID: 24752
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=75952946, result=0, data=null} to activity {com.woocommerce.android.prealpha/com.woocommerce.android.ui.woopos.root.WooPosActivity}: java.lang.IllegalStateException: Already resumed, but proposed with update Failure
at android.app.ActivityThread.deliverResults(ActivityThread.java:5323)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5362)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
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:7872)
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.IllegalStateException: Already resumed, but proposed with update Failure
at kotlinx.coroutines.CancellableContinuationImpl.alreadyResumedError(CancellableContinuationImpl.kt:559)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:524)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:497)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:368)
at com.woocommerce.android.ui.woopos.cardreader.WooPosCardReaderFacade.onCreate$lambda$0(WooPosCardReaderFacade.kt:41)
at com.woocommerce.android.ui.woopos.cardreader.WooPosCardReaderFacade.$r8$lambda$PgLUY3675ous7MehkdBsT19nqtg(Unknown Source:0)
at com.woocommerce.android.ui.woopos.cardreader.WooPosCardReaderFacade$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:4)
at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:414)
at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:371)
at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:845)
at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:151)
at android.app.Activity.dispatchActivityResult(Activity.java:8628)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5316)
The text was updated successfully, but these errors were encountered:
kidinov
changed the title
[POS] Crash when multiple connection flows are started and cancelled
[Woo POS] Crash when multiple connection flows are started and cancelled
Jul 17, 2024
Describe the bug
When I click on the 'Collect payment' button multiple times, the app starts multiple card reader connection flows => when I attempt to cancel them, the app sometimes crash.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Multiple clicks on the collect payment button should still start only a single connection flow.
Logs
The text was updated successfully, but these errors were encountered: