Repository navigation
fix(replay): Don't build a Replayer for loading or empty replays - #128811
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
gggritso
reviewed
Oct 26, 2026
gggritso
left a comment
Member
There was a problem hiding this comment.
Interesting start, a few questions
ReplayDetailsProviders hard-coded isFetching={false}, so ReplayContext's
fetching guard in initRoot never fired. When navigating from a loaded replay
to one whose record was cached, the existing Replayer was rebuilt in place
from the new reader, which could still be loading or have fewer than two
frames. rrweb's Replayer throws in that case.
Pass the reader's real fetching state, and have initRoot tear down any
existing Replayer instead of constructing one when there are fewer than two
events.
Fixes JAVASCRIPT-3FVR
Fixes JAVASCRIPT-39VV
Fixes REPLAY-1021
Co-Authored-By: George Gritsouk <george.gritsouk@sentry.io>
sentry-junior
Bot
force-pushed
the
fix/replay-player-context-after-load
branch
from
October 26, 2026 23:13
68cb55a to
08d7463
Compare
gggritso
reviewed
Oct 28, 2026
gggritso
left a comment
Member
There was a problem hiding this comment.
Pretty good just one small ask
gggritso
reviewed
Oct 28, 2026
Member
|
@cursor review |
Contributor
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 82c1c71. Configure here.
gggritso
marked this pull request as ready for review
October 28, 2026 01:36
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replay details could crash with "Replayer need at least 2 events." after prev/next (or back/forward) navigation to a replay whose record was already cached.
The repro case for this is a bit complicated!
What happens is that the second navigation tries to get the second replay information for TanStack's cache, but there aren't any actual replay frames in there. The player crashes because the render chain is such that it doesn't check for fetching status of the replay when the navigation is updated.
The full fix here would be to reconsider the structure of the replay contexts and how they reload, but that's a much bigger task. For now, manually check for this case by avoiding inflating an invalid replay, and making sure the fetching status is passed to the page component (previously this was not needed because it only showed up when it was fully loaded)
Fixes JAVASCRIPT-3FVR
Fixes JAVASCRIPT-39VV
Fixes REPLAY-1021
via George Gritsouk.
--
View Junior Session [Sentry]