nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
501 stars 114 forks source link

Cannot use "Replay" client integration #676

Closed wanderowski closed 2 months ago

wanderowski commented 2 months ago

Version

@nuxtjs/sentry: 8.0.7 nuxt: 2.15.7

Sentry configuration

{
    dsn:            process.env.SENTRY_DSN,
    publishRelease: {
        org:          process.env.SENTRY_ORG,
        project:      process.env.SENTRY_PROJECT_NAME,
        url:          process.env.SENTRY_URL,
        authToken:    process.env.SENTRY_AUTH_TOKEN,
        disable:      Boolean(Number(process.env.SENTRY_IS_DEV)),
        errorHandler: (err: Error) => {
            console.error(err);
        },
    },
    sourceMapStyle:     'source-map',
    clientIntegrations: {
        Replay:         {},
        CaptureConsole: {
            levels: ['error', 'warn'],
        },
        GlobalHandlers: {
            onerror:              true,
            onunhandledrejection: true,
        },
    },
    serverIntegrations: {
        CaptureConsole: {
            levels: ['error', 'warn'],
        },
    },
    tracing: {
        tracesSampleRate: 0.5,
        browserTracing:   {},
        vueOptions:       {
            trackComponents: true,
        },
        vueRouterInstrumentationOptions: {
            routeLabel: 'name',
        },
    },
};

Steps to reproduce

What is Expected?

What is actually happening?

wanderowski commented 2 months ago

Hi! We are trying to use session replays in our project, but faced this error. I updated my sentry-module to the latest version, but still get this message in console. I tried to uninstall node_modules, updating other packages - no effect. I also tried to look for this issue in closed issues, but did not find one. I would be very thankful for your earliest reply!

rchl commented 2 months ago

It looks like you are not using the version of the module that you've stated you are. Probably something older. What does npm why @nuxtjs/sentry say?

rchl commented 2 months ago

Also note that you want to add some additional configuration: https://sentry.nuxtjs.org/guide/session-replay

wanderowski commented 2 months ago

@rchl thank you for your reply! Here is the result of the mentioned npm command:

 @nuxtjs/sentry@"8.0.7" from @MY_PROJECT_NAME@1.0.0

Also note that you want to add some additional configuration: https://sentry.nuxtjs.org/guide/session-replay

Yeah, I tried to add some configs, but still get the error. So, as a starting point, I want to launch Replay without any configurations at least.

P.S. I also tried to clean cache of yarn using yarn cache clean --all

rchl commented 2 months ago

Try deleting whole node_modules and reinstalling dependencies.

wanderowski commented 2 months ago

Try deleting whole node_modules and reinstalling dependencies.

Tried. No effect, unfortunately.

rchl commented 2 months ago

Sounds like you might have to work on providing a reproduction repository.

wanderowski commented 2 months ago

Sounds like you might have to work on providing a reproduction repository.

Ok, I'll come back with the link in a couple of days.

wanderowski commented 2 months ago

Hi! We decided to not use replays at this point of time, since we are planning to migrate to Nuxt 3 soon. The problem is still present and we don't know what causes the wrong dependency installation. We did not try to reproduce it in other repo, so I can just assume that it is related to our infrastructure. Thank you for your time and replies!