Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.47k stars 2.82k forks source link

[HOLD for payment 2024-10-10] HOLD on #49532 [$250] Close account - Continue button becomes dysfunctional after closing an Expensifail account #48941

Open IuliiaHerets opened 1 month ago

IuliiaHerets commented 1 month ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.31-12 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+nl564@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Sign up with a new Expensifail account on staging.new.expensify.com
  2. Create a workspace
  3. Close the account
  4. Try to sign in with another account

Expected Result:

Continue button takes user to the magic code page

Actual Result:

Continue button stops working

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/47284513-d9be-41db-ae24-74ca2fe42686

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021836048383075873170
  • Upwork Job ID: 1836048383075873170
  • Last Price Increase: 2024-09-17
  • Automatic offers:
    • jjcoffee | Reviewer | 104042768
    • dominictb | Contributor | 104042769
Issue OwnerCurrent Issue Owner: @muttmuure
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

IuliiaHerets commented 1 month ago

@muttmuure 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

dominictb commented 1 month ago

Edited by proposal-police: This proposal was edited at 2024-09-11 02:28:02 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

What is the root cause of that problem?

What alternative solutions did you explore? (Optional)

Option 1:

Option 2:

melvin-bot[bot] commented 3 weeks ago

@muttmuure Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 3 weeks ago

Job added to Upwork: https://www.upwork.com/jobs/~021836048383075873170

melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

jjcoffee commented 3 weeks ago

Thanks for the proposal @dominictb!

we call API update automatic timezone here, we don't check whether the current user account ID is available or not.

I'm not sure I understand why we call this only in this situation (closing an account), can you clarify that? It sounds almost like there's something missing when we close the account (e.g. some Onyx value that isn't being reset).

I'm also a bit confused overall on your RCA, are you saying that the networkRequestQueue never empties because the updateAutomaticTimezone call is returning an error and therefore retrying and clogging up the queue indefinitely?

dominictb commented 3 weeks ago

I'm not sure I understand why we call this only in this situation (closing an account)

but the currentAccountID is not cleared, it still stores the session.accountID value when we did not close account.

I'm also a bit confused overall on your RCA, are you saying that the networkRequestQueue never empties because the updateAutomaticTimezone call is returning an error and therefore retrying and clogging up the queue indefinitely

Yes. You can try it by opening "Inspect" > "Application" > "IndexedDB" > "OnyxDB" > "keypairValue" > Observer the "NetworkRequestQueue" key after we close account.

jjcoffee commented 3 weeks ago

the currentAccountID is not cleared, it still stores the session.accountID value when we did not close account.

Isn't this the overall RCA here then? If we update currentAccountID once the account is deleted, it sounds like the issue would be solved. Or is there some reason for not doing that?

dominictb commented 3 weeks ago

If we update currentAccountID once the account is deleted, it sounds like the issue would be solved

Yes. I updated my proposal to include that solution.

jjcoffee commented 3 weeks ago

Sounds good! Let's go with @dominictb's proposal, probably following the idea to set currentAccountID to -1 (we may tweak this on the PR if necessary).

:ribbon::eyes::ribbon: C+ reviewed

melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to @yuwenmemon, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] commented 3 weeks ago

πŸ“£ @jjcoffee πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 3 weeks ago

πŸ“£ @dominictb πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

dominictb commented 3 weeks ago

@jjcoffee I cannot close the account now, the CTA button is loading infinitely, Can you help check?

https://github.com/user-attachments/assets/22e0130a-9325-4201-be64-2f608f0cba06

jjcoffee commented 3 weeks ago

@dominictb Hmm yeah I get the same on staging.

dominictb commented 2 weeks ago

I think that issue is reported in here.

jjcoffee commented 2 weeks ago

@dominictb Maybe you can try reverting the PR mentioned here in order to keep things moving on this?

melvin-bot[bot] commented 2 weeks ago

@yuwenmemon @jjcoffee @muttmuure @dominictb this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

dominictb commented 2 weeks ago

@jjcoffee I think we need to hold until issue is fixed.

muttmuure commented 2 weeks ago

Not overdue

dominictb commented 2 weeks ago

@jjcoffee The loading issue is fixed. PR is ready.

melvin-bot[bot] commented 1 week ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 week ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.43-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-10-10. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 1 week ago

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:

jjcoffee commented 3 days ago

Regression Test Proposal

  1. Sign up with a new account.
  2. Close the account
  3. With DevTools or logging open, try to sign in with another account.
  4. Verify there is no UpdateAutomaticTimezone call in the logs.
  5. Verify that the continue button works normally, moving to the magic code page without any delay.

Do we agree πŸ‘ or πŸ‘Ž

jjcoffee commented 2 days ago

@muttmuure Friendly bump for payment, thanks! :pray: