Repository navigation
Play Billing follow-ups: plans sheet Retry stays, token store error ends the purchase, runbook cancel step - #26189
Merged
Merged
Conversation
…read, a token store error ends the purchase, runbook cancel step - Plans sheet loading state uses the dedicated failed-plan-read flag, so Retry stays after a usage read clears the shared error. - A token store error during delivery ends the purchase as failed instead of leaving it open for the session. - The trial paywall's bought-before-leaving check asks for a read issued after the question. - Runbook: cancel a stuck purchase from its stored purchase token (the email and order id are gone by then). - Test that Home mounts the resume observer.
…book names how to match the masked key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Five small items the reviewers of #26165 and #26181 left open. None changes a price, a purchase path or an entitlement rule.
play_plans_content.dart,PlayPlansLoading). The loading state decided "failed" from the provider's shared error. A successful usage read clears that error, so the sheet went back to a skeleton with no Retry while the plan read was still known to have failed. It now usesbillingProviderFailed, the same flag the paywalls and the paid app button use since Play Billing: purge waits only on chargeable purchases, deletion runbook, failed-read state (follow-up to #26163) #26165.play_billing.dart,_deliver). If reading or writing the pending-token store threw, the purchase was never finished: the paywall waited forever andPlayBilling.busystayed true, which since Refresh the plan when the app resumes and when Plans & Billing opens #26181 also switches the resume read off for the session._delivernow catches, logs and returns a failed result. The cleanup write after the server has answered has its own catch, so a plan the server granted is still reported as bought; the token is then sent once more on the next launch.trial_paywall_page.dart). It could join a resume read that started before the purchase and offer the monthly trial to someone who had just paid. The 4 s timeout still bounds it.backend/docs/runbooks/play-billing-deletion.md): the step for a purchase stuck more than a day told the operator to find the order in Play Console by the user's order. By then the account's email is deleted and the purchase document holds no order id. It now points at the storedpurchase_tokenand the cancel call the wipe makes.PlanRefreshOnResume, so removing the wrapper fails a test.Product invariants affected
none
How it was verified
play_billing_plans_sheet_test.dart: the plans sheet loading state shows the error state, a usage read clears the shared error, and the error state with Retry is still there (shimmer before the fix).play_billing_test.dart: a purchase with a token store that throws returnsfailedandbusyis false (hung before the fix). A store that fails only on the cleanup write still returnspurchased.plan_refresh_on_resume_test.dart: Home's source mountsPlanRefreshOnResume.flutter test test/unit/play_billing_test.dart test/widgets/play_billing_plans_sheet_test.dart test/widgets/plan_refresh_on_resume_test.dart: 70 passed.flutter analyzeon the changed files: no new issues.UI evidence
UI-Evidence: none -- no layout or copy change; the existing "Unable to load plans" state with Retry now stays on screen in a case where it used to fall back to the existing skeleton
Failure class
No
fix:commits; no declaration required.