Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.54k stars 2.89k forks source link

[$250] Chat – “Hmm... ” page appears briefly when navigate to IOU link while logout #45899

Closed lanitochka17 closed 1 month ago

lanitochka17 commented 3 months ago

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.10-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4751670 Email or phone of affected tester (no customers): ponikarchuks+920724@gmail.com Issue reported by: Applause - Internal Team

Action Performed:

Precondition: use slow 3G network

  1. Go to https://staging.new.expensify.com/
  2. Log in with Gmail account
  3. Create a IOU in a conversation
  4. Navigate to the IOU report (conversation)
  5. Copy the URL
  6. Log out of the app
  7. Navigate to the IOU URL
  8. Log in with the same account

Expected Result:

You're redirected to the correct IOU report after login

Actual Result:

“Hmm... it's not here” page appears briefly then IOU report opens

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/4caaef22-4376-48c7-9139-dede2ca9471e

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0145c59ed1d52e3830
  • Upwork Job ID: 1815367593322000546
  • Last Price Increase: 2024-07-22
Issue OwnerCurrent Issue Owner: @abdulrahuman5196
melvin-bot[bot] commented 3 months ago

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

github-actions[bot] commented 3 months ago

:wave: 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.
lanitochka17 commented 3 months ago

We think that this bug might be related to #vip-vsp

mountiny commented 3 months ago

This seems to be a minor UX issue not blocking the user from using the app so I have demoted it.

Maybe its related to this navigation change https://github.com/Expensify/App/pull/44531 @Kicu in case you could look

melvin-bot[bot] commented 3 months ago

Job added to Upwork: https://www.upwork.com/jobs/~0145c59ed1d52e3830

melvin-bot[bot] commented 3 months ago

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

WojtekBoman commented 3 months ago

Hey! I’m Wojtek from Software Mansion, an expert agency, and I’d like to work on this issue.

WojtekBoman commented 3 months ago

I took a look at it and I found the root cause of this issue. I checked an old commit before merging this PR and this issue still occured. It's connected with changes introduced in this one:

https://github.com/Expensify/App/blob/main/src/pages/home/ReportScreen.tsx#L449-L451

  const shouldShowNotFoundPage = useMemo((): boolean => {
        // Wait until we're sure the app is done loading (needs to be a strict equality check since it's undefined initially)
        if (isLoadingApp !== false) {
            return false;
        }

        // If we just finished loading the app, we still need to try fetching the report. Wait until that's done before
        // showing the Not Found page
        if (finishedLoadingApp) {
            return false;
        }

        if (!wasReportAccessibleRef.current && !firstRenderRef.current && !report.reportID && !isOptimisticDelete && !reportMetadata?.isLoadingInitialReportActions && !userLeavingStatus) {
            return true;
        }

        if (shouldHideReport) {
            return true;
        }
        return !!currentReportIDFormRoute && !ReportUtils.isValidReportIDFromPath(currentReportIDFormRoute);
    }, [isLoadingApp, finishedLoadingApp, report.reportID, isOptimisticDelete, reportMetadata?.isLoadingInitialReportActions, userLeavingStatus, shouldHideReport, currentReportIDFormRoute]);

This check returns true which causes showing the not found page:

        if (!wasReportAccessibleRef.current && !firstRenderRef.current && !report.reportID && !isOptimisticDelete && !reportMetadata?.isLoadingInitialReportActions && !userLeavingStatus) {
            return true;
        }

I'd like to make sure why it works this way. @arosiclair Could you take a look at it?

https://github.com/user-attachments/assets/11d0fc91-e613-4761-97b8-184a1d30652f

arosiclair commented 3 months ago

I'd like to make sure why it works this way. @arosiclair Could you take a look at it?

Unfortunately I don't really know what those checks are for I just moved them 😅. From what I can guess, it is checking if report is empty but with many caveats like if the report is being loaded for the first time (reportMetadata?.isLoadingInitialReportActions).

melvin-bot[bot] commented 2 months ago

This issue has not been updated in over 15 days. @madmax330, @abdulrahuman5196 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

mvtglobally commented 2 months ago

Issue not reproducible during KI retests. (First week)

abdulrahuman5196 commented 2 months ago

@madmax330 I think we can close this issue. Reference: https://github.com/Expensify/App/pull/46112#issuecomment-2270697233

This issue should already be resolved, I see that Report Screen has been migrated to use useOnyx in this https://github.com/Expensify/App/pull/45711. If this error no longer appears, I'll close this PR. Could you check if it works for you on the main branch?

And issue is not reproducible anymore.

mvtglobally commented 2 months ago

Issue not reproducible during KI retests. (Second week)

mvtglobally commented 1 month ago

Issue not reproducible during KI retests. (Third week)

mvtglobally commented 1 month ago

Issue not reproducible during KI retests. (4th week)

abdulrahuman5196 commented 1 month ago

@madmax330 I think we can close this issue

mallenexpensify commented 1 month ago

Thanks for posting in #contributor-plus @abdulrahuman5196 , closing