Skip to content
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-12-07] [HOLD for payment 2024-12-05] [HOLD for payment 2024-12-03] [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. #52894

Open
1 of 8 tasks
trjExpensify opened this issue Nov 21, 2024 · 36 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@trjExpensify
Copy link
Contributor

trjExpensify commented Nov 21, 2024

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: v9.0.65-1
Reproducible in staging?: Y
**Reproducible in production?:**Y
**If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:**N/A
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @trjExpensify
Slack conversation : #convert thread

Action Performed:

  1. Sign-up on expensify.com
  2. Choose the “1-9” option on the home page (signUpQualifier: vsb)
  3. Get redirected to new.expensify.com
  4. Observe a workspace is created
  5. Don’t complete the onboarding modal steps (hasCompletedGuidedSetupFlow: false)
  6. Refresh the page
  7. Observe another workspace is created
  8. Type in expensify.com in the browser URL and click enter
  9. Get redirected to new.expensify.com (classicRedirect.dismissed: false)
  10. Another workspace is created

Expected Result:

If we’ve created a workspace for the new sign-up already, don’t create another one when they refresh or return.

Actual Result:

We create a workspace every time they refresh or get redirected to NewDot and haven’t completed the onboarding modal steps yet.

Workaround:

N/A

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Refreshing the page

2024-11-21_12-29-41.mp4

Returning to expensify.com

2024-11-21_12-08-53.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021859580489556912069
  • Upwork Job ID: 1859580489556912069
  • Last Price Increase: 2024-11-21
  • Automatic offers:
    • ishpaul777 | Contributor | 105120851
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @trjExpensify
@trjExpensify trjExpensify added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 21, 2024
@trjExpensify trjExpensify self-assigned this Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.

@mountiny
Copy link
Contributor

@nkdengineer This is coming from your PR here https://github.com/Expensify/App/pull/51839/files

We should not be creating the workspace on each mount forever. Only if there is no group policy the user is admin of yet

@FitseTLT
Copy link
Contributor

Proposal

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

Multiple workspaces get created when someone either refreshes the page, or drops off and returns later.

What is the root cause of that problem?

We are already returning early in case there is onboarding policy id set but on refresh the useOnyx will not make the data available and the effect runs too early

if (!isVsb || !!onboardingPolicyID) {
return;

What changes do you think we should make in order to solve the problem?

We should first check that onBoarding Policy ID data is loaded not loading

const [onboardingPolicyID] = useOnyx(ONYXKEYS.ONBOARDING_POLICY_ID);

    const [onboardingPolicyID, onboardingPolicyIDResults] = useOnyx(ONYXKEYS.ONBOARDING_POLICY_ID);

if (!isVsb || !!onboardingPolicyID || isLoadingOnyxValue(onboardingPolicyIDResults)) {
            return;
        }

What alternative solutions did you explore? (Optional)

@FitseTLT
Copy link
Contributor

@mountiny The code is already doing that but the effect runs too early for the useEffect. I have posted a fix I can immediately raise a PR if you want 👍

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Nov 21, 2024
@melvin-bot melvin-bot bot changed the title [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

Current assignee @jayeshmangwani is eligible for the External assigner, not assigning anyone new.

@mountiny
Copy link
Contributor

@jayeshmangwani I see the offending PR is just on the fence of the 1 week regression period and it was paid out. I think its fair if you will review this PR as part of regression still. Let us know if that sounds fine with you

@FitseTLT I think your solution makes sense, you also need to add the isLoading to the useEffect dependency but sounds good.

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 21, 2024
@mountiny mountiny self-assigned this Nov 21, 2024
@FitseTLT
Copy link
Contributor

@jayeshmangwani I see the offending PR is just on the fence of the 1 week regression period and it was paid out. I think its fair if you will review this PR as part of regression still. Let us know if that sounds fine with you

@FitseTLT I think your solution makes sense, you also need to add the isLoading to the useEffect dependency but sounds good.

Yep I only missed it when commenting the proposal 👍

@myspace20
Copy link

@trjExpensify I requested to become a contributor through email, but I have not received feedback for a few days. Is there another way to do this?

Copy link

melvin-bot bot commented Nov 21, 2024

📣 @myspace20! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@jayeshmangwani
Copy link
Contributor

@jayeshmangwani I see the offending PR is just on the fence of the 1 week regression period and it was paid out. I think its fair if you will review this PR as part of regression still. Let us know if that sounds fine with you

Yes, I am definitely fine with it. We missed the case during testing

@jayeshmangwani
Copy link
Contributor

@mountiny, @FitseTLT 's Suggestion looks good to me here. Should I raise a PR quickly, or will @FitseTLT do it?

@FitseTLT
Copy link
Contributor

@jayeshmangwani I am already preparing 👍

@jayeshmangwani
Copy link
Contributor

Cool, please do it

@jayeshmangwani
Copy link
Contributor

offending PR is just on the fence of the 1 week regression period and it was paid out

@mountiny BTW, the payment for the original issue that this one is coming from hasn't been completed yet for me(I've requested on ND today). We can hold the payment until this issue is resolved. I can delete the payment request for that issue, please let me know.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 25, 2024
@melvin-bot melvin-bot bot changed the title [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. [HOLD for payment 2024-12-03] [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. Nov 26, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 26, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

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

If no regressions arise, payment will be issued on 2024-12-03. 🎊

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

  • @jayeshmangwani requires payment through NewDot Manual Requests
  • @FitseTLT requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Nov 26, 2024

@jayeshmangwani @trjExpensify @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 28, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-12-03] [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. [HOLD for payment 2024-12-05] [HOLD for payment 2024-12-03] [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. Nov 28, 2024
Copy link

melvin-bot bot commented Nov 28, 2024

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

If no regressions arise, payment will be issued on 2024-12-05. 🎊

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

  • @jayeshmangwani requires payment through NewDot Manual Requests
  • @FitseTLT requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Nov 28, 2024

@jayeshmangwani @trjExpensify @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@ishpaul777
Copy link
Contributor

ishpaul777 commented Nov 28, 2024

👋 Please assign me here for #53093 review

Copy link

melvin-bot bot commented Nov 29, 2024

📣 @ishpaul777 🎉 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 📖

@mountiny
Copy link
Contributor

@ishpaul777 helped to jump in for urgent review, $250 to them

@trjExpensify
Copy link
Contributor Author

Yep, sounds good!

@myspace20
Copy link

@trjExpensify please has the contributor onbording problem been resolved? I mean the slack channel among others.

@trjExpensify
Copy link
Contributor Author

trjExpensify commented Nov 29, 2024

Slack access is still restricted, you will be notified when that's resolved, but there's no timeline I can give you on it.

Regardless, gaining access to Slack isn't a requirement to start putting proposals forward on issues labelled Help wanted. Have you looked at the issues available as I mentioned here?

@myspace20
Copy link

@trjExpensify Thanks I will do just that.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 30, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-12-05] [HOLD for payment 2024-12-03] [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] [HOLD for payment 2024-12-03] [$250] [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. Nov 30, 2024
Copy link

melvin-bot bot commented Nov 30, 2024

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

If no regressions arise, payment will be issued on 2024-12-07. 🎊

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

Copy link

melvin-bot bot commented Nov 30, 2024

@jayeshmangwani / @ishpaul777 @trjExpensify @jayeshmangwani / @ishpaul777 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests

7 participants