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-09-08] [HOLD for payment 2023-09-07] [$500] Chat - "Go back to Home page" unresponsive on invalid link page #26413

Closed
2 of 6 tasks
lanitochka17 opened this issue Aug 31, 2023 · 40 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 31, 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. Navigate to https://staging.new.expensify.com/anything
  2. Click on the "Back to homepage link"

Expected Result:

You're redirected to NewDot home view

Actual Result:

Nothing happens when clicking on the link

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.60-1

Reproducible in staging?: Yes

Reproducible in production?: No

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

Bug6183997_Recording__255.mp4

Expensify/Expensify Issue URL:

Issue reported by: @dhanashree-sawant

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693486582141609

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cd141ca760b28102
  • Upwork Job ID: 1697348052242747392
  • Last Price Increase: 2023-08-31
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 31, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@dhanashree-sawant
Copy link

Hello, I have raised a similar issue few hours back on slack :
https://expensify.slack.com/archives/C049HHMV9SM/p1693486582141609
In case my reporting time was before internal team, can we change the reported by to my name?

@ishpaul777
Copy link
Contributor

ishpaul777 commented Aug 31, 2023

Problem

Chat - "Go back to Home page" unresponsive on invalid link page

Root cause

We are not passing a onLinkPress prop in FullPageNotFoundView in NotFoundPage.

Changes

pass a onLinkPress prop to FullPageNotFoundView in NotFoundPage.

<ScreenWrapper>
           <FullPageNotFoundView shouldShow
            onLinkPress={() => {
               Navigation.navigate(ROUTES.HOME);
           }}/>
</ScreenWrapper>

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Aug 31, 2023

Proposal

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

"Go back to Home page" unresponsive on invalid link page

What is the root cause of that problem?

default value for onLinkPress is - Navigation.dismissModal(), but in dismissModal, we are not checking for this case - SCREENS.NOT_FOUND which is set in AuthScreens component.
And because of that we are getting error (falls into default) condition and not dismissing modal.
Setting NOT_FOUND in AuthScreens -

<RootStack.Screen
name={SCREENS.NOT_FOUND}
options={screenOptions.fullScreen}
component={NotFoundPage}
/>

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

We can add another condition in dismissModal() - switch block and handle it there.

switch (lastRoute.name) {
case NAVIGATORS.RIGHT_MODAL_NAVIGATOR:
case NAVIGATORS.FULL_SCREEN_NAVIGATOR:
case SCREENS.REPORT_ATTACHMENTS:
// if we are not in the target report, we need to navigate to it after dismissing the modal
if (targetReportID && targetReportID !== getTopmostReportId(rootState)) {
const state = getStateFromPath(ROUTES.getReportRoute(targetReportID));
const action = getActionFromState(state, linkingConfig.config);
action.type = 'REPLACE';
navigationRef.current.dispatch(action);
} else {
navigationRef.current.dispatch({...StackActions.pop(), target: rootState.key});
}
break;
default: {
Log.hmmm('[Navigation] dismissModal failed because there is no modal stack to dismiss');
}

case SCREENS.NOT_FOUND:
            navigationRef.current.navigate(ROUTES.HOME);
            break;

What alternative solutions did you explore? (Optional)

@Pujan92
Copy link
Contributor

Pujan92 commented Aug 31, 2023

Proposal

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

Go back to Home page not working

What is the root cause of that problem?

We are dismissing the modal for go back to home link but in case of it is not opened in modal it will gets failed.

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

I think we need to update the default function in FullPageNotFoundView and BlockingView to use Navigation.navigate() or Navigation.goBack() to redirect with the fallback HOME route. Suggesting to use the same we updated for the back button press from dismissmodal to goback here

@c3024
Copy link
Contributor

c3024 commented Aug 31, 2023

All this code looks same in production. Why is it only reproducible in staging? Is it some react-navigation update that caused this?

@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 31, 2023

Proposal

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

Chat - "Go back to Home page" unresponsive on invalid link page

What is the root cause of that problem?

This is a regression from #22437 in which we've removed FullScreenNavigator.

Also we've moved the NotFoundPage to AuthScreens which is not wrapped anymore with FullScreenNavigator.

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

case NAVIGATORS.RIGHT_MODAL_NAVIGATOR:
case NAVIGATORS.FULL_SCREEN_NAVIGATOR:
case SCREENS.REPORT_ATTACHMENTS:
// if we are not in the target report, we need to navigate to it after dismissing the modal
if (targetReportID && targetReportID !== getTopmostReportId(rootState)) {
.

Here we need to add the new case Screens.NOT_FOUND and remove Screen.FULL_SCREEN_NAVIGATOR.

What alternative solutions did you explore? (Optional)

NA

cc: @mountiny

@luacmartins
Copy link
Contributor

This happens in production too. Demoting to NAB.

Screen.Recording.2023-08-31.at.11.47.30.AM.mov

@luacmartins luacmartins added Bug Something is broken. Auto assigns a BugZero manager. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Aug 31, 2023
@melvin-bot
Copy link

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

@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 31, 2023

@luacmartins I think you misunderstood the issue. I don't think the issue here the is display of NotFoundPage not able to click on Go To Home in which case it's not re-produceable on prod.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 31, 2023

Nothing happens when clicking on the link

this is the actual result, user should be able to see the screens when they click on Go back to Home page.

@dhanashree-sawant
Copy link

dhanashree-sawant commented Aug 31, 2023

Hi @luacmartins, @puneetlath , can you also check once about this?

Hello, I have raised a similar issue few hours back on slack : https://expensify.slack.com/archives/C049HHMV9SM/p1693486582141609 In case my reporting time was before internal team, can we change the reported by to my name?

And yes I agree with @b4s36t4, the issue here is on click of 'Go back to Home page', it does nothing. It is working fine on production

@dummy-1111
Copy link
Contributor

Proposal

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

Go back to Home page in NotFoundPage is not working

What is the root cause of that problem?

The default value of onLinkPress props of FullPageNotFoundView is () => Navigation.dismissModal()
But Navigation.dismissModal does nothing for NotFoundPage.

This is the root cause

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

We can pass onLinkPress={Navigation.goBack} props to the FullPageNotFoundView view in NotFoundPage

This will go back to the previous page or go to home page.

What alternative solutions did you explore? (Optional)

@puneetlath
Copy link
Contributor

I'm able to reproduce the issue of the "go home" ink not doing anything. Making external.

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Aug 31, 2023
@melvin-bot melvin-bot bot changed the title Chat - "Go back to Home page" unresponsive on invalid link page [$500] Chat - "Go back to Home page" unresponsive on invalid link page Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 31, 2023
@luacmartins luacmartins added the Daily KSv2 label Aug 31, 2023
@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels Aug 31, 2023
@OSBotify
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.

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Aug 31, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Hourly KSv2 labels Aug 31, 2023
@melvin-bot melvin-bot bot changed the title [$500] Chat - "Go back to Home page" unresponsive on invalid link page [HOLD for payment 2023-09-07] [$500] Chat - "Go back to Home page" unresponsive on invalid link page Aug 31, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.60-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-09-07. 🎊

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 31, 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:

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

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 1, 2023

@luacmartins lame question, but do I get contributor bonus here? since the solution is from my proposal? 😅

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Sep 1, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-09-07] [$500] Chat - "Go back to Home page" unresponsive on invalid link page [HOLD for payment 2023-09-08] [HOLD for payment 2023-09-07] [$500] Chat - "Go back to Home page" unresponsive on invalid link page Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

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 Sep 1, 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:

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

@puneetlath
Copy link
Contributor

@eVoloshchak friendly reminder on the checklist here!

@b4s36t4 yes definitely, we'll compensate you since we used your solution.

@eVoloshchak
Copy link
Contributor

@eVoloshchak does not require payment (Eligible for Manual Requests)

I didn't participate in this issue and didn't do the PR review, I'm not eligible for any payment

@puneetlath
Copy link
Contributor

Ah ok, thanks for clarifying that @eVoloshchak.

Looks like we just need to pay out @dhanashree-sawant for reporting and @b4s36t4 for providing the solution. Can you both apply to the Upwork job please: https://www.upwork.com/jobs/~01cd141ca760b28102

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 10, 2023

@puneetlath Applied.

@puneetlath
Copy link
Contributor

Thanks. Offers sent to you both.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 10, 2023

Done, accepted.

@dhanashree-sawant
Copy link

Thanks @puneetlath, I have accepted the offer.

@puneetlath
Copy link
Contributor

All paid. Thanks y'all!

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. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests