You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-06-09] [$250] Reports - App crashes when sending invoice to new user in Reports > Invoices page #61310
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.
Go to staging.new.expensify.com
Go to Reports > Invoices.
Open FAB > Send invoice.
Enter amount > Next.
Enter the email of any non-existant Gmail account.
Select the account.
Click Send invoice.
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.
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?
Test the component renders correctly when user objects have missing accountID properties
Test the invoice sending flow with non-existent email addresses
Test with various combinations of undefined user properties
What alternative solutions did you explore? (Optional)
Fixing the data at its source before it reaches the component
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
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
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:
@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]
[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.
Activity
melvin-bot commentedon May 2, 2025
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.ahmdshrif commentedon May 2, 2025
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.tsxcomponent tries to accessaccountIDproperty 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
TransactionListItemRowcomponent:?.) when accessing theaccountIDproperties-1) to ensure valid data is always passedWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
accountIDpropertiesWhat alternative solutions did you explore? (Optional)
[-]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[/+]melvin-bot commentedon May 5, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021919262476299363314
melvin-bot commentedon May 5, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)56 remaining items
[-][$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[/+]melvin-bot commentedon Jun 2, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 2, 2025
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:
melvin-bot commentedon Jun 2, 2025
@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]
kadiealexander commentedon Jun 9, 2025
Payments needed:
@hoangzinh please complete the checklist!
hoangzinh commentedon Jun 9, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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/57614/files#r2135476910
[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/509815
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
hoangzinh commentedon Jun 9, 2025
Requested in ND
garrettmknight commentedon Jun 13, 2025
$250 approved for @hoangzinh