woocommerce-android icon indicating copy to clipboard operation
woocommerce-android copied to clipboard

[Woo POS] Crash if activity dies during IPP flow

Open kidinov opened this issue 1 year ago • 3 comments
trafficstars

Closes: #12419

Description

Take a look at my comments in the PR with an explanation of the problem for more content

@samiuelson I am not sure if the picked solutions are the best, so please look into this critically

Steps to reproduce

  • Enabled don't keep activities
  • Start card payment flow
  • Hide/open activity

But there is another crash happens when the above fixed:

  • Enabled don't keep activities
  • Start card payment flow
  • Hide/open activity
  • Cancel or finish the payment flow

Testing information

The tests that have been performed

I have tested the steps to reproduce. Also I retested the IPP flows

Images/gif

  • [x] I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • [ ] The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • [ ] Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • [ ] Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

kidinov avatar Aug 27 '24 14:08 kidinov

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit96cb5996e9640581f4e8f6b9ebbcbc7dc561576f
Direct Downloadwoocommerce-wear-prototype-build-pr12422-96cb599.apk

wpmobilebot avatar Aug 27 '24 14:08 wpmobilebot

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit96cb5996e9640581f4e8f6b9ebbcbc7dc561576f
Direct Downloadwoocommerce-prototype-build-pr12422-96cb599.apk

wpmobilebot avatar Aug 27 '24 15:08 wpmobilebot

Codecov Report

Attention: Patch coverage is 41.66667% with 21 lines in your changes missing coverage. Please review.

Project coverage is 40.71%. Comparing base (22a14bb) to head (96cb599). Report is 27 commits behind head on trunk.

Files with missing lines Patch % Lines
...oid/ui/woopos/cardreader/WooPosCardReaderFacade.kt 0.00% 12 Missing :warning:
...oid/ui/woopos/home/totals/WooPosTotalsViewModel.kt 72.22% 2 Missing and 3 partials :warning:
...ts/methodselection/SelectPaymentMethodViewModel.kt 0.00% 3 Missing :warning:
...woopos/cardreader/WooPosCardReaderPaymentStatus.kt 66.66% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #12422      +/-   ##
============================================
- Coverage     40.71%   40.71%   -0.01%     
- Complexity     5614     5615       +1     
============================================
  Files          1219     1219              
  Lines         68218    68226       +8     
  Branches       9378     9381       +3     
============================================
+ Hits          27778    27781       +3     
- Misses        37890    37894       +4     
- Partials       2550     2551       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 27 '24 15:08 codecov-commenter

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ IllegalArgumentException: Navigation action/destination com.woocommerce.android:id/action_selectPaymentMethodFragment_to_ca... OrderDetails View Issue
  • ‼️ IllegalArgumentException: Navigation action/destination com.woocommerce.android:id/action_selectPaymentMethodFragment_to_ca... com.woocommerce.android.ui.payments.methodselec... View Issue
  • ‼️ IllegalArgumentException: Navigation action/destination com.woocommerce.android:id/action_selectPaymentMethodFragment_to_ca... com.woocommerce.android.ui.payments.methodselec... View Issue

Did you find this useful? React with a 👍 or 👎

sentry[bot] avatar Sep 06 '24 20:09 sentry[bot]