sentry-javascript: [Replay] Replay not sending on errors

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/browser

SDK Version

7.24.1

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

<script src="https://browser.sentry-cdn.com/7.24.1/bundle.tracing.min.js" integrity="sha384-xKLOnjJfdV4JM9nuAF86HQTBBQXJRhRYRqSR21KCAENOj3ldIBc10a4oq8wWZ3/R" crossorigin="anonymous"></script>
<script src="https://browser.sentry-cdn.com/7.24.1/captureconsole.min.js" integrity="sha384-yK9cwgbRIq3vYQnne4GeTRvPKHLSFh3Ak8ZD9XU992sLYom9dgYy34D43rFvjpRq" crossorigin="anonymous"></script>
<script src="https://browser.sentry-cdn.com/7.24.1/replay.min.js" integrity="sha384-ifYtT/moOdbKa0RUX6esCLi2AU6bNBHWE13ESYZ4Q2j/RFVx1iuIcYadvhEbGMjF" crossorigin="anonymous"></script>
<script>
  Sentry.init({
    dsn: "DSN",
    environment: "HOSTNAME",
    integrations: [
      new Sentry.BrowserTracing(),
      new Sentry.Integrations.Replay({
        maskAllInputs: false,
      }),
      new Sentry.Integrations.CaptureConsole(
        {
          levels: ['error']
        })
    ],
    sampleRate: 1,
    replaysOnErrorSampleRate: 1.0,
    replaysSessionSampleRate: 1.0,
    tracesSampleRate: 0.25,
  });
</script>

This is not sending a replay with the error. I know it’s not in the UI yet, or at least I’m assuming it isn’t. Just looking at the network tab in firefox.

Expected Result

It would send another request to sentry with the replay when an error occurs.

Actual Result

No replay data is sent when an error occurs. A replay ID is attached to the error/event. But nothing is sent for the replay data. If you set all the sampling to 1 it will send a replay for the transaction at the start but if you trigger an error it won’t send the replay.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (19 by maintainers)

Most upvoted comments

@Lms24 yes now works 😃 Thanks!

We’ve identified the problem and we’re going to make a release on monday with the fix. Thanks for the help everyone!

In the meantime, please use the unminified Replay CDN bundle (replay.js).

Yup seems to be sending with the unminified bundles.

@davidflypei When you’re testing it, do you have replaysSessionSampleRate set to 0? If it is sampled as a session replay, it will continuously record the session and will not react to errors specifically.