Skip to content

[$250] Expense - Empty report is displayed on member's side when admin submits an expense #75754

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.2.62-0
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from TestRail: #71280
Email or phone of affected tester (no customers): htad26+fdfdfdgd@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. As user A create a workspace
  2. Go to workspace chat
  3. Click on header > Members > Invite a new user > Invite User B
  4. Return to workspace chat > Click invite to chat only
  5. Login to new dot as User B > Open the workspace chat
  6. As User A submit a new expense
  7. As User B, observe the newly submitted expense

Expected Result:

The submitted expense should be displayed

Actual Result:

Empty report is displayed on the employee's side

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug7010175_1763733960681.2025-11-21_17_04_11.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021993034317149435838
  • Upwork Job ID: 1993034317149435838
  • Last Price Increase: 2026-03-02
Issue OwnerCurrent Issue Owner: @hoangzinh

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 21, 2025
  2. melvin-bot commented on Nov 21, 2025

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (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. melvin-bot commented on Nov 21, 2025

    @melvin-bot

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

  4. melvin-bot commented on Nov 21, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Nov 21, 2025

    @github-actions
    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.
  6. self-assigned this
    on Nov 21, 2025
  7. parasharrajat commented on Nov 21, 2025

    @parasharrajat
    Member

    This might also be happening on production, as I didn't change that functionality.

  8. self-assigned this
    on Nov 21, 2025
  9. 92 remaining items

  10. MelvinBot commented on Feb 20, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When an admin submits an expense in a workspace chat, chat-only invited members see an empty report (showing an "Open for details" placeholder with an eye-disabled icon) instead of the actual submitted expense. The expense preview never loads unless the user manually refreshes or navigates away and back.

    What is the root cause of that problem?

    The root cause is a missing iouReport in the Pusher event payload combined with no client-side fallback fetch.

    When an admin submits an expense, the server broadcasts an ONYX_API_UPDATE Pusher event to all workspace chat participants. For chat-only members, this event includes the reportAction (of type REPORT_PREVIEW) which references an iouReportID via originalMessage.linkedReportID, but does not include the actual iouReport data at the Onyx key report_{iouReportID}.

    The frontend data flow then breaks down as follows:

    1. The Pusher handler at User.ts:966-988 applies the raw Onyx updates directly — it does not fetch any referenced data that's missing from the payload
    2. useReportWithTransactionsAndViolations.ts:15 subscribes to report_{iouReportID} in Onyx via useOnyx, which returns undefined since the report was never stored
    3. MoneyRequestReportPreviewContent.tsx:147 computes shouldShowAccessPlaceHolder = !iouReport && !shouldShowLoading, which evaluates to true
    4. MoneyRequestReportPreviewContent.tsx:912 renders AccessMoneyRequestReportPreviewPlaceHolder (the eye-disabled icon with "Open for details") instead of the transaction carousel

    There is no useEffect or other mechanism in MoneyRequestReportPreview or its content component to detect that iouReportID is present but iouReport is missing, and trigger a fetch via openReport().

    The intermittent nature of the bug is explained by whether the user already has the iouReport cached in Onyx from a previous session or navigation.

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

    This is primarily a backend issue — the Pusher event payload should include the iouReport data for workspace chat members who have access to it. A backend PR has already been submitted by @mjasikowski.

    As a complementary frontend resilience fix, add a useEffect in MoneyRequestReportPreviewContent.tsx (or index.tsx) that detects when iouReportID is truthy but iouReport is undefined (and loading is complete), and calls openReport(iouReportID) once to fetch the missing data. Use a useRef flag to prevent repeated fetches on re-renders. While the fetch is in progress, show a loading skeleton instead of the access placeholder.

    What alternative solutions did you explore? (Optional)

    • Client-only fix (without backend change): Always calling openReport as a fallback would work but adds unnecessary network requests for every user. The backend fix is the right primary solution since it eliminates the problem at the source.
    • Modifying the Pusher handler to detect missing referenced reports and proactively fetch them was considered, but this would be a much larger architectural change affecting all Pusher event processing, and is overly broad for this specific issue.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  11. mjasikowski commented on Feb 24, 2026

    @mjasikowski
    Contributor

    @hoangzinh yes, it's deployed

  12. hoangzinh commented on Feb 25, 2026

    @hoangzinh
    Contributor

    cool. Can we request re-test for this issue?

  13. mjasikowski commented on Feb 25, 2026

    @mjasikowski
    Contributor

    Requested retest

  14. IuliiaHerets commented on Feb 25, 2026

    @IuliiaHerets

    @mjasikowski Chrome / v9.3.25-13
    The empty report does not reproduce. But when user B opens the expense report, there are 2 expenses.

    Screen.Recording.2026-02-25.at.12.10.40.mp4
  15. mvtglobally commented on Feb 28, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  16. melvin-bot commented on Mar 2, 2026

    @melvin-bot

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

  17. hoangzinh commented on Mar 3, 2026

    @hoangzinh
    Contributor

    @mjasikowski Chrome / v9.3.25-13 The empty report does not reproduce. But when user B opens the expense report, there are 2 expenses.

    Screen.Recording.2026-02-25.at.12.10.40.mp4

    @mjasikowski we can close this issue. The reported bug above will be addressed in this issue #83442

  18. mjasikowski commented on Mar 3, 2026

    @mjasikowski
    Contributor

    @dylanexpensify please handle payment here and we're good

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsMelvin TriageAutomatic AI Analysis of an issueretest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions