Skip to content

[Due for payment 2025-06-09] [$250] Reports - App crashes when sending invoice to new user in Reports > Invoices page #61310

Closed

Description

@mitarachim

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

Action Performed:

Preconditon:

  • Workspace has enabled invoicing feature.
  1. Go to staging.new.expensify.com
  2. Go to Reports > Invoices.
  3. Open FAB > Send invoice.
  4. Enter amount > Next.
  5. Enter the email of any non-existant Gmail account.
  6. Select the account.
  7. Click Send invoice.
  8. Wait for the app to crash.

Expected Result:

App will not crash when sending invoice to new user in Reports > Invoices page.

Actual Result:

App crashes when sending invoice to new user in Reports > Invoices page.

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

Bug6819339_1746174508072.20250502_161920.mp4

Bug6819339_1746174508079!staging.new.expensify.com-1746174434824.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021919262476299363314
  • Upwork Job ID: 1919262476299363314
  • Last Price Increase: 2025-05-12
  • Automatic offers:
    • nkdengineer | Contributor | 107286867
Issue OwnerCurrent Issue Owner: @kadiealexander

Activity

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

    @melvin-bot

    Triggered auto assignment to @kadiealexander (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. ahmdshrif commented on May 2, 2025

    @ahmdshrif
    Contributor

    Proposal

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

    The app crashes when a user tries to send an invoice to someone who doesn't have an account yet in the Reports > Invoices section.

    What is the root cause of that problem?

    The TransactionListItemRow.tsx component tries to access accountID property directly from user objects that may be undefined for new users. This causes a TypeError that crashes the app.

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

    Add null checks when accessing user properties in the TransactionListItemRow component:

    • Use optional chaining (?.) when accessing the accountID properties
    • Add fallback values (like -1) to ensure valid data is always passed

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

    1. Test the component renders correctly when user objects have missing accountID properties
    2. Test the invoice sending flow with non-existent email addresses
    3. Test with various combinations of undefined user properties

    What alternative solutions did you explore? (Optional)

    1. Fixing the data at its source before it reaches the component
    2. Using a wrapper component to validate the data
    3. Implementing React error boundaries
  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 5, 2025
  5. changed the title [-]Reports - App crashes when sending invoice to new user in Reports > Invoices page[/-] [+][$250] Reports - App crashes when sending invoice to new user in Reports > Invoices page[/+] on May 5, 2025
  6. melvin-bot commented on May 5, 2025

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

    @melvin-bot

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

  9. moved this to Bugs and Follow Up Issues in #expensify-bugson May 5, 2025
  10. 56 remaining items

  11. changed the title [-][$250] Reports - App crashes when sending invoice to new user in Reports > Invoices page[/-] [+][Due for payment 2025-06-09] [$250] Reports - App crashes when sending invoice to new user in Reports > Invoices page[/+] on Jun 2, 2025
  12. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.54-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-06-09. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    @hoangzinh @kadiealexander @hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. kadiealexander commented on Jun 9, 2025

    @kadiealexander
    Contributor

    Payments needed:

    @hoangzinh please complete the checklist!

  16. added and removed on Jun 9, 2025
  17. hoangzinh commented on Jun 9, 2025

    @hoangzinh
    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:

    Regression Test Proposal

    Precondition:

    • Workspace has enabled invoicing feature.

    Test:

    1. Go to Reports > Invoices.
    2. Open FAB > Send invoice.
    3. Enter amount > Next.
    4. Enter the email of an account that you haven't chatted before.
    5. Select the account.
    6. Click Send invoice.
    7. Wait for a few seconds
    8. Verify that App can display the new invoice in Reports > Invoices page normally.

    Do we agree 👍 or 👎

  18. hoangzinh commented on Jun 9, 2025

    @hoangzinh
    Contributor

    Requested in ND

  19. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Jun 10, 2025
  20. garrettmknight commented on Jun 13, 2025

    @garrettmknight
    Contributor

    $250 approved for @hoangzinh

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