hiroshinishio / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
0 stars 0 forks source link

Events can be added to buffer despite the session being expired #9

Open hiroshinishio opened 3 weeks ago

hiroshinishio commented 3 weeks ago

~Still investigating, but we are getting event buffer issues because expired sessions are not properly ending the session.~ handleException is causing a possible infinite loop of sorts for expired sessions. it eventually ends up calling addEvent() which only checks if replay is paused or ended and not if session is valid. This causes a buildup in the buffer.

e.g. user idles on the page and replay continues to try to flush after the session has ended. Session is not ending properly so buffer continues to grow in size and continues to flush.

This also causes a replay with canvas recordings because resets will cause a new web worker to initialize leading to browser crashes (Closes: https://github.com/getsentry/sentry-javascript/issues/13743)

gitauto-ai[bot] commented 3 weeks ago

Click the checkbox below to generate a PR!

@hiroshinishio, You have 5 requests left in this cycle which refreshes on 2024-11-04 02:56:25+00:00. If you have any questions or concerns, please contact us at info@gitauto.ai.

gitauto-ai[bot] commented 3 weeks ago

Sorry, we have an error. Please try again.

Have feedback or need help? Feel free to email info@gitauto.ai.