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-08-10] [$1000] Web - infinite loop on click of back button when go to connect bank account page of deleted policy #23167

Closed
1 of 6 tasks
kbecciv opened this issue Jul 19, 2023 · 38 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 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 19, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to Settings > Workspaces
  2. Go to any policy > bank account
  3. Copy the browser url
  4. Go back to policy page and delete workspace
  5. Paste the url in browser
  6. Click on back button

Expected Result:

After clicking back button from "hmm... it's not here" page, we'd navigate to the Workspaces page (https://staging.new.expensify.com/settings/workspaces). Then, clicking back from there would navigate to the settings page.

Actual Result:

Infinite loop on click of back button

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.42-9
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-07-18.at.6.14.24.PM.mov
Recording.3741.mp4

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689684394065279

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0105141c978bfd9133
  • Upwork Job ID: 1683596190818557952
  • 2023-07-24
  • Automatic offers:
    • situchan | Reviewer | 25815017
    • ginsuma | Contributor | 25815018
    • gadhiyamanan | Reporter | 25815022
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 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

@ginsuma
Copy link
Contributor

ginsuma commented Jul 19, 2023

Proposal

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

Web - infinite loop on click of back button when go to connect bank account page of deleted policy

What is the root cause of that problem?

We are using Navigation.navigate for FullPageNotFoundView in ReimbursementAccountPage. This make the page is placed bottom in the stack navigator. When we keep clicking back button from WorkspacesListPage that is Navigation.goBack without shouldEnforceFallback flag => return to ReimbursementAccountPage

<FullPageNotFoundView
shouldShow
onBackButtonPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)}

<HeaderWithBackButton
title={translate('common.workspaces')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}

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

Change this LOC to:

onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}

@yh-0218
Copy link
Contributor

yh-0218 commented Jul 19, 2023

Proposal

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

Web - infinite loop on click of back button when go to connect bank account page of deleted policy

What is the root cause of that problem?

Because of using Navigation.navigate for FullPageNotFoundView in ReimbursementAccountPage

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

We can remove onBackButtonPress={() => Navigation. navigate(ROUTES.SETTINGS)} from FullPageNotFoundView in ReimbursementAccountPage to hide the model

What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jul 19, 2023

Proposal

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

Infinite loop on click of back button when go to connect bank account page of deleted policy

What is the root cause of that problem?

In ReimbursementAccountPage, when we click on the back button of page not found, we use Navigation.navigate. That makes this page doesn't unmount

onBackButtonPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)}

And then, We call navigate back function with fallbackRoute as setting route but we don't pass shouldEnforceFallback as true which makes this condition false because we already have a page in stack and then we navigate back to the previous page

<HeaderWithBackButton
title={translate('common.workspaces')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}

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

We can add shouldEnforceFallbackc as true when we call Navigate.goBack function here to go back the fallbackRoute with replacing the previous page

Navigation.goBack(ROUTES.SETTINGS, true)

<HeaderWithBackButton
title={translate('common.workspaces')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}

What alternative solutions did you explore? (Optional)

We also can call Navigation.navigate here instead of Navigation.goBack

Navigation.navigate(ROUTES.SETTINGS)

<HeaderWithBackButton
title={translate('common.workspaces')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}

@hoangzinh
Copy link
Contributor

Proposal

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

I agree with expectation in GH issue: Hide the model on click of back button from "hmm... it's not here" page if we're visit the page by direct link.

What is the root cause of that problem?

As other proposal already pointed out, in the ReimbursementAccountPage, we always navigate to WS setting when page not found

onBackButtonPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)}

And in WS setting page, we goBack to previous page if we click on back arrow in top head

onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}

In this case, it will back to previous page not found => Loop

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

I agree with expectation in GH issue: Hide the model on click of back button from "hmm... it's not here" page if we're visit the page by direct link. So in order to do it, in this callback button

onBackButtonPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)}

We need to check if we're visit this page by direct link (I think we can verify it by checking current route is the first/top one using getActiveRouteIndex(navigationRef.current.getState(), same way we check in Navigation.goBack until), then we call Navigation.dismissModal to close RHN. Otherwise, we navigate to WS setting as it is.

@melvin-bot melvin-bot bot added the Overdue label Jul 21, 2023
@anmurali
Copy link

OOO for 10 days

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2023
@anmurali anmurali removed the Bug Something is broken. Auto assigns a BugZero manager. label Jul 24, 2023
@anmurali anmurali removed their assignment Jul 24, 2023
@anmurali anmurali added the Bug Something is broken. Auto assigns a BugZero manager. label Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot

This comment was marked as duplicate.

@joekaufmanexpensify
Copy link
Contributor

Reproduced! I updated OP as the expected behavior here should be that when the user clicks back on the Hm, it's not here page, we navigate back to the workspaces page. And then if they click back from there, back to the Settings page.

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 24, 2023
@melvin-bot melvin-bot bot changed the title Web - infinite loop on click of back button when go to connect bank account page of deleted policy [$1000] Web - infinite loop on click of back button when go to connect bank account page of deleted policy Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@joekaufmanexpensify
Copy link
Contributor

Pending review of proposals

@joekaufmanexpensify
Copy link
Contributor

@situchan Could you provide an update on your review of these proposals when you have a chance?

@joekaufmanexpensify
Copy link
Contributor

Pending update

@joekaufmanexpensify
Copy link
Contributor

Bumped in Slack.

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

📣 @ginsuma 🎉 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
Copy link

melvin-bot bot commented Jul 28, 2023

📣 @gadhiyamanan 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 29, 2023
@ginsuma
Copy link
Contributor

ginsuma commented Jul 29, 2023

Thanks for accepting my proposal. The PR #23843 is ready for review.
cc: @situchan @luacmartins

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

🎯 ⚡️ Woah @situchan / @ginsuma, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @ginsuma got assigned: 2023-07-28 18:48:32 Z
  • when the PR got merged: 2023-07-31 18:37:13 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 3, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - infinite loop on click of back button when go to connect bank account page of deleted policy [HOLD for payment 2023-08-10] [$1000] Web - infinite loop on click of back button when go to connect bank account page of deleted policy Aug 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

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

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:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 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:

@joekaufmanexpensify
Copy link
Contributor

@situchan mind completing the BZ checklist here when you have a sec?

@situchan
Copy link
Contributor

situchan commented Aug 9, 2023

We can now detect such issues in PR stage thanks to this new checklist item:

  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.

@joekaufmanexpensify
Copy link
Contributor

Great, thanks! BZ checklist is complete. All set to issue payment tomorrow.

@joekaufmanexpensify
Copy link
Contributor

This qualified for a speed bonus, so we need to make the following payments:

  • @ginsuma $1,500 ($1,000 for PR, and $500 speed bonus).
  • @situchan $1,500 ($1,000 for C+ review, and $500 speed bonus).
  • @gadhiyamanan $250 for reporting bonus.

@joekaufmanexpensify
Copy link
Contributor

All three offers are accepted in Upwork, so we'll issue payment tomorrow, and then close this out!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 9, 2023
@joekaufmanexpensify
Copy link
Contributor

@ginsuma $1,500 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@situchan $1,500 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@gadhiyamanan $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. Thanks everyone!

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

No branches or pull requests

9 participants