-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: Gracefully degrade if sessionStorage isn't available #8392
Comments
It seems in some environments `sessionStorage` my be unset to `null` or similar. To be extra careful, we can guard for existence as well there. Fixes #8392
It seems in some environments `sessionStorage` my be unset to `null` or similar. To be extra careful, we can guard for existence as well there. Fixes #8392
Wow that was fast! Thanks Francesco! |
Just noticed https://sentry.sentry.io/issues/4286420853/?project=1267915&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=6 this can still happen - we should probably try-catch this! |
It still happens in our next.js app when it is in an iframe
|
I also have this issue when sentry is in a sandboxed iframe. |
I opened a fix to fully solve this here: #8547 - should go out in the next version! |
Apparently accessing sessionStorage in an iframe with certain permissions can result in a throw, so we try-catch this to ensure we do not produce any errors. Closes #8392
Awesome, thank you @mydea ! |
This is out in 7.59.2 now! |
Great, thank you! |
The vite plugin should use it's own Sentry versions for internal stuff only. Is this interfering with your app somehow? |
Sorry, my bad. I just recalled I'm using script tag to add sentry to the page. |
Reported by a customer that runs their app on several different embedded browsers such as email apps
We might need to gate access to
sessionStorage
and if we can't access this at other spots we need to find a way to gracefully degrade the SDK. If Replay cant' work, we should disable recording, but let the other functionalies of the SDK (e.g: error reporting) continue to functionThe text was updated successfully, but these errors were encountered: