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-04-30] [Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing #88041
Version Number: 9.3.60-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:#87103 Email or phone of affected tester (no customers):soidnjsoidjoisjdiosj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android 16 App Component: Money Requests
Action Performed:
Precondition:
App location access is allowed.
Launch Expensify app.
Tap + > Track distance > GPS.
Tap Start.
Tap app back button.
Tap GPS tracking in progress.
Expected Result:
Map will load.
Actual Result:
Map does not load and is stuck on Map pending view.
👋 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.
Classification: Frontend bug
Causing PR: #87103 - "Add a map on the GPS screen that shows the trip live" by @GCyganek (High confidence)
Related Issues: 86026
Recommendation: REVERT
PR 87103 introduced the Mapbox map to the GPS distance screen. When the user navigates away (presses the device back button) and returns via "GPS tracking in progress", the screen remounts, calls initMapboxToken() again, and must wait for the Mapbox access token to resolve asynchronously. Until isAccessTokenSet becomes true in MapView.tsx, the PendingMapView is shown instead of the actual map, leaving the user stuck on the pending view.
Assigned: @GCyganek (PR author), @dukenv0307 and @puneetlath (approving reviewers)
Labels: DeployBlockerCash kept (this is a frontend App bug). No label changes needed.
Detailed Analysis:
Evidence:
The melvin-bot assigned PR 87103 as the causing PR based on timing/authorship
PR 87103 is the first PR to introduce a Mapbox map view into IOURequestStepDistanceGPS/index.native.tsx
The issue is staging-only (new feature, does not exist in production), and PR 87103 is the staging PR adding this map
Bug reproduction steps match exactly: start GPS tracking, press back, return via "GPS tracking in progress" prompt causes remount
PR 87103 modified this file directly (adding DistanceMapView and Mapbox token lifecycle)
PR 87103 added initMapboxToken() / stopMapboxToken() via useEffect at component mount/unmount
MapView.tsx only renders the map when: !isOffline && isAccessTokenSet && !!defaultSettings (line 253)
Root Cause:
In MapView.tsx, isAccessTokenSet starts as false and only flips to true after setAccessToken(accessToken).then(...) resolves. When the user presses the Android back button and returns to the GPS screen via the "GPS tracking in progress" notification, the component unmounts (calling stopMapboxToken) and remounts (calling initMapboxToken()). The mapboxAccessToken Onyx value must be re-fetched and setAccessToken must resolve before the map appears. It appears this async resolution does not complete, so the PendingMapView is shown indefinitely.
The Android-only DistanceMapView wrapper maintains an isMapReady state (initialized to false) that shows a "Map pending" overlay until the inner MapView fires onMapReady. This callback only fires inside setMapIdle, which is the handler for Mapbox's onMapIdle event.
When the user navigates away, isIdle is set to false on blur. When the user navigates back, the component either remounts (resetting isMapReady to false) or persists with isIdle=false. In both cases, Mapbox on Android doesn't reliably re-fire onMapIdle for an already-loaded/idle map, so onMapReady never fires again and the pending overlay stays visible.
The non-Android DistanceMapView simply renders MapView with no overlay, which is why this is Android-only.
What changes do you think we should make in order to solve the problem?
Add a focus listener in MapView.tsx (alongside the existing blur listener at line 159) that re-triggers onMapReady when the screen regains focus and the map was previously ready. This ensures the Android DistanceMapView overlay gets dismissed on re-navigation.
Alternatively, in DistanceMapView/index.android.tsx, listen for the navigation focus event and call onMapReady if the underlying Mapbox view is already rendered (i.e., isAccessTokenSet is true and the map was previously loaded). This avoids modifying the shared MapView component.
What alternative solutions did you explore? (Optional)
Removing the Android overlay entirely: Not viable — the overlay exists to handle the slow initial map load on Android devices.
Using onMapIdle with a focus-triggered camera move: Could force Mapbox to re-fire onMapIdle by nudging the camera on focus, but this is a hack and could cause visible map jitter.
Investigation details
Evidence chain:
DistanceMapView/index.android.tsx:16 — isMapReady state starts false, overlay shown at line 35
MapView.tsx:182-189 — onMapReady only called inside setMapIdle (the onMapIdle handler)
MapView.tsx:159-164 — isIdle reset to false on navigation blur
MapView.tsx:258 — onMapIdle={setMapIdle} is the only trigger for the idle→ready chain
On re-navigation, Mapbox Android doesn't re-fire onMapIdle for an already-idle map, breaking the chain
Why Android-only:DistanceMapView/index.tsx (non-Android) is just a passthrough to MapView with no overlay logic.
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.
changed the title [-]Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/-][+][Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/+]on Apr 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.60-22 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307 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]
changed the title [-][Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/-][+][Due for payment 2026-04-30] [Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/+]on Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307 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 Apr 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #87103
melvin-bot commentedon Apr 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 16, 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:
OSBotify commentedon Apr 16, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #87103 - "Add a map on the GPS screen that shows the trip live" by @GCyganek (High confidence)
Related Issues: 86026
Recommendation: REVERT
PR 87103 introduced the Mapbox map to the GPS distance screen. When the user navigates away (presses the device back button) and returns via "GPS tracking in progress", the screen remounts, calls initMapboxToken() again, and must wait for the Mapbox access token to resolve asynchronously. Until isAccessTokenSet becomes true in MapView.tsx, the PendingMapView is shown instead of the actual map, leaving the user stuck on the pending view.
Assigned: @GCyganek (PR author), @dukenv0307 and @puneetlath (approving reviewers)
Labels: DeployBlockerCash kept (this is a frontend App bug). No label changes needed.
Detailed Analysis:
Evidence:
Verification:
Root Cause:
In MapView.tsx, isAccessTokenSet starts as false and only flips to true after setAccessToken(accessToken).then(...) resolves. When the user presses the Android back button and returns to the GPS screen via the "GPS tracking in progress" notification, the component unmounts (calling stopMapboxToken) and remounts (calling initMapboxToken()). The mapboxAccessToken Onyx value must be re-fetched and setAccessToken must resolve before the map appears. It appears this async resolution does not complete, so the PendingMapView is shown indefinitely.
MelvinBot commentedon Apr 16, 2026
Proposal
What is the root cause of that problem?
The Android-only
DistanceMapViewwrapper maintains anisMapReadystate (initialized tofalse) that shows a "Map pending" overlay until the innerMapViewfiresonMapReady. This callback only fires insidesetMapIdle, which is the handler for Mapbox'sonMapIdleevent.When the user navigates away,
isIdleis set tofalseon blur. When the user navigates back, the component either remounts (resettingisMapReadytofalse) or persists withisIdle=false. In both cases, Mapbox on Android doesn't reliably re-fireonMapIdlefor an already-loaded/idle map, soonMapReadynever fires again and the pending overlay stays visible.The non-Android
DistanceMapViewsimply rendersMapViewwith no overlay, which is why this is Android-only.What changes do you think we should make in order to solve the problem?
Add a
focuslistener inMapView.tsx(alongside the existingblurlistener at line 159) that re-triggersonMapReadywhen the screen regains focus and the map was previously ready. This ensures the AndroidDistanceMapViewoverlay gets dismissed on re-navigation.Alternatively, in
DistanceMapView/index.android.tsx, listen for the navigationfocusevent and callonMapReadyif the underlying Mapbox view is already rendered (i.e.,isAccessTokenSetis true and the map was previously loaded). This avoids modifying the sharedMapViewcomponent.What alternative solutions did you explore? (Optional)
onMapIdlewith a focus-triggered camera move: Could force Mapbox to re-fireonMapIdleby nudging the camera on focus, but this is a hack and could cause visible map jitter.Investigation details
Evidence chain:
DistanceMapView/index.android.tsx:16—isMapReadystate startsfalse, overlay shown at line 35MapView.tsx:182-189—onMapReadyonly called insidesetMapIdle(theonMapIdlehandler)MapView.tsx:159-164—isIdlereset tofalseon navigationblurMapView.tsx:258—onMapIdle={setMapIdle}is the only trigger for the idle→ready chainonMapIdlefor an already-idle map, breaking the chainWhy Android-only:
DistanceMapView/index.tsx(non-Android) is just a passthrough toMapViewwith no overlay logic.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.GCyganek commentedon Apr 16, 2026
checking...
GCyganek commentedon Apr 16, 2026
Fixed, posting a PR in a moment, thanks for reporting this!
m-natarajan commentedon Apr 16, 2026
Passed, Xiaomi Redmi Note 10 / Android 12, App 9.3.60-9
Screenrecorder-2026-04-16-23-21-30-784.mp4
melvin-bot commentedon Apr 21, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".[-]Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/-][+][Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/+]melvin-bot commentedon Apr 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.60-22 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-04-28. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 21, 2026
@dukenv0307 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]
[-][Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/-][+][Due for payment 2026-04-30] [Due for payment 2026-04-28] Android - GPS - Map does not load when opening track GPS when tracking is ongoing[/+]melvin-bot commentedon Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 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-04-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 23, 2026
@dukenv0307 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]