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 2026-08-17] Error when assigning Expensify card to phone number user invited during issue card flow #80874
On cardholder step, enter a phone number (60128323983), select the phone number and click Invite.
Complete the rest of the steps and reach confirm page.
On confirm page, click Issue card.
Enter magic code.
Expected Result:
The card will be assigned successfully.
Actual Result:
Error "Oops... something went wrong and your request could not be completed. Please try again later." shows up when assigning Expensify card to phone number user invited during issue card flow.
Please re-state the problem that we are trying to solve in this issue.
When issuing an Expensify card to a user who was invited via phone number during the card issuance flow, an error "Oops... something went wrong and your request could not be completed. Please try again later." appears after entering the magic code.
Actual: Error shows up when assigning Expensify card to phone number user
What is the root cause of that problem?
The root cause is a mismatch between the assigneeEmail format used in the card issuance API and the actual login format stored in the backend.
When a user selects a phone number to invite:
In AssigneeStep.tsx, the invitingMemberEmail is set to the raw phone number (e.g., +15551234567):
The backend cannot find a user with login +15551234567 because the actual login in the system is +15551234567@expensify.sms, causing the API to fail with a generic error.
What changes do you think we should make in order to solve the problem?
Convert the assigneeEmail to SMS domain format before sending to the API in issueExpensifyCard function:
This ensures that phone numbers are converted to the proper SMS domain format (e.g., +15551234567@expensify.sms) before being sent to the backend, matching the format used when the member was invited to the workspace.
What alternative solutions did you explore? (Optional)
Fix at AssigneeStep level: Convert the phone number when setting invitingMemberEmail in AssigneeStep.tsx. However, this could cause issues with display (showing +15551234567@expensify.sms instead of the phone number) and with the invite flow that expects the raw phone number.
Fix at InviteNewMemberStep level: Convert when setting assigneeEmail from invitingMemberEmail. This is a valid alternative but would require changes in multiple places if the same pattern exists elsewhere.
changed the title [-]Error when assigning Expensify card to phone number user invited during issue card flow[/-][+][Due for payment 2026-08-17] Error when assigning Expensify card to phone number user invited during issue card flow[/+]on Aug 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.51-1 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 2026-08-17. 🎊
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]. If no checklist is needed for this issue, you can click: [no checklist button]
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
[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:
[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 Jan 29, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)melvin-bot commentedon Jan 29, 2026
Triggered auto assignment to @stephanieelliott (
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.daledah commentedon Jan 29, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When issuing an Expensify card to a user who was invited via phone number during the card issuance flow, an error "Oops... something went wrong and your request could not be completed. Please try again later." appears after entering the magic code.
Actual: Error shows up when assigning Expensify card to phone number user
What is the root cause of that problem?
The root cause is a mismatch between the
assigneeEmailformat used in the card issuance API and the actual login format stored in the backend.When a user selects a phone number to invite:
AssigneeStep.tsx, theinvitingMemberEmailis set to the raw phone number (e.g.,+15551234567):App/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx
Lines 83 to 94 in a2f6d72
InviteNewMemberStep.tsx, theassigneeEmailis set frominvitingMemberEmail(still raw phone number):App/src/pages/workspace/expensifyCard/issueNew/InviteNewMemberStep.tsx
Lines 54 to 60 in a2f6d72
addMembersToWorkspace, the phone number IS correctly converted to SMS domain format (e.g.,+15551234567@expensify.sms):App/src/libs/actions/Policy/Member.ts
Line 882 in a2f6d72
issueExpensifyCardis called, it sends the raw phone number asassigneeEmail:App/src/libs/actions/Card.ts
Lines 818 to 825 in a2f6d72
The backend cannot find a user with login
+15551234567because the actual login in the system is+15551234567@expensify.sms, causing the API to fail with a generic error.What changes do you think we should make in order to solve the problem?
Convert the
assigneeEmailto SMS domain format before sending to the API inissueExpensifyCardfunction:src/libs/actions/Card.ts:
This ensures that phone numbers are converted to the proper SMS domain format (e.g.,
+15551234567@expensify.sms) before being sent to the backend, matching the format used when the member was invited to the workspace.What alternative solutions did you explore? (Optional)
Fix at AssigneeStep level: Convert the phone number when setting
invitingMemberEmailinAssigneeStep.tsx. However, this could cause issues with display (showing+15551234567@expensify.smsinstead of the phone number) and with the invite flow that expects the raw phone number.Fix at InviteNewMemberStep level: Convert when setting
assigneeEmailfrominvitingMemberEmail. This is a valid alternative but would require changes in multiple places if the same pattern exists elsewhere.42 remaining items
[-]Error when assigning Expensify card to phone number user invited during issue card flow[/-][+][Due for payment 2026-08-17] Error when assigning Expensify card to phone number user invited during issue card flow[/+]melvin-bot commentedon Aug 10, 2026
@parasharrajat / @daledah @mallenexpensify
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.51-1 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 2026-08-17. 🎊
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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Aug 13, 2026
@parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Aug 16, 2026
Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.
melvin-bot commentedon Aug 16, 2026
Payment Summary
Resolving PRs:
fix: error when assigning Expensify card to phone number #81267
Reviewer: @parasharrajat owed $250 via NewDot
Reviewer: @daledah owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
melvin-bot commentedon Aug 17, 2026
@mallenexpensify Still overdue 6 days?! Let's take care of this!
parasharrajat commentedon Aug 18, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: [No QA] 1-6 Card Flow UI #44741 (comment)
Link to the comment on the Issue: [HOLD for payment 2024-08-07] [Workspace Feeds] [External] Create UI and logic for Steps 1-6 #44309
[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:
[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/672777
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-9305-a38e-72ef-193a204dfc34mallenexpensify commentedon Aug 18, 2026
Payment Summary
Contributor: @daledah paid $250 via Upwork
Contributor+: @parasharrajat due $250 via NewDot
garrettmknight commentedon Sep 18, 2026
$250 approved for @parasharrajat