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

[Next.js] replayCanvasIntegration Safari issue #13565

Open
3 tasks done
slaviczavik opened this issue Sep 3, 2024 · 3 comments
Open
3 tasks done

[Next.js] replayCanvasIntegration Safari issue #13565

slaviczavik opened this issue Sep 3, 2024 · 3 comments
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Package: replay Issues related to the Sentry Replay SDK

Comments

@slaviczavik
Copy link

slaviczavik commented Sep 3, 2024

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,
})
  • The problem is with the replayCanvasIntegration().
  • The problem was noticed within 7.48.0 version, I've tried to update to the latest but the issue stays.

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

@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Sep 3, 2024
@Lms24
Copy link
Member

Lms24 commented Sep 3, 2024

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?

@Lms24 Lms24 added the Package: replay Issues related to the Sentry Replay SDK label Sep 3, 2024
@slaviczavik
Copy link
Author

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.

@billyvg
Copy link
Member

billyvg commented Sep 16, 2024

I narrowed this down to converting a blob to ArrayBuffer, it looks like this is Safari-related behavior and not directly related to Session Replay. I monitored the memory usage of Safari while recording a replay w/ canvas and it does not appear to be leaking memory.

@slaviczavik Are you experiencing any specific impacts from this behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Package: replay Issues related to the Sentry Replay SDK
Projects
Status: No status
Development

No branches or pull requests

3 participants