Skip to content

Merge remote-tracking branch 'origin/main' into alwx/feature/wrap-expโ€ฆ

81dc094
Select commit
Loading
Failed to load commit list.
Merged

feat(tracing): Wrap Expo Router push, replace, navigate, back, dismiss in addition to prefetch #6221

Merge remote-tracking branch 'origin/main' into alwx/feature/wrap-expโ€ฆ
81dc094
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Jun 3, 2026 in 19m 32s

2 issues

find-bugs: Found 2 issues (2 low)

Low

Stale pending navigation if `startInactiveSpan` throws inside `wrapNavigationMethod` - `packages/core/src/js/tracing/expoRouter.ts:80-91`

In wrapNavigationMethod (line 170โ€“191 of the file), setPendingExpoRouterNavigation is called before startInactiveSpan, but only the original.apply call is inside the try/catch that invokes clearPendingExpoRouterNavigation on error. If startInactiveSpan throws, the pending is set and never cleared, so the next unrelated idle navigation span will be incorrectly tagged with a stale navigation.method.

Also found at:

  • packages/core/test/tracing/expoRouter.test.ts:431-438
  • packages/core/test/tracing/expoRouter.test.ts:13-16
Stale `pendingExpoRouterNavigation` when navigation silently does nothing (e.g. `back()` on empty stack) - `packages/core/src/js/tracing/expoRouter.ts:170-186`

If back() or dismiss() returns normally without throwing but does NOT trigger a React Navigation __unsafe_action__ dispatch (e.g. back() called on an empty navigation stack), the pending value set by setPendingExpoRouterNavigation is never consumed โ€” only the catch path calls clearPendingExpoRouterNavigation(). A subsequent unrelated React Navigation dispatch (e.g. a deep-link or programmatic navigation outside the wrapped API) will then consume the stale pending and tag its idle navigation span with the wrong navigation.method.


โฑ 18m 55s ยท 1.7M in / 159.3k out ยท $4.45