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-03-23] [$250] Report-Error and infinite loading when submitting track expense to WS with workflows disabled #78359
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
Version Number: 9.2.86-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:https://test-management.browserstack.com/projects/2219752/test-runs/TR-2487/folder/13176877/41237352/1089918656 Email or phone of affected tester (no customers):ibellicotest+2230@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: Motorola MotoG60 / Android 12 / Chrome ( mWeb / Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: Account has Self DM.
Prerequisite 2: Account has a workspace with workflows disabled.
Open the staging.new.expensify.com website.
Create a manual expense and submit it to Self DM.
Tap on "Submit it to someone" option on whisper message.
Select a workspace and submit the expense to it.
Open the expense report.
Note that "Unexpected error submitting this expense" and "Unexpected error deleting this expenses" error messages appear on report.
Dismiss the errors.
Note that you are redirected back to chat, and report is now displayed empty.
Reopen report.
Note that infinite skeleton loader is displayed.
Tap on "More"
Note that there is no option to delete the empty report.
Tap on "Retract"
Note that no action is triggered.
Expected Result:
User should be able to submit a track expense to a workspace, even if workflows are disabled.
Actual Result:
"Unexpected error submitting this expenses" and "Unexpected error deleting this expenses" error messages appear at the same time when submitting a track expense to a workspace with workflows disabled. Also, when errors are dismissed, report displays infinite skeleton loader and it can´t be deleted or retracted.
changed the title [-]Report-Error and infinite loading when submitting track expense to WS with workflows disabled[/-][+][$250] Report-Error and infinite loading when submitting track expense to WS with workflows disabled[/+]on Dec 23, 2025
Please re-state the problem that we are trying to solve in this issue.
When a user submits a track expense to a workspace that has workflows disabled, the submission fails with two error messages appearing simultaneously:
"Unexpected error submitting this expense"
"Unexpected error deleting this expense"
After dismissing these errors, the user is redirected back to chat, and the report displays an infinite skeleton loader. The report cannot be deleted or retracted, leaving the user in a broken state.
What is the root cause of that problem?
The root cause is in the getTrackExpenseInformation function in src/libs/actions/IOU.ts. When submitting a track expense to a workspace, the code generates createdWorkspaceParams (workspace-related parameters) whenever the report is a draft, regardless of whether the target workspace has workflows enabled.
These workspace parameters are then sent to the backend API via the CATEGORIZE_TRACKED_EXPENSE command. When workflows are disabled on the workspace, the backend rejects the request because it receives workspace-related parameters that should only be present when workflows are enabled. This causes the API call to fail, triggering both the "submitting" error (from the failed categorization) and "deleting" error (from the failed cleanup operation that attempts to remove the transaction from the original track expense report).
What changes do we think we should make in order to solve the problem?
We should modify the getTrackExpenseInformation function to only generate createdWorkspaceParams when:
The report is a draft (creating a new workspace), already happening here, OR
The policy has workflows enabled (submitting to an existing workspace with workflows)
Specifically, we need to add a check before generating workspace params:
Check if isDraftReportLocal is true (creating new workspace), OR
Check if policy?.areWorkflowsEnabled is true (existing workspace with workflows enabled)
If neither condition is met (i.e., submitting to an existing workspace with workflows disabled), we should skip generating createdWorkspaceParams entirely. This way, the API call will proceed without workspace-related parameters, which the backend can handle correctly when workflows are disabled.
What alternative solutions did we explore? (Optional)
We need to prevent the bad API call or update the backend to handle when workflows are disabled.
Update backend validation to gracefully handle workspace params when workflows are disabled, but this might not be the correct approach since workspace params shouldn't be sent in this scenario.
On client side, we could add validation before making the API call to check if workflows are enabled, but this is essentially what my proposed solution does in a more direct way.
📣 @h7nj9! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.37-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@suneox 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.
N/A: It isn't an impactful bug since it only affects optimistic data
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
Activity
melvin-bot commentedon Dec 23, 2025
Triggered auto assignment to @CortneyOfstad (
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.melvin-bot commentedon Dec 23, 2025
Job added to Upwork: https://www.upwork.com/jobs/~022003566431205148800
[-]Report-Error and infinite loading when submitting track expense to WS with workflows disabled[/-][+][$250] Report-Error and infinite loading when submitting track expense to WS with workflows disabled[/+]melvin-bot commentedon Dec 23, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (
External)CortneyOfstad commentedon Dec 23, 2025
Hey @suneox! There is a proposal above for you to review. Thanks!
suneox commentedon Dec 24, 2025
Thank for all proposals I'll take a look at this one soon
h7nj9 commentedon Dec 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user submits a track expense to a workspace that has workflows disabled, the submission fails with two error messages appearing simultaneously:
After dismissing these errors, the user is redirected back to chat, and the report displays an infinite skeleton loader. The report cannot be deleted or retracted, leaving the user in a broken state.
What is the root cause of that problem?
The root cause is in the
getTrackExpenseInformationfunction insrc/libs/actions/IOU.ts. When submitting a track expense to a workspace, the code generatescreatedWorkspaceParams(workspace-related parameters) whenever the report is a draft, regardless of whether the target workspace has workflows enabled.These workspace parameters are then sent to the backend API via the
CATEGORIZE_TRACKED_EXPENSEcommand. When workflows are disabled on the workspace, the backend rejects the request because it receives workspace-related parameters that should only be present when workflows are enabled. This causes the API call to fail, triggering both the "submitting" error (from the failed categorization) and "deleting" error (from the failed cleanup operation that attempts to remove the transaction from the original track expense report).What changes do we think we should make in order to solve the problem?
We should modify the
getTrackExpenseInformationfunction to only generatecreatedWorkspaceParamswhen:Specifically, we need to add a check before generating workspace params:
isDraftReportLocalis true (creating new workspace), ORpolicy?.areWorkflowsEnabledis true (existing workspace with workflows enabled)If neither condition is met (i.e., submitting to an existing workspace with workflows disabled), we should skip generating
createdWorkspaceParamsentirely. This way, the API call will proceed without workspace-related parameters, which the backend can handle correctly when workflows are disabled.What alternative solutions did we explore? (Optional)
We need to prevent the bad API call or update the backend to handle when workflows are disabled.
melvin-bot commentedon Dec 24, 2025
📣 @h7nj9! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
80 remaining items
melvin-bot commentedon Mar 16, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Mar 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.37-10 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-03-23. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 16, 2026
@suneox 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]
CortneyOfstad commentedon Mar 23, 2026
@suneox — can you please complete the checklist?
@Uzaifm127 — I sent you an offer via Upwork here. Please let me know once you accept
Uzaifm127 commentedon Mar 23, 2026
@CortneyOfstad Thanks.
Accepted the offer, requested the payment.
suneox commentedon Mar 23, 2026
BugZero Checklist:
[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.
There is no offending PR. This is an edge case related to restoring the initial state from a long time ago in the original feature, and another PR that enhanced failureData also missed this case at Refactor convertTrackedExpenseToRequest function #56808 Fix/79072 - Opening 1:1 expense in offline loads infinitely submitted from self dm #80213
[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.
N/A: It isn't an impactful bug since it only affects optimistic data
CortneyOfstad commentedon Mar 23, 2026
Payment Summary
@suneox — to be paid $250 via NewDot
@Uzaifm127 — paid $250 via Upwork
Regression Test
Per comment here, test is not needed
trjExpensify commentedon Mar 27, 2026
approved $250 for @suneox