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
fix(replays): Handle non-canvas elements and toDataURL errors in canvas replayer (#91725)
👋 Hi there! This PR was automatically generated by Autofix 🤖
Fixes
[JAVASCRIPT-2SKA](https://sentry.io/organizations/sentry/issues/5213327583/).
The issue was that: Canvas replay fails due to
`replayer.getMirror().getNode` returning a non-canvas element, bypassed
by a type assertion, causing `toDataURL` to error.
- Added a check to ensure that the node being cloned is a canvas
element.
- Added a try-catch block around the `toDataURL` call to handle
potential errors.
- Added a check to ensure that the target is a canvas element before
calling `toDataURL`.
- Changed `Sentry.captureException` to `Sentry.captureMessage` with
level warning for canvas node errors.
If you have any questions or feedback for the Sentry team about this
fix, please email [autofix@sentry.io](mailto:autofix@sentry.io) with the
Run ID: 34843.
---------
Co-authored-by: sentry-autofix[bot] <157164994+sentry-autofix[bot]@users.noreply.github.com>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Co-authored-by: Billy Vong <billyvg@users.noreply.github.com>
0 commit comments