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

[$1000] Blank page appears instead of Hmm... it's not here page #28183

Closed
2 of 6 tasks
kavimuru opened this issue Sep 25, 2023 · 43 comments
Closed
2 of 6 tasks

[$1000] Blank page appears instead of Hmm... it's not here page #28183

kavimuru opened this issue Sep 25, 2023 · 43 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kavimuru
Copy link

kavimuru commented Sep 25, 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!


Action Performed:

  1. from userA, create a workspace
  2. invite userB to workspace
  3. from userB, go to #announce
  4. click on header to see details
  5. from userA, remove the userB

Expected Result:

should show Hmm... it's not here in the RHP

Actual Result:

blank page appears

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.74-0
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

Screenshot 2023-08-31 at 10 19 26 AM

Recording.1603.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016233e1e785234a4a
  • Upwork Job ID: 1706382137664765952
  • Last Price Increase: 2023-10-18
@kavimuru kavimuru added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 25, 2023
@melvin-bot melvin-bot bot changed the title Blank page appears instead of Hmm... it's not here page [$500] Blank page appears instead of Hmm... it's not here page Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 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

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

melvin-bot bot commented Sep 25, 2023

Triggered auto assignment to @laurenreidexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@ewanmellor
Copy link

Proposal

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

If the user has the Details RHN open for a channel, and the user is removed from the workspace, then the RHN pane goes to black and does not show the "Hmm... it's not here" screen.

What is the root cause of that problem?

This is a result of an assumption made inside WithReportOrNotFound:

// If the content was shown but it's not anymore that means the report was deleted and we are probably navigating out of this screen.

The comment says "we are probably navigating out of this screen" but this is not the case. We have lost access to the report, but we do not have anything to cause us to navigate away. WithReportOrNotFound returns null (so that we don't show a glitchy transition) but since we're not navigating in this case, we just render a blank panel where the ReportDetailsPage used to be. This does not happen once the page is reloaded, because if WithReportOrNotFound has never successfully rendered the report then it correctly shows the NotFoundPage. This problem only occurs if we used to be able to render the report, but then lose that ability.

This bug was introduced here:

commit b2426a23b6b721a1073752c795974108ff7799f0
Author: Adam Grzybowski <adam.grzybowski@swmansion.com>
Date:   Tue Aug 8 12:37:10 2023 +0200

   fix glitching animation of NotFoundPage on transition

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

I think it would be reasonable in this case to render the content that was previously shown. That way, if we are navigating away anyway, as the code assumes, then we would not switch to the NotFoundPage and we'd still avoid the glitchy transition. If we are not navigating then we'd stay on the current page, i.e. displaying stale content for a report that we have lost access to. The next time the user navigates, they will step to a screen that will render as NotFoundPage as normal. That seems like reasonable behavior to me, given how small a corner case this is.

My proposal is to save the props seen by WithReportOrNotFound in a ref, and in the case where we currently return null, instead return the WrappedComponent with those remembered props.

What alternative solutions did you explore? (Optional)

I considered adding a fallback route to WithReportOrNotFound, and making it so it navigates to the fallback route in this case. This would effectively mean all the /r/:reportID/* routes would navigate to /r/:reportID in this situation, and you'd see the NotFoundPage that way. The problem with this is you don't know whether some other part of the app is going to trigger a nav, so you could have two competing navigations that trigger at the same time. That seems like it could cause more problems than it solves.

@laurenreidexpensify laurenreidexpensify removed their assignment Sep 26, 2023
@kameshwarnayak
Copy link
Contributor

kameshwarnayak commented Sep 26, 2023

Proposal

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

Blank page appears instead of Hmm... it's not here page

What is the root cause of that problem?

Root cause is that we return null assuming the modal will be dismissed in withReportOrNotFound.js.

we are probably navigating out of this screen, this is the assumption made but we are not moving out of the modal. null is returned and it shows empty screen.

// If the content was shown but it's not anymore that means the report was deleted and we are probably navigating out of this screen.
// Return null for this case to avoid rendering FullScreenLoadingIndicator or NotFoundPage when animating transition.
if (shouldShowNotFoundPage && contentShown.current) {
return null;
}

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

As the comment says, the report is deleted and we are navigating out of the details screen. We can dismiss the modal here. Change the above code to below. Import Navigation at the top of withReportOrNotFound.js file

        // If the content was shown but it's not anymore that means the report was deleted and we are probably navigating out of this screen.
        // Return null for this case to avoid rendering FullScreenLoadingIndicator or NotFoundPage when animating transition.
        if (shouldShowNotFoundPage && contentShown.current) {
            Navigation.dismissModal();
            return null;
        }

Result :

screen-recording.mp4

What alternative solutions did you explore? (Optional)

NA

@ntdiary
Copy link
Contributor

ntdiary commented Sep 27, 2023

Hi, @stephanieelliott, I'm still busy reviewing other issues so I don't have enough bandwidth. Could you please reassign this to another C+? : )

@stephanieelliott stephanieelliott added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Sep 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

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

@stephanieelliott
Copy link
Contributor

Hey @fedirjh we've got a couple proposals already, can you take a look please?

@fedirjh
Copy link
Contributor

fedirjh commented Sep 29, 2023

I couldn’t test @kameshwarnayak's solution on main, we have an issue with not found reports, it displays skeleton instead of not found view.

@ewanmellor I will re-test both approaches after the issue is fixed.

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

@stephanieelliott, @fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick!

@stephanieelliott
Copy link
Contributor

#28489 was deployed to prof earlier today, can you test when you get a chance @fedirjh?

@melvin-bot melvin-bot bot removed the Overdue label Oct 4, 2023
@stephanieelliott
Copy link
Contributor

Hey @fedirjh bump on this, can you re-test when you get a chance?

@kameshwarnayak
Copy link
Contributor

@fedirjh - Updated the proposal based on the input. Look forward to your thoughts

@yh-0218
Copy link
Contributor

yh-0218 commented Oct 11, 2023

Proposal

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

Blank page appears instead of Hmm... it's not here page

What is the root cause of that problem?

When remove userB from userA's workspace,
userB's status: contentShown.current=true, shouldShowNotFoundPage=true
In this case, returns null

if (shouldShowNotFoundPage && contentShown.current) {
return null;
}

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

I think this is enough to fix that issue.
Need to add one more condition there. !_.isEmpty(props.report)

if (shouldShowNotFoundPage && contentShown.current) {
return null;
}

if (!_.isEmpty(props.report) && shouldShowNotFoundPage && contentShown.current) {
        return null;
 }

What alternative solutions did you explore? (Optional)

@Vadym-33
Copy link

Vadym-33 commented Oct 11, 2023

Proposal

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

Blank page appears instead of Hmm... it's not here page

What is the root cause of that problem?

When remove userB from userA's workspace,
userB's status: contentShown.current=true, shouldShowNotFoundPage=true
In this case, returns null

if (shouldShowNotFoundPage && contentShown.current) {
return null;
}

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

Need to update condition.

if (shouldShowNotFoundPage && contentShown.current) {
return null;
}

if (_.isEmpty(props.report) && contentShown.current) {
        return null;
 }

What alternative solutions did you explore? (Optional)

@kameshwarnayak
Copy link
Contributor

@fedirjh - Tested this solution with other usecases and the result is as expected. Please find the video below

screen-recording.mp4

Have mentioned the logic of solution in the proposal

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

@stephanieelliott @fedirjh this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

@stephanieelliott, @fedirjh Huh... This is 4 days overdue. Who can take care of this?

@fedirjh
Copy link
Contributor

fedirjh commented Oct 16, 2023

Look forward to your thoughts

@kameshwarnayak What could happen if the navigation is triggered and then the modal is dismissed given that modal dismissal will trigger a navigation? I feel this will lead to an unpredictable behavior.


@s-alves10 This bug affects RHN modals that are related to a given report, so it's not only the details page, we have settings, members, and notes ...


@yh-0218 and @Vadym-33 Can you further explain your solutions?

@melvin-bot melvin-bot bot removed the Overdue label Oct 16, 2023
@s-alves10
Copy link
Contributor

Proposal

Updated

@yh-0218
Copy link
Contributor

yh-0218 commented Oct 17, 2023

I think this condition will help all case.

if (!_.isEmpty(props.report) && shouldShowNotFoundPage && contentShown.current) {
        return null;
 }

@Vadym-33
Copy link

if (_.isEmpty(props.report) && contentShown.current) {
        return null;
 }

we need to return null on NotFoundPage with this condition.

@kameshwarnayak
Copy link
Contributor

@fedirjh - dismissModal will trigger a navigation to the previous open report. That is intended and basically we need to move out of the modal on null/empty. As you can see this in the below video

274492237-46d75076-b4c8-4b6b-be93-6ae732a87448.mp4

You can see in the below code, dismissModal works on RIGHT_MODAL_NAVIGATOR, NOT_FOUND and REPORT_ATTACHMENTS only. Let me test on NOT_FOUND & REPORT_ATTACHMENTS and let you know the result.

switch (lastRoute.name) {
case NAVIGATORS.RIGHT_MODAL_NAVIGATOR:
case SCREENS.NOT_FOUND:
case SCREENS.REPORT_ATTACHMENTS:
// if we are not in the target report, we need to navigate to it after dismissing the modal

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

@stephanieelliott, @fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

@stephanieelliott @fedirjh this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added Internal Requires API changes or must be handled by Expensify staff and removed 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 labels Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

Current assignee @fedirjh is eligible for the Internal assigner, not assigning anyone new.

@s-alves10
Copy link
Contributor

@fedirjh

Did you check the updated proposal?

@kameshwarnayak
Copy link
Contributor

I am not able to reproduce this in the latest master.

@s-alves10
Copy link
Contributor

Yeah, now it closes the RHN and navigates to the concierge page

@fedirjh
Copy link
Contributor

fedirjh commented Oct 24, 2023

Yeah, now it closes the RHN and navigates to the concierge page

I couldn't replicate either. It appears that it has been resolved with this PR #26149.

CleanShot.2023-10-24.at.12.12.15.mp4

@melvin-bot melvin-bot bot removed the Overdue label Oct 24, 2023
@fedirjh
Copy link
Contributor

fedirjh commented Oct 24, 2023

@stephanieelliott Let’s close as fixed by another PR #26149.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

10 participants