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
When closing the SDK the on-demand replay capturing is not restarted.
An initial investigation showed that uninstalling the SentrySessionReplayIntegration calls the method SentrySessionReplay.pause() which invalidates the CADisplayLink used as the trigger for creating frames:
When installing the SDK again, there seems to be left-over state and the session replay recorder is not bootstrapped correctly.
When calling stop() instead of pause() in the SentrySessionReplayIntegration, the object gets deallocated and discarded, but it is not started again correctly.
The text was updated successfully, but these errors were encountered:
philprime
changed the title
On-demand Session Replay is not cleaned up correctly after calling Sentry.close
Session Replay is not cleaned up correctly after calling Sentry.close
Apr 8, 2025
Description
I created a sample in #5055 which provides a function to reload the Sentry SDK:
When closing the SDK the on-demand replay capturing is not restarted.
An initial investigation showed that uninstalling the
SentrySessionReplayIntegration
calls the methodSentrySessionReplay.pause()
which invalidates theCADisplayLink
used as the trigger for creating frames:https://github.com/getsentry/sentry-cocoa/blob/0782001b8903e178a3bb8db34f2f366ce1cc04ab/Sources/Sentry/SentrySessionReplayIntegration.m#L523C9-L527
sentry-cocoa/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift
Lines 108 to 117 in 0782001
When installing the SDK again, there seems to be left-over state and the session replay recorder is not bootstrapped correctly.
When calling
stop()
instead ofpause()
in theSentrySessionReplayIntegration
, the object gets deallocated and discarded, but it is not started again correctly.The text was updated successfully, but these errors were encountered: