Skip to content

[$250] Chat - Infinite loading when navigating to deleted expense link while offline. #61033

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

Open
3 of 8 tasks
mitarachim opened this issue Apr 29, 2025 · 12 comments
Open
3 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Apr 29, 2025

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


Version Number: 9.1.33-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome
App Component: Other

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open any workspace chat.
  3. Create a manual expense.
  4. Open the expense report and tap on the header.
  5. Tap on "Share" and copy the expense´s link.
  6. Return to conversation, long tap on expense preview and delete it.
  7. Navigate to a different chat.
  8. Paste and send the deleted expense link.
  9. Tap on the link.
  10. Note that you are redirected to an error page.
  11. Tap on the arrow on the top left corner to return to chat.
  12. Turn off internet connection.
  13. Tap on the link again,
  14. Note that now, the website loads infinitelly.

Expected Result:

User should be redirected to the same error page, when navigating to a deleted expense´s link while online or offline.

Actual Result:

When navigating to a deleted expense´s link while offline, infinite loading is experienced.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

2025-04-29.12.52.02.PM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021920574421854458655
  • Upwork Job ID: 1920574421854458655
  • Last Price Increase: 2025-05-08
  • Automatic offers:
    • dominictb | Reviewer | 107274550
Issue OwnerCurrent Issue Owner: @grgia
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 29, 2025
Copy link

melvin-bot bot commented Apr 29, 2025

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@mitarachim mitarachim changed the title mWeb - Chat - Infinite loading when navigating to deleted expense link while offline. Chat - Infinite loading when navigating to deleted expense link while offline. Apr 29, 2025
@bernhardoj
Copy link
Contributor

Proposal

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

Infinite loading when open a deleted expense report while offline.

What is the root cause of that problem?

This happens after #56819 where we simplify the report fetching. Previously, we don't fetch the report when the report is not found, but now we do.

Since we fetch while offline, isLoadingInitialReportActions is true, so even though the report doesn't exists, not found page won't show.

if (!wasReportAccessibleRef.current && !firstRenderRef.current && !reportID && !isOptimisticDelete && !reportMetadata?.isLoadingInitialReportActions && !userLeavingStatus) {
// eslint-disable-next-line react-compiler/react-compiler
return true;
}
return !!currentReportIDFormRoute && !isValidReportIDFromPath(currentReportIDFormRoute);
},

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

We can prevent the fetch report back when the report is not found, and optionally, only when offline.

const fetchReport = useCallback(() => {
    ...

    if (report?.errorFields?.notFound /** && isOffline ** /) {
        return;
    }

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

@melvin-bot melvin-bot bot added the Overdue label May 1, 2025
Copy link

melvin-bot bot commented May 2, 2025

@johncschuster Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented May 6, 2025

@johncschuster 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@johncschuster
Copy link
Contributor

I couldn't action this today

@melvin-bot melvin-bot bot removed the Overdue label May 6, 2025
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label May 8, 2025
@melvin-bot melvin-bot bot changed the title Chat - Infinite loading when navigating to deleted expense link while offline. [$250] Chat - Infinite loading when navigating to deleted expense link while offline. May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

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

@dominictb
Copy link
Contributor

@bernhardoj proposal LGTM

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 10, 2025

Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added the Overdue label May 12, 2025
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 12, 2025
@grgia
Copy link
Contributor

grgia commented May 12, 2025

Assigned!

@melvin-bot melvin-bot bot removed the Overdue label May 12, 2025
Copy link

melvin-bot bot commented May 12, 2025

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

@melvin-bot melvin-bot bot added the Weekly KSv2 label May 13, 2025
@bernhardoj
Copy link
Contributor

PR is ready

cc: @dominictb

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

5 participants