Skip to content

[HOLD for payment 2025-02-06] [$250] Clicking link to invalid room > another report > then back to invalid room link leads to infinite skeleton loading screen #55085

Closed

Description

@lanitochka17

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.83-0
Reproducible in staging?: Y
Reproducible in production?: Y
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): agexptest+pr0801@gmail.com
Issue reported by: Applause - Internal Team
Component:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Open any chat and paste an invalid room link (e.g. https://staging.new.expensify.com/r/2652281908731856)
  3. Click on the link
  4. Click back
  5. Click link again
  6. Observe infinite loading skeleton.

Expected Result:

The "Hmm... it's not here" page is displayed

Actual Result:

Infinite skeleton loading screen.

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6711215_1736533222655.LHN_-_blank_row.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021878923123358968660
  • Upwork Job ID: 1878923123358968660
  • Last Price Increase: 2025-01-13
  • Automatic offers:
    • daledah | Contributor | 105772493
Issue OwnerCurrent Issue Owner: @allroundexperts

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 10, 2025
  2. melvin-bot commented on Jan 10, 2025

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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.

  3. mohit6789 commented on Jan 10, 2025

    @mohit6789
    Contributor

    Proposal

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

    shows blank row when opening a invalid room link

    What is the root cause of that problem?

    We create the LHN option even though reportID is not valid here

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

    To fix issue we can return null if reportID is not valid so empty row will not created. We can add below check here

    const renderItem = useCallback(
      ({item: reportID}: RenderItemProps): ReactElement | null => {
         // Below if block added to fix the issue.
          if (reportID === '-1') {
              return null;
          }
         const itemFullReport = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
    
    

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

    NA as this is bug

    What alternative solutions did you explore? (Optional)

  4. andriivitiv commented on Jan 10, 2025

    @andriivitiv
    Contributor

    Proposal

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

    LHN shows blank row when opening a invalid room link

    What is the root cause of that problem?

    When a report with a random ID, e.g., r/6546545, is opened, the backend returns the report.errorFields.notFound property. In this case, the report is not displayed in the LHN because we check for the report.errorFields.notFound property to be unset.

    const hasErrorsOtherThanFailedReceipt = ReportUtils.hasReportErrorsOtherThanFailedReceipt(report, doesReportHaveViolations, transactionViolations);
    const isReportInAccessible = report?.errorFields?.notFound;

    if (hasErrorsOtherThanFailedReceipt && !isReportInAccessible) {
    reportsToDisplay.push({
    ...report,

    However, when opening r/2652281908731856, for some reason the BE returns report.errorFields.createChat with the value Auth OpenReport returned an error instead of report.errorFields.notFound. This scenario bypasses the above checks, causing this issue.

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

    Ideally, we should investigate why the backend returns report.errorFields.createChat and whether it could instead return report.errorFields.notFound. If that is not possible, we can add a check similar to this one to verify the required properties

    if (!report) {

            if (!report || !report?.reportID) {

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

    Unit/UI tests to ensure that reports with missing reportID, and possibly also type and reportName properties are not displayed.

  5. huult commented on Jan 13, 2025

    @huult
    Contributor

    Proposal

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

    LHN shows blank row when opening a invalid room link

    What is the root cause of that problem?

    When we open the report that is not found, the back-end returns errorFields for createChat.

    • Image

    and store this report to Onyx

    • Image

    In the sidebar, we have not handled the createChat errorFields case yet, which is why this issue occurs.

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

    To resovle this issue we just update case createChat error some thing like that:

    const isReportInAccessible = report?.errorFields?.notFound;

    Update to

            const isReportInAccessible = report?.errorFields?.notFound ?? report?.errorFields?.createChat;
    POC
    Screen.Recording.2025-01-14.at.00.06.15.mov

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

    This is a UI bug; no tests are needed.

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

    we could fix this issue by removing the report from Onyx, or implementing a similar solution like this

        useEffect(() => {
            if (!shouldShowNotFoundPage || report?.reportID || !report?.errorFields?.createChat) {
                return;
            }
    
            Report.deleteReport(reportIDFromRoute);
        }, [report, reportIDFromRoute, shouldShowNotFoundPage]);
  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 13, 2025
  7. melvin-bot commented on Jan 13, 2025

    @melvin-bot
  8. changed the title [-] LHN - LHN shows blank row when opening a invalid room link[/-] [+][$250] LHN - LHN shows blank row when opening a invalid room link[/+] on Jan 13, 2025
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 13, 2025
  10. melvin-bot commented on Jan 13, 2025

    @melvin-bot

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

  11. 34 remaining items

  12. mallenexpensify commented on Feb 5, 2025

    @mallenexpensify
    Contributor

    paying tomorrow

  13. mallenexpensify commented on Feb 6, 2025

    @mallenexpensify
    Contributor

    Contributor: @daledah paid $250 via Upwork
    Contributor+: @allroundexperts due $250 via Upwork

  14. mallenexpensify commented on Feb 6, 2025

    @mallenexpensify
    Contributor

    @allroundexperts can you fill out the BZ checklist plz

  15. mvtglobally commented on Feb 8, 2025

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  16. melvin-bot commented on Feb 10, 2025

    @melvin-bot

    @nkuoch, @mallenexpensify, @allroundexperts, @daledah Whoops! This issue is 2 days overdue. Let's get this updated quick!

  17. mallenexpensify commented on Feb 10, 2025

    @mallenexpensify
    Contributor

    Made @allroundexperts the issue owner, can you fill out the BZ checklist plz?

  18. allroundexperts commented on Feb 11, 2025

    @allroundexperts
    Contributor

    On it today

  19. allroundexperts commented on Feb 11, 2025

    @allroundexperts
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/39377/files#r1951676351

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/469493

    Regression Test Proposal

    Precondition:

    • Logged in to ND, and having some chats in the LHN.

    Test:

    1. Go to https://staging.new.expensify.com/
    2. Open any chat and paste an invalid room link (e.g. https://staging.new.expensify.com/r/2652281908731856)
    3. Click on the link
    4. Click back
    5. Click link again

    Verify that "Hmm... it's not here" page is displayed

    Do we agree 👍 or 👎

  20. mallenexpensify commented on Feb 12, 2025

    @mallenexpensify
    Contributor
  21. JmillsExpensify commented on Jun 13, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @allroundexperts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorretest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions