Skip to content

Conversation

@irfano
Copy link
Contributor

@irfano irfano commented Nov 12, 2024

(cherry picked from commit 8219ffa)

Description

This fixes a crash on the site picker screen when the sites data is null. I couldn't reproduce the crash. But when the sites.value is null for any reason, it makes sense to hide the primary button on the site picker screen.
This case may occur rarely and temporarily when the screen is initializing.

Steps to reproduce

"To reproduce the issue, you need a WordPress.com account with 0 sites. Not even a blog. Which is tricky to get through the normal flow because WP.com will create 1 blog for you as soon as you create a new account. However, if you delete that blog (and wait a few hours until the deletion is completed) you'll end up with a WP.com account with 0 sites. Using that account o log into any Jetpack connected site will result in the account mismatch screen and the app crashing. - #12889 (comment)"

Testing information

Tested normal mismatch account case.

The tests that have been performed

Tested normal mismatch account case again for this PR.

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

@irfano irfano 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 Nov 12, 2024
@irfano irfano added this to the 21.0.1 milestone Nov 12, 2024
Copy link
Member

@hichamboushaba hichamboushaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the changes were already tested in #12889

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 21.0.1. 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

@wpmobilebot
Copy link
Collaborator

📲 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
Commitcab9473
Direct Downloadwoocommerce-wear-prototype-build-pr12914-cab9473.apk

@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
Commitcab9473
Direct Downloadwoocommerce-prototype-build-pr12914-cab9473.apk

@irfano irfano merged commit bf25c61 into release/21.0.1 Nov 12, 2024
16 of 18 checks passed
@irfano irfano deleted the hotfix/fix-crash-for-mismatched-account-case branch November 12, 2024 16:08
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.

5 participants