getsentry / sentry-javascript

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

New Session Replay not Starting after Redirect Back to App #9776

Open thinkocapo opened 7 months ago

thinkocapo commented 7 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

7.85.0

Framework Version

No Framework. It's all Pageloads, no Navigations, no SPA.

Link to Sentry event

https://vodacom.sentry.io/replays/0ef400f4c3794a6bb805d6e421864a81/?environment=production&project=4506177346076672&query=&referrer=%2Freplays%2F&statsPeriod=1h&t_main=trace&yAxis=count%28%29

SDK Setup

    window.Sentry && Sentry.onLoad(function () {
        Sentry.init({
            environment: "production",
            tracesSampleRate: 1.0,
            debug: "true",
            integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()]
        });
    });

Steps to Reproduce

  1. User goes through the app
  2. User gets redirected to a Payment page that is not part of the app, therefore sentry sdk is not installed on this Payment page. But it loads in the same tab. No new tabs opened.
  3. User makes payment
  4. User is redirected back to the app, in the same tab, but to a new page in the app.
  5. No new session replay is started for the page post-redirection. The previous session replay stops at the final page before they navigate away to the payment screen via redirection.

User saying the Transaction for the post-redirection page is not being recorded either.

Expected Result

1 Continuous Session Replay for both pre-redirection and post-redirection

'OR'

2 Session Replays. 1 for pre-redirection and 1 for post-redirection

Actual Result

see link to the Replay and message me for the names of the transactions they're expecting to see as transactions and a Replay for

mydea commented 7 months ago

Hey, thanks for writing in. I guess this is the same issue as also described here: https://github.com/getsentry/sentry-javascript/issues/9301 🤔

Is there by chance a public page where I can reproduce this? That would help a lot!