Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replay fails to start recording when using start() #11983

Closed
billyvg opened this issue May 10, 2024 · 3 comments · Fixed by #12001
Closed

Replay fails to start recording when using start() #11983

billyvg opened this issue May 10, 2024 · 3 comments · Fixed by #12001
Assignees

Comments

@billyvg
Copy link
Member

billyvg commented May 10, 2024

Replays will fail to start recording when using start() specifically when manually recording and after the user has been idle for a long period of time. We need to reset the user activity state when we call start(), otherwise the session will be [incorrectly] considered to be idle and unable to send any replay events.

@mydea
Copy link
Member

mydea commented May 13, 2024

So you mean, a session is ongoing, then you call start() before the session has been invalidated? 🤔

But this is overall not good, in this scenario you should always call replay.isEnabled() and that would also return true in this scenario, wouldn't it? In which case you def. should never call start()!

I guess what we could do is check for session expiration in isEnabled() 🤔 that would invalidate the session if it is disabled = but it would just create a new session and not stop it, so you still would not be able to call start() again in this case!

@billyvg billyvg self-assigned this May 13, 2024
@billyvg
Copy link
Member Author

billyvg commented May 13, 2024

No this is before a session exists (e.g. manual recording).

mydea pushed a commit that referenced this issue May 13, 2024
Replays will fail to start recording when using `start()` specifically
when manually recording and after the user has been idle for a long
period of time. We need to reset the user activity state when we call
`start()`, otherwise the session will be [incorrectly] considered to be
idle and unable to send any replay events.

Closes #11983
billyvg added a commit that referenced this issue May 13, 2024
Replays will fail to start recording when using `start()` specifically
when manually recording and after the user has been idle for a long
period of time. We need to reset the user activity state when we call
`start()`, otherwise the session will be [incorrectly] considered to be
idle and unable to send any replay events.

Closes #11983
@billyvg
Copy link
Member Author

billyvg commented May 13, 2024

Backport for v7 here

andreiborza pushed a commit that referenced this issue May 16, 2024
Replays will fail to start recording when using `start()` specifically
when manually recording and after the user has been idle for a long
period of time. We need to reset the user activity state when we call
`start()`, otherwise the session will be [incorrectly] considered to be
idle and unable to send any replay events.

Closes #11983
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants