-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for Payment 2024-08-26] [$250] Subscription - Subscription page changes to not here page while signing out #46735
Comments
Triggered auto assignment to @garrettmknight ( |
@garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #wave-collect - Release 2 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Subscription page changes to not here page while signing out What is the root cause of that problem?When signing out, the Onyx database is cleared. App/src/libs/actions/SignInRedirect.ts Line 31 in 459759d
When Onyx is empty, two processes will be activated. Process 1: The subscription page will be not found page because session and policy fields are empty App/src/hooks/useSubscriptionPlan.ts Lines 21 to 23 in 459759d
Process 2: The App will navigate to the login page because Line 127 in 459759d
The issue is that process 2 is triggered after process 1. This happens because process 2 uses withOnyx to get data from Onyx database, while process 1 uses useOnyx to get data What changes do you think we should make in order to solve the problem?In Expensify.tsx, we need to use useOnyx instead of withOnyx to retrieve data from Onyx What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Subscription - Subscription page changes to not here page while signing out What is the root cause of that problem?The root cause of the problem is that the session is deleted from the Onyx when signing out hence, the App/src/hooks/useSubscriptionPlan.ts Lines 21 to 23 in 862d4aa
Therefore, the App/src/pages/settings/Subscription/SubscriptionSettingsPage.tsx Lines 30 to 32 in 862d4aa
What changes do you think we should make in order to solve the problem?Let's give the
Screen.Recording.2024-08-04.at.18.37.25.mov |
@garrettmknight Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Job added to Upwork: https://www.upwork.com/jobs/~010e94c4a46033756a |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
@cretadn22 Could you please clarify the solution on how it solves the issue? |
Normally, the code in the Therefore, if we use useOnyx in the Expensify component, the correct value will be used on the first rendering, allowing the app to navigate directly to the LogIn page before reaching the subscription page. |
I see. Let's do it. Anyways, WithOnyx is deprecated so it makes sense to migrate, and if that solves the issue, that is a plus. Thanks for the explanation. Only thing that I see is that WithOnyxc will hold rendering the component until data is ready so we will have to make sure useOnyx is not causing any issues due to that. @cretadn22's proposal looks good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @cretadn22 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@garrettmknight This should be on [HOLD for Payment 2024-08-26] according to the production deploy from #46932 (comment) |
Payment Summary:
|
@parasharrajat please complete the checklist and submit for payment |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Steps
Do you agree 👍 or 👎 ? |
Closing - @parasharrajat request payment when you're ready. |
Payment requested as per #46735 (comment) |
$250 approved for @parasharrajat |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.16-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
Subscription page will not change to not here page while signing out
Actual Result:
Subscription page changes to not here page while signing out
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6560189_1722602987569.20240802_204543.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @parasharrajatThe text was updated successfully, but these errors were encountered: