getsentry / sentry-javascript

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

[Next.js] replayCanvasIntegration Safari issue #13565

Open slaviczavik opened 1 week ago

slaviczavik commented 1 week ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.27.0

Framework Version

React 18.2.0, Next.js 14.2.3

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
  environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
  release: process.env.NEXT_PUBLIC_SENTRY_RELEASE,
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

  replaysSessionSampleRate: 0.1,
  replaysOnErrorSampleRate: 1.0,

  integrations: [
    Sentry.replayIntegration({
      maskAllText: false,
      maskAllInputs: false,
    }),
    Sentry.replayCanvasIntegration(), // The problem!
  ],
  ignoreErrors: SENTRY_IGNORED_ERRORS,
})

Steps to Reproduce

  1. Open web app in Safari (my version is 17.5).
  2. Open Safari Developer Tools.
  3. Switch to the Network tab (XHR/Fetch).

You can see a snapshot is fetch every single second from this URI: blob:https://domain.tld/UUID.

Expected Result

Same behaviour as in Chrome where no snapshots is fetched.

Actual Result

Image

Lms24 commented 1 week ago

Hey @slaviczavik thanks for writing in! Any chance you could provide a minimal reproduction that shows this behaviour? Would be a great help to debug this! 🙏

Gonna tag @mydea and @billyvg who have more context here. Are you aware of similar issues?

slaviczavik commented 1 week ago

Hey @slaviczavik thanks for writing in! Any chance you could provide a minimal reproduction that shows this behaviour? Would be a great help to debug this! 🙏

Gonna tag @mydea and @billyvg who have more context here. Are you aware of similar issues?

Hi @Lms24! Unfortunately I have no reproduction yet, however the loop occurs on the canvas element where a map is rendered like in this example. Please let me know if it is enough, or if you want I may "fork" the web app simplify it and post it here.