Skip to content

[Payment due 2025-12-10] [$250] Expense - App crashes after admin rejects member's expense and member opens Reports #73846

Closed

Description

@jponikarchuk

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.41-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: Exp #62787
Email or phone of affected tester (no customers): sdoijndoidsjdnoidsj2@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Search

Action Performed:

Precondition:

  • Submission frequency is set to Instantly.
  • Admin invites member to the workspace.
  1. Go to staging.new.expensify.com
  2. [Member] Create two expenses in the workspace chat.
  3. [Member] Go to Reports > Expenses.
  4. [Member] Go back to Inbox.
  5. [Admin] Open member's expense report.
  6. [Admin] Open any expense thread.
  7. [Admin] Click More > Reject.
  8. [Admin] Enter reason and save it.
  9. [Member] Go to Reports.

Expected Result:

App will not crash.

Actual Result:

App crashes.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

logs.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021985418819527787376
  • Upwork Job ID: 1985418819527787376
  • Last Price Increase: 2025-11-24
  • Automatic offers:
    • daledah | Contributor | 109588681
Issue OwnerCurrent Issue Owner: @iwiznia

Activity

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

    @melvin-bot

    Triggered auto assignment to @garrettmknight (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. daledah commented on Oct 30, 2025

    @daledah
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-11-20 03:51:53 UTC.

    Proposal

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

    App crashes.

    What is the root cause of that problem?

    Here is error message

    Image

    After the admin rejects the member's expense. Expense is moved to unreported expense => root cause is Onyx data update report id from "" to "0"

    it causes useOnyx error here

    const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionItem.reportID}`, {canBeMissing: true});

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

    We should use getNonEmptyStringOnyxID function to wrap the reportID to prevent changing the report ID from "" to "0"

            const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(transactionItem.reportID)}`, {canBeMissing: true});
    

    const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionItem.reportID}`, {canBeMissing: true});

    Note: We can use getNonEmptyStringOnyxID in other places that useOnyx hook

    What alternative solutions did you explore? (Optional)

    Or we can skip get the onyx data if report id is "0"

        const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionItem.reportID !== CONST.REPORT.UNREPORTED_REPORT_ID ? transactionItem.reportID : ''}`, {canBeMissing: true});
    

    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.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 3, 2025
  5. changed the title [-]Expense - App crashes after admin rejects member's expense and member opens Reports[/-] [+][$250] Expense - App crashes after admin rejects member's expense and member opens Reports[/+] on Nov 3, 2025
  6. melvin-bot commented on Nov 3, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 3, 2025
  8. melvin-bot commented on Nov 3, 2025

    @melvin-bot

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

  9. melvin-bot commented on Nov 10, 2025

    @melvin-bot

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

  10. 32 remaining items

  11. akinwale commented on Dec 9, 2025

    @akinwale
    Contributor

    BugZero Checklist:

    • [@akinwale] 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:

    • [@akinwale] 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:

    • [@akinwale] 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:

    Regression Test Proposal

    Precondition:

    • Submission frequency is set to Instantly.
    • Admin has invited a member to the workspace.

    Test:

    1. Launch the Expensify app.
    2. As the workspace member, create two expenses in the workspace chat.
    3. As the member, navigate to Reports > Expenses.
    4. As the member, navigate back to Inbox.
    5. As admin, open the member's expense report.
    6. As admin, open any expense thread.
    7. As admin, click More > Reject.
    8. As admin, enter reason and save.
    9. As the member, navigate to Reports.
    10. Verify that the app does not crash after navigating to Reports as the member.

    Do we agree 👍 or 👎?

  12. akinwale commented on Dec 9, 2025

    @akinwale
    Contributor

    @garrettmknight Automation missed this. The PR was deployed to production on 2025-12-03 making the payment due date 2025-12-10.

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Dec 10, 2025
  14. changed the title [-][$250] Expense - App crashes after admin rejects member's expense and member opens Reports[/-] [+][Payment due 2025-12-10] [$250] Expense - App crashes after admin rejects member's expense and member opens Reports[/+] on Dec 10, 2025
  15. garrettmknight commented on Dec 10, 2025

    @garrettmknight
    Contributor

    Payment Summary

    • Contributor: @daledah paid $250 via Upwork
    • Contributor+: @akinwale due $250 via NewDot
  16. JmillsExpensify commented on Dec 11, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @akinwale

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 contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions