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-06-19] [Due for payment 2026-06-18] [$250] Expense - Error when splitting distance expense in 1:1 DM #93238
Version Number: 9.4.5-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:#92052 Email or phone of affected tester (no customers):jsodinjosdjsoinjsiojs@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Open 1:1 DM with any user.
Click + > Split expense > Distance.
Enter waypoints > Next.
Click Split.
Expected Result:
Distance expense will be split in 1:1 DM without issue.
Actual Result:
Error shows up after splitting distance expense in 1:1 DM.
👋 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.
⚠️Medium confidence. Strong leading suspect identified, but one gap remains unexplained (see "Open question"). I couldn't view the Applause video to confirm the exact on-screen error, so please verify before merging a fix.
Leading suspect:PR #92052 migrated SPLIT_BILL_DETAILS from a static route that carried reportID in the path (r/:reportID/split/:reportActionID) to a dynamic-suffix route that drops it (split/:reportActionID). The split-details page now relies on inheriting reportID from the active route instead of reading it from its own path segment — a more fragile resolution that can land you on a not-found / "Failed to parse the path" state when the split preview is tapped.
Why this PR: It's the only change to the split-details flow in this deploy, it's the regression reference on the issue, and "reproducible in staging, not production" matches a freshly-merged routing change (production still uses the old r/:reportID/split/:reportActionID route).
Recommended action (deploy blocker): Revert the SPLIT_BILL_DETAILS portion of #92052 (the room-members migration in the same PR is a separate flow and can stay). A forward-fix would be to re-add reportID to the path (split/:reportID/:reportActionID) and pass it at the two call sites, restoring the old guarantee that reportID is always in the URL.
The page resolves the report via withReportAndReportActionOrNotFound, which reads route.params.reportID (withReportAndReportActionOrNotFound.tsx:41). Since the new path no longer contains :reportID, this value must be inherited from the parent REPORT screen's params during path parsing — if that inheritance fails, reportID is undefined and the page renders FullPageNotFoundView (DynamicSplitBillDetailsPage.tsx:106).
The split preview's onPreviewPressed is the trigger; nothing auto-navigates to split details after pressing "Split", so the error surfaces when the freshly-created split preview is tapped (which matches the PR's own QA step "Tap the split preview in chat").
Open question — distance-specificity not fully explained
The PR's QA steps tested a regular amount split in a 1:1 DM and reported it working. The split-details page renders identically for distance and regular splits (the distance branch only flips isMapDistanceRequest/scanning UI — DynamicSplitBillDetailsPage.tsx:79-127). So if the route fully broke reportID resolution, a regular split would fail too — which contradicts the PR QA. That leaves two possibilities I could not disambiguate without the video:
Navigation timing/param-resolution edge case that only manifests for the distance flow (e.g. the screen the user lands on after a distance split differs from a regular split, so createDynamicRoute appends to a route not in the SPLIT_BILL_DETAILSentryScreens list).
A separate distance-specific error unrelated to 83856 migrate room v2 #92052 — e.g. a backend rejection on the distance split itself surfacing as a red error indicator on the transaction, not a navigation error.
To verify: reproduce on staging, tap the distance split preview, and capture (a) a screenshot of the exact error and (b) the JS console output. A "Failed to parse the path to a navigation state" or a not-found page confirms the routing hypothesis → revert. A red error dot on the transaction with a backend message points to possibility #2 → not this PR.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93238) to create a draft PR. To refine:@MelvinBot <your feedback> (e.g. paste the console error / screenshot from staging). To reject: Explain why you are rejecting Melvin's proposal.
The Split flow never goes through startDistanceRequest. The + → Split expense button calls startMoneyRequest(CONST.IOU.TYPE.SPLIT, …), and startMoneyRequest does not prefetch the rate. So for a split-distance the Onyx value stays undefined, and getRateForP2P (DistanceRequestUtils.ts:294) hits its fallback branch — a flat 67¢/mile, with unit/currency derived from the draft transaction instead of the user's outputCurrency. That inconsistent optimistic transaction is sent to CREATE_DISTANCE_REQUEST and gets rejected, surfacing as the error after Split. (Pre-#84791 this couldn't happen — the rate was a synchronous CONST lookup.)
Recommended fix (deploy-blocker-safe)
Add the prefetch to startMoneyRequest, mirroring what startDistanceRequest already does — one line:
This covers every Split/Submit/Track launch that goes through startMoneyRequest, and is a cheap no-op API.read for non-distance flows. getDefaultP2PMileageRate is already exported and imported in this file.
Secondary hardening (follow-up, not deploy-blocking) + caveats
The prefetch is fire-and-forget (no await). For the split flow the user manually enters waypoints + taps Next, so the API.read realistically lands first — but to fully close the latent race, make the fallback in getRateForP2P return a currency matching the currency argument the caller passed (not getCurrency(transaction)), so a missed prefetch never produces a mis-currency'd transaction. Note the fallback rate is still a flat USD-per-mile constant, so a non-USD user would get a wrong amount even then — prefetching is the real fix.
One unconfirmed detail: I could not view the Applause video, so the exact on-screen error string isn't verified. The mechanism (bad optimistic unit/currency → CREATE_DISTANCE_REQUEST rejection → red error on the split action) is High confidence from code; the precise backend message is Medium. Staging logs for failed CREATE_DISTANCE_REQUEST around v9.4.5-0 (non-USD personal outputCurrency) would confirm.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93238) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
[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.
✅ Verified — splitting a distance expense in a 1:1 DM completes without an error
Tested on web (dev NewDot) by walking the exact repro steps: opened a 1:1 DM, went + > Split expense > Distance, entered two waypoints (New York → Los Angeles), pressed Next, then Split.
The split completed cleanly — no error dialog appeared, and the result posted to the chat (split of $2,024.71 for 2792.71 miles, with the other party owing $1,012.36). The accessibility tree contained no Error text and there were no console errors.
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.
🤖 Recording-pipeline smoke test — could not reach the target flow (blocked at sign-in).
I could not verify splitting a distance expense in a 1:1 DM because sign-in was blocked twice, so per the run instructions I stopped rather than retrying in a loop. The dev server started and the app rendered fine — the blocker is authentication, not the feature under test. Recordings were still captured and are linked below.
What blocked sign-in (two attempts, two different accounts):
melvinbottestuser@gmail.com (and its +alias variants): the backend returns an "email provider has temporarily suspended emails … due to delivery issues" screen — no magic-code entry appears.
@expensify.com address: the magic-code screen appeared, but the staging backend rejected the dev code 000000 (SigninUser → x-jsoncode: 666, invalid code). Staging requires the real emailed code, not the local-dev shortcut.
Verification checklist
Check
Status
Evidence
Dev server starts & serves app
✅ pass
Webpack compiled, sign-in page renders
Sign-in via throwaway gmail alias
❌ fail
"email provider temporarily suspended" error, no magic-code screen
Sign-in via @expensify.com + code 000000
❌ fail
SigninUser returned x-jsoncode: 666 on two attempts
To unblock a future run: seed the browser session with a pre-authenticated token, or use a test account/backend where the 000000 magic code is accepted.
🤖 Verified — the fix works. No error on splitting a distance expense in a 1:1 DM.
I ran the "Action Performed" steps on web (dev NewDot):
Opened a 1:1 DM.
→ Split expense → Distance.
Entered waypoints (New York, NY → Boston, MA, 222.31 mi) → Next.
Tapped Split.
Result: The split expense was created successfully in the DM with no error. The total ($161.17) was split evenly and the DM now shows the expense card (a@a.com owes $80.58 · Distance · 111.14 mi @ $0.725/mi). No error alert or toast appeared. ✅
I ran the reproduction steps from the Action Performed section on the current build (NewDot) and the distance expense split completed successfully in the 1:1 DM with no error.
Steps run:
Opened a 1:1 DM.
+ → Split expense → Distance tab.
Added Start (1 Apple Park Way, Cupertino) and Stop (Googleplex, Mountain View) waypoints → Next.
On the confirm page (10.46 mi, $7.58 split evenly) → clicked Split.
Result: The split posted cleanly — the DM shows split $7.58 for 10.46 miles, owes $3.79, and the distance expense card (Distance, 5.23 mi @ $0.725/mi — $3.79). No red error banner, no "Unexpected error"/"Something went wrong" toast, and no console errors.
This matches the Expected Result ("Distance expense will be split in 1:1 DM without issue"), so the shipped fix is confirmed working.
Evidence
Split submitted — split expense card in the DM, no error
Final state — outstanding distance expense, View button, no error
Activity
applause-bot commentedon Jun 11, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/7ac97aa2ca8c6e140d2e9aa5eaff0e93e173630cc1319e3faab40f066d1c8fec
melvin-bot commentedon Jun 11, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92052
melvin-bot commentedon Jun 11, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 11, 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 Jun 11, 2026
Issue Analysis
Leading suspect: PR #92052 migrated
SPLIT_BILL_DETAILSfrom a static route that carriedreportIDin the path (r/:reportID/split/:reportActionID) to a dynamic-suffix route that drops it (split/:reportActionID). The split-details page now relies on inheritingreportIDfrom the active route instead of reading it from its own path segment — a more fragile resolution that can land you on a not-found / "Failed to parse the path" state when the split preview is tapped.Why this PR: It's the only change to the split-details flow in this deploy, it's the regression reference on the issue, and "reproducible in staging, not production" matches a freshly-merged routing change (production still uses the old
r/:reportID/split/:reportActionIDroute).Recommended action (deploy blocker): Revert the
SPLIT_BILL_DETAILSportion of #92052 (the room-members migration in the same PR is a separate flow and can stay). A forward-fix would be to re-addreportIDto the path (split/:reportID/:reportActionID) and pass it at the two call sites, restoring the old guarantee thatreportIDis always in the URL.Mechanism & evidence
split/<actionID>to the current active route viacreateDynamicRoute(createDynamicRoute.ts:64-72), called fromMoneyRequestAction.tsx:89andChatTransactionPreview.tsx:59.withReportAndReportActionOrNotFound, which readsroute.params.reportID(withReportAndReportActionOrNotFound.tsx:41). Since the new path no longer contains:reportID, this value must be inherited from the parentREPORTscreen's params during path parsing — if that inheritance fails,reportIDisundefinedand the page rendersFullPageNotFoundView(DynamicSplitBillDetailsPage.tsx:106).onPreviewPressedis the trigger; nothing auto-navigates to split details after pressing "Split", so the error surfaces when the freshly-created split preview is tapped (which matches the PR's own QA step "Tap the split preview in chat").Open question — distance-specificity not fully explained
The PR's QA steps tested a regular amount split in a 1:1 DM and reported it working. The split-details page renders identically for distance and regular splits (the distance branch only flips
isMapDistanceRequest/scanning UI —DynamicSplitBillDetailsPage.tsx:79-127). So if the route fully brokereportIDresolution, a regular split would fail too — which contradicts the PR QA. That leaves two possibilities I could not disambiguate without the video:createDynamicRouteappends to a route not in theSPLIT_BILL_DETAILSentryScreenslist).To verify: reproduce on staging, tap the distance split preview, and capture (a) a screenshot of the exact error and (b) the JS console output. A "Failed to parse the path to a navigation state" or a not-found page confirms the routing hypothesis → revert. A red error dot on the transaction with a backend message points to possibility #2 → not this PR.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93238)to create a draft PR.To refine:
@MelvinBot <your feedback>(e.g. paste the console error / screenshot from staging).To reject: Explain why you are rejecting Melvin's proposal.
mjasikowski commentedon Jun 11, 2026
Caused by #84791
mjasikowski commentedon Jun 11, 2026
@MelvinBot this is caused by #84791, can you suggest a solution?
MelvinBot commentedon Jun 11, 2026
Proposal
Root cause
PR #84791 replaced the hardcoded
CONST.CURRENCY_TO_DEFAULT_MILEAGE_RATEmap with a P2P rate fetched from Auth into Onyx (DEFAULT_P2P_MILEAGE_RATE), read synchronously viagetStoredDefaultP2PMileageRate(). The fetch trigger,getDefaultP2PMileageRate(), is wired into exactly one place —startDistanceRequest(MoneyRequest.ts:451) — and every caller of that passesSUBMIT/TRACK/CREATE.The Split flow never goes through
startDistanceRequest. The+ → Split expensebutton callsstartMoneyRequest(CONST.IOU.TYPE.SPLIT, …), andstartMoneyRequestdoes not prefetch the rate. So for a split-distance the Onyx value staysundefined, andgetRateForP2P(DistanceRequestUtils.ts:294) hits its fallback branch — a flat67¢/mile, withunit/currencyderived from the draft transaction instead of the user's outputCurrency. That inconsistent optimistic transaction is sent toCREATE_DISTANCE_REQUESTand gets rejected, surfacing as the error after Split. (Pre-#84791 this couldn't happen — the rate was a synchronous CONST lookup.)Recommended fix (deploy-blocker-safe)
Add the prefetch to
startMoneyRequest, mirroring whatstartDistanceRequestalready does — one line:This covers every Split/Submit/Track launch that goes through
startMoneyRequest, and is a cheap no-opAPI.readfor non-distance flows.getDefaultP2PMileageRateis already exported and imported in this file.Secondary hardening (follow-up, not deploy-blocking) + caveats
await). For the split flow the user manually enters waypoints + taps Next, so theAPI.readrealistically lands first — but to fully close the latent race, make the fallback ingetRateForP2Preturn acurrencymatching thecurrencyargument the caller passed (notgetCurrency(transaction)), so a missed prefetch never produces a mis-currency'd transaction. Note the fallback rate is still a flat USD-per-mile constant, so a non-USD user would get a wrong amount even then — prefetching is the real fix.CREATE_DISTANCE_REQUESTrejection → red error on the split action) is High confidence from code; the precise backend message is Medium. Staging logs for failedCREATE_DISTANCE_REQUESTaround v9.4.5-0 (non-USD personal outputCurrency) would confirm.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93238)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
mjasikowski commentedon Jun 11, 2026
@MelvinBot implement this
30 remaining items
melvin-bot commentedon Jun 17, 2026
@situchan Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Jun 18, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 18, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
situchan commentedon Jun 18, 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.
Link to comment: https://github.com/Expensify/App/pull/84791/changes#r3439084115
[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/650700
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-bbea-aecc-1654-062f151d8ee4mallenexpensify commentedon Jun 20, 2026
Payment Summary
Contributor+: @situchan due $250 via NewDot
^ Test case created. Thx
MelvinBot commentedon Jul 3, 2026
✅ Verified — splitting a distance expense in a 1:1 DM completes without an error
Tested on web (dev NewDot) by walking the exact repro steps: opened a 1:1 DM, went + > Split expense > Distance, entered two waypoints (New York → Los Angeles), pressed Next, then Split.
The split completed cleanly — no error dialog appeared, and the result posted to the chat (split of $2,024.71 for 2792.71 miles, with the other party owing $1,012.36). The accessibility tree contained no
Errortext and there were no console errors.laurenreidexpensify commentedon Jul 7, 2026
$250 approved for @situchan
MelvinBot commentedon Jul 9, 2026
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.
Run details
MelvinBot commentedon Jul 9, 2026
🤖 Recording-pipeline smoke test — could not reach the target flow (blocked at sign-in).
I could not verify splitting a distance expense in a 1:1 DM because sign-in was blocked twice, so per the run instructions I stopped rather than retrying in a loop. The dev server started and the app rendered fine — the blocker is authentication, not the feature under test. Recordings were still captured and are linked below.
What blocked sign-in (two attempts, two different accounts):
melvinbottestuser@gmail.com(and its+aliasvariants): the backend returns an "email provider has temporarily suspended emails … due to delivery issues" screen — no magic-code entry appears.@expensify.comaddress: the magic-code screen appeared, but the staging backend rejected the dev code000000(SigninUser→x-jsoncode: 666, invalid code). Staging requires the real emailed code, not the local-dev shortcut.Verification checklist
@expensify.com+ code000000SigninUserreturnedx-jsoncode: 666on two attemptsAttachments (all recordings included):
▶ Web session recordings (2)
To unblock a future run: seed the browser session with a pre-authenticated token, or use a test account/backend where the
000000magic code is accepted.MelvinBot commentedon Jul 22, 2026
🤖 Verified — the fix works. No error on splitting a distance expense in a 1:1 DM.
I ran the "Action Performed" steps on web (dev NewDot):
Result: The split expense was created successfully in the DM with no error. The total ($161.17) was split evenly and the DM now shows the expense card (
a@a.com owes $80.58 · Distance · 111.14 mi @ $0.725/mi). No error alert or toast appeared. ✅MelvinBot commentedon Jul 22, 2026
✅ Verified — no error, the fix holds
I ran the reproduction steps from the Action Performed section on the current build (NewDot) and the distance expense split completed successfully in the 1:1 DM with no error.
Steps run:
1 Apple Park Way, Cupertino) and Stop (Googleplex, Mountain View) waypoints → Next.Result: The split posted cleanly — the DM shows
split $7.58 for 10.46 miles,owes $3.79, and the distance expense card (Distance, 5.23 mi @ $0.725/mi — $3.79). No red error banner, no "Unexpected error"/"Something went wrong" toast, and no console errors.This matches the Expected Result ("Distance expense will be split in 1:1 DM without issue"), so the shipped fix is confirmed working.
Evidence
Split submitted — split expense card in the DM, no error
Final state — outstanding distance expense, View button, no error