Closed irfano closed 2 weeks ago
App Name | WooCommerce-Wear Android | |
Platform | ⌚️ Wear OS | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 8219ffa0b7d5a58daf2d81bc9ed201d6f7a39561 | |
Direct Download | woocommerce-wear-prototype-build-pr12889-8219ffa.apk |
📲 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 | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 8219ffa0b7d5a58daf2d81bc9ed201d6f7a39561 | |
Direct Download | woocommerce-prototype-build-pr12889-8219ffa.apk |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 40.21%. Comparing base (
133b9d9
) to head (8219ffa
). Report is 5 commits behind head on trunk.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @irfano I was able to reproduce the crash. And I can confirm the changes fix the crash. Although the changes won't hide the main CTA, we will end up showing the following primary CTA, which doesn't make sense.:
I think we should keep showing the Connect to the site
button no matter what, since it is possible the user might want to connect this new WP.com account to the site address they entered. So, maybe we can just set the primary button visibility in the account mismatch function to true always. Wdyt?
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 en 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.
To create an empty account you can use this endpoint:
https://public-api.wordpress.com/rest/v1.1/users/new?
Body:
{
"client_secret": "wc.oauth.app_secret in your local gradle.properties",
"client_id": "wc.oauth.app_id in your local gradle.properties",
"signup_flow_name": "mobile-ios",
"flow": "signup",
"scheme": "woocommerce",
"password": "",
"email": "@gmail.com",
"username": "",
"validate": false,
"send_verification_email": true
}
Good catch, @JorgeMucientes!
This PR doesn't change the primary button on the mismatch account screen. Mismatch account screen is different (see AccountMismatchErrorFragment
). I updated the PR description according to this.
If you tap the back button from the mismatch account screen, you'll see the site picker screen. This PR hides the primary button on that screen:
Closes: #12868
Description
This fixes a crash on the site picker screen when the
sites
data is null. I couldn't reproduce the crash. But when thesites.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
I couldn't reproduce.@JorgeMucientes could reproduce it, see comments.Testing information
No need to test since we can't reproduce.
The tests that have been performed
Tested normal mismatch account case.
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: