1.386.5
Patch Changes
- #3801
bd06ac7Thanks @ksvat! - fix(replay): prevent silent recorder teardown on session-id rotation. When the session id rotates during active rrweb capture,_updateWindowAndSessionIdscallsstop()then synchronouslystart('session_id_changed'). Ifstop()took the_stopAfterCompressionQueueDrainspath (which fires whenever the compression queue is non-empty — common during steady recording), its async cleanup would later resolve and call_teardown()against the freshly-started recorder, stopping rrweb, removing event listeners, and emptying the V2 trigger-group matchers. From that point on, the recorder'sstatusgetter kept reportingactive/sampled(the_strategyreference was still set), but rrweb was no longer producing events, no listeners were registered, and no$snapshotdata reached the server — the session looked recording-eligible from event metadata yet produced no replay.start()now invalidates the compression-queue state (generation bump plus reset of the stop-in-progress flag and queued-event count), so any pending cleanup from a priorstop()bails at its existing generation check and a laterstop()of the new recorder is not mistaken for the old in-progress one. Affects long-running tabs that rotate session id mid-use (idle timeout, session-past-max-length, orposthog.reset()).
(2026-06-11)