Skip to content

[Due for payment 2026-11-26] Distance - No error when creating distance with invalid waypoints from reuse route #103263

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.4-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: #102258
Email or phone of affected tester (no customers): sodjinosdjiojiosjio@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:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Go offline.
  4. Create a distance expense with invalid waypoints.
  5. Go online.
  6. Wait for the expense to be created.
  7. Click + > Track distance > Map.
  8. Click Reuse route.
  9. Select the route with invalid waypoints.
  10. Click Create expense.
  11. Open the expense.

Expected Result:

In Step 10, error should show up when creating distance with invalid waypoints.

Actual Result:

In Step 10, error does not show up when creating distance with invalid waypoints. User can proceed with invalid waypoints.
In Step 11, there is no error on the expense preview.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7279440_1791325835608.2.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7279440

Issue OwnerCurrent Issue Owner: @Pujan92

Activity

  1. added
    DeployBlockerCash
    Bug
    on Oct 6, 2026
  2. applause-bot commented on Oct 6, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/ddaa5de97f941cff32138946e1fd7a3a13462f4f8faf0ef91249638b52ef0aac

  3. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #102258

  4. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @Gonals @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102258

  5. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102258

  6. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  8. MelvinBot commented on Oct 6, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Investigation

    Causing PR: Add Reuse route to the distance Map tab (Expensify/App#102258), by ShridharGoel. It merged on 2026-10-06 and is in the 9.5.4-0 checklist. No other PR in this release touches Reuse route. Confidence: high.

    Recommendation: revert. The feature is new, has no beta check, and the PR is also named in two other open blockers. Fixing forward would take several separate fixes.

    Root cause: Selecting a reused route sets isReusedRoute: true. useFetchRoute then skips getRoute, so errorFields.route is never set. The new Reuse route page also skips the Map step's route-error check. Confirmation blocks submit only when there is a route error, so invalid waypoints go through.

    Investigation details

    All links point to merge commit 8b3fdd9a.

    1. Invalid waypoints are saved. Offline, the waypoint page saves the typed address without coordinates and expects the backend to fill them in later. If the address can't be resolved, the expense keeps those waypoints. Reuse route later returns them.
    2. Selecting the route sets the flag. ReusableDistanceRoutes.ts:47-53 copies the waypoints and distance into the draft and sets isReusedRoute: true. The route type has no field that says whether the route is valid.
    3. The route fetch is skipped. useFetchRoute.ts:44 adds !transaction?.isReusedRoute to shouldFetchRoute. Confirmation uses the same hook (IOURequestStepConfirmation.tsx:627), so the fetch is skipped there too.
    4. The Map step's checks are bypassed. The Map tab blocks Next on a route error, duplicate waypoints, or loading (IOURequestStepDistanceMap.tsx:319-329). IOURequestStepReuseRoute.tsx:143-161 calls navigateToNextStep() as soon as the draft is written.
    5. Confirmation finds no error. Submit is blocked only if (!!routeError ...) (useConfirmationValidation.ts:188), and routeError comes from errorFields.route (useConfirmationListData.ts:152). The draft has no stored route, so it also counts as "pending route" (useDistanceRequestState.ts:127). That skips the amount check (useConfirmationValidation.ts:318).

    The expense preview shows no error because the App never records a route error. I didn't check what the server does with the request.

    Other open blockers from the same PR:

    If you fix forward instead, the minimum is:

    • Stop skipping getRoute for reused routes, or set isReusedRoute only when every waypoint has coordinates and the distance is above 0.
    • Run the Map step's checks on the Reuse route page before calling navigateToNextStep().

    A revert also removes: the web map crash fix in MapViewImpl.web.tsx, and the waypoint clean-up in useWaypointItems and updateWaypoints. Re-land these with the feature.

    I didn't run the app. The code path alone shows that the reuse flow turns off the only check that produces this error.


    Next Steps: Revert the PR above, or reply with @MelvinBot <your feedback> to refine this analysis.


    view run

  9. 18 remaining items

  10. added
    Reviewing
    and removed on Oct 21, 2026
  11. expensify-chore-bot commented on Nov 17, 2026

    @expensify-chore-bot

    This issue has not been updated in over 15 days. @Pujan92, @Gonals, @ShridharGoel eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  12. added
    Daily
    and removed
    Reviewing
    on Nov 19, 2026
  13. changed the title [-]Distance - No error when creating distance with invalid waypoints from reuse route[/-] [+][Due for payment 2026-11-26] Distance - No error when creating distance with invalid waypoints from reuse route[/+] on Nov 19, 2026
  14. melvin-bot commented on Nov 19, 2026

    @melvin-bot

    @Pujan92

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.42-2 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-11-26. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]

  15. IuliiaHerets commented on Nov 22, 2026

    @IuliiaHerets

    Not able to reproduce because, after starting a new Track distance with an enabled internet connection, “Reuse route” doesn’t appear or appears with only valid routes:
    Windows 10/Chrome/Build v9.5.52-1

    2026-11-22.14-35-34.mp4
    2026-11-22.14-36-39.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions