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-19] Expense - Error when creating scan expense in self DM from quick action #85050
Version Number: 9.3.36-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#84552 Email or phone of affected tester (no customers):sjodijsnodijdnoijsido@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to self DM.
Create a scan expense.
Open FAB.
Click Scan receipt from Quick action.
Upload a receipt.
Select self DM.
Click Create expense.
Expected Result:
Scan expense will be created in self DM without issue from QAB.
Actual Result:
Scan expense cannot be created in self DM from QAB.
"There was an error uploading your receipt" is shown.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
When a user goes to their self DM and uses the Quick Action Bar (QAB) scan receipt option from the FAB menu, then uploads a receipt and tries to create the expense, they see "There was an error uploading your receipt." The normal scan expense flow (not via QAB) works fine.
What is the root cause of that problem?
The QAB scan flow uses a different iouType (SUBMIT or TRACK) compared to the regular scan flow which uses CREATE. This difference, combined with the isFromFloatingActionButton flag, causes the post-scan routing logic in handleMoneyRequestStepScanParticipants to bypass both available "fast paths" and forces an extra navigation through the participants page.
When isFromFloatingActionButton=true, the entire "from report" fast-path is skipped. This path contains the shouldSkipConfirmation logic that would directly create the expense via createTransaction.
Since QAB uses SUBMIT/TRACK (not CREATE), this also returns false.
The flow falls through to navigateToParticipantPage(), adding an extra navigation step (scan → participants → confirmation) that doesn't exist in the regular CREATE flow.
During this extra navigation, the receipt — stored as a blob:// URL in the transaction draft — must be re-read from memory when the confirmation page mounts. The confirmation page's useEffect (line ~521) calls validateReceiptFile → checkIfScanFileCanBeRead → readFileAsync, which does a fetch(blobUrl). If this fetch fails (blob invalidated during the extra navigation step), onFailure is triggered, which clears the receipt via setMoneyRequestReceipt(transactionID, '', '', true, '') and navigates the user back. Alternatively, if the receipt becomes empty but the API call still proceeds, the server returns an error that triggers the failureData containing the getReceiptError() receipt error message.
In contrast, the regular scan flow (green receipt button / camera FAB) uses iouType=CREATE, which can take the shouldUseDefaultExpensePolicy path to auto-assign participants and navigate directly to confirmation — or even skip confirmation entirely, keeping the File object alive throughout the call chain without needing blob URL reconstruction.
What changes do you think we should make in order to solve the problem?
The QAB scan quick actions in QuickActionNavigation.ts should use CONST.IOU.TYPE.CREATE instead of CONST.IOU.TYPE.SUBMIT/CONST.IOU.TYPE.TRACK when calling startMoneyRequest for scan request types (REQUEST_SCAN and TRACK_SCAN). This aligns the QAB scan flow with the regular scan flow (green receipt button / camera FAB) which already uses CREATE.
This would allow the shouldUseDefaultExpensePolicy check to pass, enabling the flow to auto-assign participants and go directly to confirmation (or skip it), avoiding the extra participants page navigation that causes the blob URL to become invalid.
Similarly, the QAB fallback scan in FloatingActionButtonAndPopover.tsx:529 which also uses CONST.IOU.TYPE.SUBMIT should be changed to CONST.IOU.TYPE.CREATE for consistency with the green receipt button flow at line 370.
What alternative solutions did you explore? (Optional)
An alternative would be to preserve the File/Blob object across navigation (e.g., by storing it in a React context or module-level variable rather than relying on blob URL re-fetching). However, this is a more invasive change. Using CREATE type to match the existing working flow is simpler and more aligned with how the green receipt button already works.
Another option would be to modify the condition at MoneyRequest.ts:371 to not skip the "from report" fast-path when isFromFloatingActionButton is true. However, the isFromFloatingActionButton guard was likely added intentionally to handle other cases, so changing the iouType is the safer approach.
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.
Classification: Frontend bug Causing PR: #84552 - "[No QA] Re-add the "Sentry logs for Scan shortcut" after being reverted" by @cristipaval (High confidence) Related Issues: #83502
Recommendation: REVERT
PR #84552 should be reverted. The PR introduced the isFromFloatingActionButton flag to track telemetry for scan shortcuts, but it inadvertently broke the QAB scan flow by adding a condition that prevents QAB scan requests from taking the fast path to confirmation.
Labels: No changes made. Keeping DeployBlockerCash as this is a frontend bug caused by an App PR that is reproducible on staging.
📋 Detailed Analysis
Evidence
PR #84552 added the isFromFloatingActionButton flag and condition at line 371 of src/libs/actions/IOU/MoneyRequest.ts:
This condition was intended to ensure the green receipt FAB flow (which uses CONST.IOU.TYPE.CREATE) does not take the "from report" fast path. However, the QAB scan actions use different IOU types:
REQUEST_SCAN uses CONST.IOU.TYPE.SUBMIT (line 52 of QuickActionNavigation.ts)
TRACK_SCAN uses CONST.IOU.TYPE.TRACK (line 68 of QuickActionNavigation.ts)
The QAB implementation in src/libs/actions/QuickActionNavigation.ts uses CONST.IOU.TYPE.SUBMIT and CONST.IOU.TYPE.TRACK for scan requests
The PR was merged on 2026-03-10 and is included in the 9.3.36-1 staging deploy
The issue was reported as reproducible on staging but NOT on production (version 9.3.36-0)
Root Cause
When a user creates a scan expense from the QAB with isFromFloatingActionButton=true:
The flow skips the "from report" fast-path at line 371 because isFromFloatingActionButton=true
The flow also fails the shouldUseDefaultExpensePolicy check at line 523 because that requires iouType === CONST.IOU.TYPE.CREATE, but QAB uses SUBMIT or TRACK
The code falls through to navigateToParticipantPage at line 554, adding an extra navigation step (scan → participants → confirmation)
During this extra navigation, the receipt stored as a blob:// URL must be re-read from memory when the confirmation page mounts
If the blob fetch fails (blob invalidated during navigation) or the receipt becomes empty, the error "There was an error uploading your receipt" is shown
The regular scan flow (green receipt button) works because it uses iouType=CREATE, which can take the shouldUseDefaultExpensePolicy path and navigate directly to confirmation without the problematic extra navigation step.
changed the title [-]Expense - Error when creating scan expense in self DM from quick action[/-][+][Due for payment 2026-03-19] Expense - Error when creating scan expense in self DM from quick action[/+]on Mar 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@cristipaval 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]
Activity
melvin-bot commentedon Mar 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84552
melvin-bot commentedon Mar 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 12, 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:
MelvinBot commentedon Mar 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user goes to their self DM and uses the Quick Action Bar (QAB) scan receipt option from the FAB menu, then uploads a receipt and tries to create the expense, they see "There was an error uploading your receipt." The normal scan expense flow (not via QAB) works fine.
What is the root cause of that problem?
The QAB scan flow uses a different
iouType(SUBMITorTRACK) compared to the regular scan flow which usesCREATE. This difference, combined with theisFromFloatingActionButtonflag, causes the post-scan routing logic inhandleMoneyRequestStepScanParticipantsto bypass both available "fast paths" and forces an extra navigation through the participants page.Specifically, in
MoneyRequest.ts:371:When
isFromFloatingActionButton=true, the entire "from report" fast-path is skipped. This path contains theshouldSkipConfirmationlogic that would directly create the expense viacreateTransaction.Then at
shouldUseDefaultExpensePolicy.ts:10:Since QAB uses
SUBMIT/TRACK(notCREATE), this also returnsfalse.The flow falls through to
navigateToParticipantPage(), adding an extra navigation step (scan → participants → confirmation) that doesn't exist in the regularCREATEflow.During this extra navigation, the receipt — stored as a
blob://URL in the transaction draft — must be re-read from memory when the confirmation page mounts. The confirmation page'suseEffect(line ~521) callsvalidateReceiptFile→checkIfScanFileCanBeRead→readFileAsync, which does afetch(blobUrl). If this fetch fails (blob invalidated during the extra navigation step),onFailureis triggered, which clears the receipt viasetMoneyRequestReceipt(transactionID, '', '', true, '')and navigates the user back. Alternatively, if the receipt becomes empty but the API call still proceeds, the server returns an error that triggers thefailureDatacontaining thegetReceiptError()receipt error message.In contrast, the regular scan flow (green receipt button / camera FAB) uses
iouType=CREATE, which can take theshouldUseDefaultExpensePolicypath to auto-assign participants and navigate directly to confirmation — or even skip confirmation entirely, keeping the File object alive throughout the call chain without needing blob URL reconstruction.What changes do you think we should make in order to solve the problem?
The QAB scan quick actions in
QuickActionNavigation.tsshould useCONST.IOU.TYPE.CREATEinstead ofCONST.IOU.TYPE.SUBMIT/CONST.IOU.TYPE.TRACKwhen callingstartMoneyRequestfor scan request types (REQUEST_SCANandTRACK_SCAN). This aligns the QAB scan flow with the regular scan flow (green receipt button / camera FAB) which already usesCREATE.Specifically:
QuickActionNavigation.ts:49-53(REQUEST_SCAN case): ChangeCONST.IOU.TYPE.SUBMIT→CONST.IOU.TYPE.CREATEQuickActionNavigation.ts:66-68(TRACK_SCAN case): ChangeCONST.IOU.TYPE.TRACK→CONST.IOU.TYPE.CREATEThis would allow the
shouldUseDefaultExpensePolicycheck to pass, enabling the flow to auto-assign participants and go directly to confirmation (or skip it), avoiding the extra participants page navigation that causes the blob URL to become invalid.Similarly, the QAB fallback scan in
FloatingActionButtonAndPopover.tsx:529which also usesCONST.IOU.TYPE.SUBMITshould be changed toCONST.IOU.TYPE.CREATEfor consistency with the green receipt button flow at line 370.What alternative solutions did you explore? (Optional)
An alternative would be to preserve the File/Blob object across navigation (e.g., by storing it in a React context or module-level variable rather than relying on blob URL re-fetching). However, this is a more invasive change. Using
CREATEtype to match the existing working flow is simpler and more aligned with how the green receipt button already works.Another option would be to modify the condition at
MoneyRequest.ts:371to not skip the "from report" fast-path whenisFromFloatingActionButtonis true. However, theisFromFloatingActionButtonguard was likely added intentionally to handle other cases, so changing theiouTypeis the safer approach.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.OSBotify commentedon Mar 12, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #84552 - "[No QA] Re-add the "Sentry logs for Scan shortcut" after being reverted" by @cristipaval (High confidence)
Related Issues: #83502
Recommendation: REVERT
PR #84552 should be reverted. The PR introduced the
isFromFloatingActionButtonflag to track telemetry for scan shortcuts, but it inadvertently broke the QAB scan flow by adding a condition that prevents QAB scan requests from taking the fast path to confirmation.Labels: No changes made. Keeping
DeployBlockerCashas this is a frontend bug caused by an App PR that is reproducible on staging.📋 Detailed Analysis
Evidence
PR #84552 added the
isFromFloatingActionButtonflag and condition at line 371 ofsrc/libs/actions/IOU/MoneyRequest.ts:This condition was intended to ensure the green receipt FAB flow (which uses
CONST.IOU.TYPE.CREATE) does not take the "from report" fast path. However, the QAB scan actions use different IOU types:REQUEST_SCANusesCONST.IOU.TYPE.SUBMIT(line 52 of QuickActionNavigation.ts)TRACK_SCANusesCONST.IOU.TYPE.TRACK(line 68 of QuickActionNavigation.ts)Verification
I verified that:
src/libs/actions/IOU/MoneyRequest.tsand added theisFromFloatingActionButtonchecksrc/libs/actions/QuickActionNavigation.tsusesCONST.IOU.TYPE.SUBMITandCONST.IOU.TYPE.TRACKfor scan requestsRoot Cause
When a user creates a scan expense from the QAB with
isFromFloatingActionButton=true:isFromFloatingActionButton=trueshouldUseDefaultExpensePolicycheck at line 523 because that requiresiouType === CONST.IOU.TYPE.CREATE, but QAB usesSUBMITorTRACKnavigateToParticipantPageat line 554, adding an extra navigation step (scan → participants → confirmation)blob://URL must be re-read from memory when the confirmation page mountsThe regular scan flow (green receipt button) works because it uses
iouType=CREATE, which can take theshouldUseDefaultExpensePolicypath and navigate directly to confirmation without the problematic extra navigation step.2 remaining items
cristipaval commentedon Mar 12, 2026
Thank you! Closing
[-]Expense - Error when creating scan expense in self DM from quick action[/-][+][Due for payment 2026-03-19] Expense - Error when creating scan expense in self DM from quick action[/+]melvin-bot commentedon Mar 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-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-19. 🎊
melvin-bot commentedon Mar 12, 2026
@cristipaval 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]
melvin-bot commentedon Mar 12, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)