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
iOS - Expense - App crashes when inviting a non existing user to an expense report #88058
Version Number: 9.3.60-0 Reproducible in staging?: Yes 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 BrowserStack:#82065 Email or phone of affected tester (no customers):htad26+hehrhthf@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: iOS 26.3 / iPhone 13 App Component: Money Requests
Action Performed:
Launch the hybrid app
Create an expense in a workspace chat
Open the report.
Click on the report header > Members.
Click Invite members
Invite a user who doesn't have an expensify account
👋 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:
Identify the pull request that introduced this issue and revert it.
Investigation Summary: Classification: Frontend bug. Causing PR: #82065 - feat show Invite button on Members page for money request reports by @M00rish (High confidence). Recommendation: REVERT. PR #82065 added the Invite button to money request reports, but InviteReportParticipantsPage was built for group chats and does not handle the money request report context correctly, causing a crash on iOS when inviting a user without an Expensify account. Assigned: @M00rish (PR author), @abzokhattab (approving reviewer), @lakchote (approving reviewer). Labels: DeployBlockerCash kept. DeployBlocker removed. Root cause: In inviteUsers(), the check !accountID is true for accountID=0 (new user with no account), so they get skipped and an empty invitedEmailsToAccountIDs map is passed to inviteToGroupChat. Combined with isGroupChatReportUtils(report) returning false for a money request report, this issues an INVITE_TO_ROOM command for an unsupported report type causing the iOS native crash.
PR #82065 added an "Invite" button to the Members page for money request reports (IOU/expense reports) by changing the condition at ReportParticipantsPage.tsx:89:
This navigates to InviteReportParticipantsPage, which calls inviteToGroupChat → inviteToRoom. Since a money request report is not a group chat, this falls through to WRITE_COMMANDS.INVITE_TO_ROOM — an API command not designed for expense/IOU reports. The server likely rejects or mishandles this, and the resulting failure data combined with the optimistic Onyx updates (adding participants with MEMBER role to an expense report) corrupts the report state, causing the iOS crash.
This is compounded by a known iOS-specific FlashList crash pattern: the optimistic Onyx updates are applied synchronously before goBack() triggers a navigation transition, and the invite page's FlashList receives new data while its container is being hidden — a pattern that has caused crashes in similar flows (#81168, #78097).
What changes do you think we should make in order to solve the problem?
The invite button should not be shown for money request reports since the invite flow (INVITE_TO_ROOM / INVITE_TO_GROUP_CHAT) does not support them. Revert the condition in ReportParticipantsPage.tsx:89 back to:
const shouldShowInviteButton = isGroupChat;
If inviting members to expense reports is intended as a feature, a separate invite action supporting money request reports needs to be built with the appropriate API command and optimistic data handling.
What alternative solutions did you explore? (Optional)
An alternative would be to add a new code path in InviteReportParticipantsPage and inviteToRoom that handles money request reports differently (e.g., a new INVITE_TO_EXPENSE_REPORT API command). However, this is a larger change and the immediate fix should remove the unsupported UI to unblock the deploy.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
github-actions commentedon Apr 16, 2026
👋 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:
OSBotify commentedon Apr 16, 2026
Investigation Summary: Classification: Frontend bug. Causing PR: #82065 - feat show Invite button on Members page for money request reports by @M00rish (High confidence). Recommendation: REVERT. PR #82065 added the Invite button to money request reports, but InviteReportParticipantsPage was built for group chats and does not handle the money request report context correctly, causing a crash on iOS when inviting a user without an Expensify account. Assigned: @M00rish (PR author), @abzokhattab (approving reviewer), @lakchote (approving reviewer). Labels: DeployBlockerCash kept. DeployBlocker removed. Root cause: In inviteUsers(), the check !accountID is true for accountID=0 (new user with no account), so they get skipped and an empty invitedEmailsToAccountIDs map is passed to inviteToGroupChat. Combined with isGroupChatReportUtils(report) returning false for a money request report, this issues an INVITE_TO_ROOM command for an unsupported report type causing the iOS native crash.
MelvinBot commentedon Apr 16, 2026
Proposal
What is the root cause of that problem?
PR #82065 added an "Invite" button to the Members page for money request reports (IOU/expense reports) by changing the condition at
ReportParticipantsPage.tsx:89:This navigates to
InviteReportParticipantsPage, which callsinviteToGroupChat→inviteToRoom. Since a money request report is not a group chat, this falls through toWRITE_COMMANDS.INVITE_TO_ROOM— an API command not designed for expense/IOU reports. The server likely rejects or mishandles this, and the resulting failure data combined with the optimistic Onyx updates (adding participants withMEMBERrole to an expense report) corrupts the report state, causing the iOS crash.This is compounded by a known iOS-specific FlashList crash pattern: the optimistic Onyx updates are applied synchronously before
goBack()triggers a navigation transition, and the invite page's FlashList receives new data while its container is being hidden — a pattern that has caused crashes in similar flows (#81168, #78097).What changes do you think we should make in order to solve the problem?
The invite button should not be shown for money request reports since the invite flow (
INVITE_TO_ROOM/INVITE_TO_GROUP_CHAT) does not support them. Revert the condition inReportParticipantsPage.tsx:89back to:If inviting members to expense reports is intended as a feature, a separate invite action supporting money request reports needs to be built with the appropriate API command and optimistic data handling.
What alternative solutions did you explore? (Optional)
An alternative would be to add a new code path in
InviteReportParticipantsPageandinviteToRoomthat handles money request reports differently (e.g., a newINVITE_TO_EXPENSE_REPORTAPI command). However, this is a larger change and the immediate fix should remove the unsupported UI to unblock the deploy.Supporting evidence
Key code references:
ReportParticipantsPage.tsx:89— condition that enables invite button for money request reportsInviteReportParticipantsPage.tsx:135-136— callsinviteToGroupChatthengoBack()synchronouslyReport/index.ts:4639-4658—inviteToRoomsendsINVITE_TO_ROOMfor non-group-chat reportsRelated issues (same iOS FlashList/invite crash pattern):
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.lakchote commentedon Apr 16, 2026
#82065 got reverted, closing it
cc @M00rish