Intermittent browser-specific bug in experimental feature with partial maintainer acknowledgement.
The issue describes intermittent stalling in view transitions with the default `onDefaultTransitionIndicator` handler in Chrome and Safari. The problem appears related to React's experimental navigation API integration and has been acknowledged by a maintainer. While there's some debugging context, the fix likely requires deep understanding of React's experimental features and browser timing behaviors.
The default onDefaultTransitionIndicator seems to sporadically stall view transitions. This does not occur with a custom onDefaultTransitionIndicator handler.
This occurs in Chrome, and Safari with the "Navigation API" feature flag enabled. This doesn't occur in Firefox because it doesn't support the Navigation API yet.
| Chrome | Safari |
|---|---|
The error message in development is a bit more descriptive:
Uncaught Error: A ViewTransition timed out because a Navigation stalled. This can happen if a Navigation is blocked on React itself. Such as if it's resolved inside useEffect. This can be solved by moving the resolution to useLayoutEffect.
at customizeViewTransitionError (react-dom-client.development.js:25585:20)
at react-dom-client.development.js:25783:24Caused by: TimeoutError: Transition was aborted because of timeout in DOM update
While the code example implements a custom router which also intercepts navigation events, it resolves them correctly inside useLayoutEffect(). Moreover, adding a custom onDefaultTransitionIndicator prevents the error, which suggests that the router code is correct, and that this is an issue within React with the default onDefaultTransitionIndicator.
Possibly related: #34662, #34676
React version: "experimental" (>19.3.0-experimental-9724e3e6-20251008)
enableDefaultTransitionIndicator is enabled.Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!