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-10-30] [HOLD for payment 2024-10-29] Onboarding - Onboarding does not show up when creating new account for the second time #51115

Closed
3 of 8 tasks
IuliiaHerets opened this issue Oct 19, 2024 · 16 comments · Fixed by #51155
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 19, 2024

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.51-1
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+kh081006@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com on incognito mode.
  2. Sign up with a new Gmail account.
  3. Complete the onboarding.
  4. Log out.
  5. Sign up with another new Gmail account.

Expected Result:

Onboarding will show up for every new account created (production behavior).

Actual Result:

Onboarding does not show up for the second new Gmail account.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Uploading Bug6639192_1729287472033!20241019_053558.mp4…

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @abekkala
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 19, 2024
Copy link

melvin-bot bot commented Oct 19, 2024

Triggered auto assignment to @abekkala (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.

Copy link

melvin-bot bot commented Oct 19, 2024

Triggered auto assignment to @Beamanator (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@github-actions github-actions bot added the Hourly KSv2 label Oct 19, 2024
@melvin-bot melvin-bot bot removed the Hourly KSv2 label Oct 19, 2024
Copy link

melvin-bot bot commented Oct 19, 2024

💬 A slack conversation has been started in #expensify-open-source

@Kalydosos
Copy link
Contributor

Kalydosos commented Oct 20, 2024

Edited by proposal-police: This proposal was edited at 2024-10-20 20:49:16 UTC.

Proposal

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

Onboarding does not show up when creating new account for the second time

What is the root cause of that problem?

when signing up for the second account, the fetch statuses of onyx keys nvp_onboarding, nvp_trynewdot and is_single_new_dot_entry are "loading" even though their values are undefined. The keys nvp_onboarding, nvp_trynewdot values are updated to false in the signup process but the key is_single_new_dot_entry is not updated which leads to its fetch status to be locked at "loading". That affects the triggering of the onboarding process which is stuck in the line below

if (isLoadingOnyxValue(isOnboardingCompletedMetadata, isHybridAppOnboardingCompletedMetadata, isSingleNewDotEntryMetadata)) {
return;
}

as isSingleNewDotEntryMetadata status keep returning "loading"

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

the onyx key is_single_new_dot_entry value is used for NativeModules.HybridAppModule, see line below

if (isHybridAppOnboardingCompleted === false && !isSingleNewDotEntry) {
Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
}

we will consider the onyx key only in the context of NativeModules.HybridAppModule for the onboarding process (that key fetch status is always "loaded" during the first account creation) by changing the lines

if (isLoadingOnyxValue(isOnboardingCompletedMetadata, isHybridAppOnboardingCompletedMetadata, isSingleNewDotEntryMetadata)) {
return;
}

into this

if (isLoadingOnyxValue(isOnboardingCompletedMetadata, isHybridAppOnboardingCompletedMetadata, (isSingleNewDotEntry !== undefined ||NativeModules.HybridAppModule)?isSingleNewDotEntryMetadata:{status :'loaded' as FetchStatus} as ResultMetadata)) {
return;
}

RESULT

it works like a charm

2024-10-20.20-48-33.mp4

What alternative solutions did you explore? (Optional)

we could also change the lines

if (isLoadingOnyxValue(isOnboardingCompletedMetadata, isHybridAppOnboardingCompletedMetadata, isSingleNewDotEntryMetadata)) {
return;
}

into this

if (isLoadingOnyxValue(isOnboardingCompletedMetadata, isHybridAppOnboardingCompletedMetadata, NativeModules.HybridAppModule?isSingleNewDotEntryMetadata:{status :'loaded' as FetchStatus} as ResultMetadata)) {
return;
}

as a shorter version of the main changes proposed but i think the main changes taking extra precautions (isSingleNewDotEntry !== undefined ||NativeModules.HybridAppModule) is a good thing

@Beamanator
Copy link
Contributor

@Kalydosos - thanks for your proposal! Since this is a Deploy Blocker, we also want to figure out where this came from (since this is most likely due to a very recent PR). Can you help find which PR caused this?

@Beamanator
Copy link
Contributor

I will test to see if this has to do with #49602

@Beamanator
Copy link
Contributor

Beamanator commented Oct 21, 2024

Tested & revert did fix this issue - i'll move forward with the revert - @Kalydosos i'll try to get you compensated for the help since you pointed me to the file where the issue was, which made it very easy to find the problem PR 🙏

@Kalydosos
Copy link
Contributor

@Beamanator thx, i would love that indeed 👍

@Beamanator
Copy link
Contributor

@Beamanator it seems to be this PR #50015

@Kalydosos the reason I don't think it's that PR is b/c that PR was deployed to production 3 weeks ago, whereas the current bug in this issue doesn't exist in production yet... Though it is possible that recent changes showed this bug, which was caused by that PR!

@Kalydosos
Copy link
Contributor

@Beamanator it seems to be this PR #50015

@Kalydosos the reason I don't think it's that PR is b/c that PR was deployed to production 3 weeks ago, whereas the current bug in this issue doesn't exist in production yet... Though it is possible that recent changes showed this bug, which was caused by that PR!

@Beamanator yes you are right, that was not the offending PR indeed, it is missing a part in the test.

@Beamanator Beamanator removed Reviewing Has a PR in review Weekly KSv2 labels Oct 21, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Hourly KSv2 labels Oct 22, 2024
@melvin-bot melvin-bot bot changed the title Onboarding - Onboarding does not show up when creating new account for the second time [HOLD for payment 2024-10-29] Onboarding - Onboarding does not show up when creating new account for the second time Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.51-4 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-10-29. 🎊

Copy link

melvin-bot bot commented Oct 22, 2024

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:

  • [@Beamanator] The PR that introduced the bug has been identified. Link to the PR:
  • [@Beamanator] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@Beamanator] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@Beamanator] Determine if we should create a regression test for this bug.
  • [@Beamanator] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 23, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-10-29] Onboarding - Onboarding does not show up when creating new account for the second time [HOLD for payment 2024-10-30] [HOLD for payment 2024-10-29] Onboarding - Onboarding does not show up when creating new account for the second time Oct 23, 2024
Copy link

melvin-bot bot commented Oct 23, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.52-5 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-10-30. 🎊

Copy link

melvin-bot bot commented Oct 23, 2024

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:

  • [@Beamanator] The PR that introduced the bug has been identified. Link to the PR:
  • [@Beamanator] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@Beamanator] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@Beamanator] Determine if we should create a regression test for this bug.
  • [@Beamanator] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Oct 28, 2024
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. DeployBlockerCash This issue or pull request should block deployment Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants