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 2023-12-20] [$500] Request money - Not here page appears in RHP after requesting money #32807

Closed
2 of 6 tasks
kbecciv opened this issue Dec 11, 2023 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Dec 11, 2023

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: v1.4.11-1
Reproducible in staging?: y
Reproducible in production?: n
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com.
  2. Open a new chat,
  3. Click + > Request money.
  4. Enter amount and proceed to confirmation page.
  5. Click Request.
    (Might need to repeat Step 3 - 5 to see the issue).

Expected Result:

Not here page will not show up in RHP after requesting money.

Actual Result:

While RHP is closing, not here page can be seen in the RHP.

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6308957_1702302215945.20231211_203033.mp4

image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e13942c515d900b4
  • Upwork Job ID: 1734223793696989184
  • Last Price Increase: 2023-12-11
  • Automatic offers:
    • getusha | Reviewer | 28036036
    • paultsimura | Contributor | 28036038
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Dec 11, 2023
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.

Copy link

melvin-bot bot commented Dec 11, 2023

Triggered auto assignment to @johnmlee101 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@tgolen
Copy link
Contributor

tgolen commented Dec 11, 2023

I'll look into this.

@tgolen tgolen added Help Wanted Apply this label when an issue is open to proposals by contributors and removed DeployBlockerCash This issue or pull request should block deployment labels Dec 11, 2023
@tgolen
Copy link
Contributor

tgolen commented Dec 11, 2023

I'm going to demote this from being a deploy blocker. It doesn't effect the user in any way and the flow still works. I've applied the help wanted label to get some more eyes on this.

@tgolen tgolen added the Bug Something is broken. Auto assigns a BugZero manager. label Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

Triggered auto assignment to @peterdbarkerUK (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@tgolen tgolen removed the Hourly KSv2 label Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@tgolen tgolen added Daily KSv2 External Added to denote the issue can be worked on by a contributor labels Dec 11, 2023
@melvin-bot melvin-bot bot changed the title Request money - Not here page appears in RHP after requesting money [$500] Request money - Not here page appears in RHP after requesting money Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

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

Copy link

melvin-bot bot commented Dec 11, 2023

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

@paultsimura
Copy link
Contributor

paultsimura commented Dec 11, 2023

Proposal

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

When requesting money, the NotFound page is shown for a moment.

What is the root cause of that problem?

We have the IOURequestStepConfirmation wrapped with withFullTransactionOrNotFound:

export default compose(
withCurrentUserPersonalDetails,
withWritableReportOrNotFound,
withFullTransactionOrNotFound,
withOnyx({
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
}),
// eslint-disable-next-line rulesdir/no-multiple-onyx-in-file
withOnyx({
policy: {
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${lodashGet(report, 'policyID', '0')}`,
},
}),
)(IOURequestStepConfirmation);

It returns the NotFound page when the transaction is not found:

// If the transaction does not have a transactionID, then the transaction no longer exists in Onyx as a full transaction and the not-found page should be shown
if (!transactionID) {
return <FullPageNotFoundView shouldShow />;
}

The transaction ID is taken from a route param, which is no longer present when navigating after the request was created. Therefore, the NotFound page is briefly displayed.

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

We should enhance the WithFullTransactionOrNotFound (and WithWritableReportOrNotFound) wrapper by detecting whether the component is focused through nevigation (i.e. is open). And show the NotFound page only if the component is open (focused):

const isFocused = useIsFocused();

if (!transactionID) {
    return <FullPageNotFoundView shouldShow={isFocused} />;
}

Optionally, we can show FullScreenLoadingIndicator if !isFocused to handle this as another semi-faulty state:

if (!transactionID) {
    return isFocused ? <FullPageNotFoundView shouldShow /> : <FullScreenLoadingIndicator/>;
}

Result:

Screen.Recording.2023-12-11.at.16.47.30.mov

What alternative solutions did you explore? (Optional)

@tgolen
Copy link
Contributor

tgolen commented Dec 11, 2023

Ah, cool. I didn't know about the isFocused hook. Looks like that would do the trick. I like using shouldShow. I don't think we want a loading indicator during those transitions.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

📣 @getusha 🎉 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

Copy link

melvin-bot bot commented Dec 11, 2023

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 11, 2023
@paultsimura
Copy link
Contributor

Thanks. The PR is ready for review: #32849

Copy link

melvin-bot bot commented Dec 12, 2023

⚠️ 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.

@paultsimura
Copy link
Contributor

@Julesssss This shouldn't have been closed as it's not paid out yet, if I'm not mistaken.

@Julesssss
Copy link
Contributor

Thanks

@Julesssss Julesssss reopened this Dec 13, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 13, 2023
@melvin-bot melvin-bot bot changed the title [$500] Request money - Not here page appears in RHP after requesting money [HOLD for payment 2023-12-20] [$500] Request money - Not here page appears in RHP after requesting money Dec 13, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 13, 2023
Copy link

melvin-bot bot commented Dec 13, 2023

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

Copy link

melvin-bot bot commented Dec 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.11-25 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 2023-12-20. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

Copy link

melvin-bot bot commented Dec 13, 2023

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:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR:
  • [@getusha] 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:
  • [@getusha] 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:
  • [@getusha] Determine if we should create a regression test for this bug.
  • [@getusha] 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.
  • [@peterdbarkerUK] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 20, 2023
@peterdbarkerUK
Copy link
Contributor

$500 to @paultsimura for Contributor, paid and thanks!

@getusha could you take a spin through the regression checklist, and then accept the offer?

@getusha
Copy link
Contributor

getusha commented Dec 21, 2023

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:

  • The PR that introduced the bug has been identified. Link to the PR: Refactor the money request creation flow #28618
  • 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: https://github.com/Expensify/App/pull/28618/files#r1434478894
  • 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: N/a
  • Determine if we should create a regression test for this bug. i think this bug is minor and hard to notice so No.
  • 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.

@getusha
Copy link
Contributor

getusha commented Dec 21, 2023

@peterdbarkerUK accepted the offer

@melvin-bot melvin-bot bot added the Overdue label Dec 25, 2023
Copy link

melvin-bot bot commented Dec 25, 2023

@tgolen, @paultsimura, @peterdbarkerUK, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

@tgolen
Copy link
Contributor

tgolen commented Dec 26, 2023

@peterdbarkerUK Is there more to do here to complete the payments?

@melvin-bot melvin-bot bot removed the Overdue label Dec 26, 2023
@peterdbarkerUK
Copy link
Contributor

Nope, was just OoO.

Payments processed!

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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants