Skip to content

[Login] Fix a crash during login after Activity or process death #14103

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

Open
wants to merge 1 commit into
base: release/22.4
Choose a base branch
from

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented May 23, 2025

WOOMOB-381

Description

This PR fixes a crash that happens during the site credentials login, the crash happens if a Activity or process death occurred when the Application Passwords tutorial screen was shown, and the user dismissed it and retried login.

Important

I'm targeting release/22.4 branch with the fix as this impacted 268 users just in the last month, but if you feel this should go to trunk, please let me know.

Steps to reproduce

  1. Enable "Don't keep activities" in the developer options of your device.
  2. Prepare a site that can't use native site credentials login (for example using this plugin, and enabling captcha for "WordPress login")
  3. Open the app and start login.
  4. Enter the site address, then credentials, then tap on Continue.
  5. In the Application Passwords tutorial screen, tap on Contact support
  6. Go back to the site credentials screen.
  7. Tap on Continue again.

Testing information

  • Confirm the app doesn't crash.

The tests that have been performed

Tested on an emulator, and confirmed that the app crashs because of this on trunk and release/22.4 branches, this branch fixes it.

  • 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.

@hichamboushaba hichamboushaba added type: crash The worst kind of bug. feature: login Related to any part of the log in or sign in flow, or authentication. labels May 23, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented May 23, 2025

1 Warning
⚠️ This PR is assigned to the milestone 22.4 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@hichamboushaba hichamboushaba added this to the 22.4 ❄️ milestone May 23, 2025
@hichamboushaba hichamboushaba marked this pull request as ready for review May 23, 2025 13:49
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 23, 2025

📲 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
Commit1092a30
Direct Downloadwoocommerce-wear-prototype-build-pr14103-1092a30.apk

@hichamboushaba hichamboushaba force-pushed the issue/WOOMOB-381-fix-app-passwords-crash branch from 155d42e to 1092a30 Compare May 23, 2025 14:07
@wpmobilebot
Copy link
Collaborator

📲 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
Commit1092a30
Direct Downloadwoocommerce-prototype-build-pr14103-1092a30.apk

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 38.51%. Comparing base (15eb1b6) to head (1092a30).

Files with missing lines Patch % Lines
...n/sitecredentials/LoginSiteCredentialsViewModel.kt 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##             release/22.4   #14103      +/-   ##
==================================================
- Coverage           38.51%   38.51%   -0.01%     
  Complexity           9616     9616              
==================================================
  Files                2127     2127              
  Lines              117218   117219       +1     
  Branches            15073    15074       +1     
==================================================
- Hits                45152    45150       -2     
- Misses              67942    67944       +2     
- Partials             4124     4125       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: login Related to any part of the log in or sign in flow, or authentication. type: crash The worst kind of bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants