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

Problem with updating @sentry/vue #10048

Closed
3 tasks done
randomailer opened this issue Jan 4, 2024 · 8 comments
Closed
3 tasks done

Problem with updating @sentry/vue #10048

randomailer opened this issue Jan 4, 2024 · 8 comments

Comments

@randomailer
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/vue

SDK Version

7.91.0

Framework Version

vue@2.6.6

Link to Sentry event

No response

SDK Setup

Sentry.init({
    Vue,
    dsn: sentryConfig.dsn,
    environment: sentryConfig.env,
    integrations: [
      new Sentry.BrowserTracing({
        routingInstrumentation: Sentry.vueRouterInstrumentation(router),
        tracingOrigins: sentryConfig.tracingOrigins
          ? sentryConfig.tracingOrigins.split(',').filter((a) => a).map(a => new RegExp(a))
          : []
      }),
      new Sentry.Replay()
    ],
    release: packageJson.version,
    tracesSampleRate: 0.8,
    // Capture Replay for 10% of all sessions,
    // plus for 100% of sessions with an error
    replaysSessionSampleRate: 0.08,
    replaysOnErrorSampleRate: 1.0
  })

Steps to Reproduce

I have updated @sentry/vue dependency from version 7.61.0 to 7.91.0 (latest) and start to seeing this error
image

If I remove from sentry initialisation Sentry.Replay integration then it works again

Expected Result

Sentry works well with Sentry.Replay

Actual Result

Sentry doesn't work with Sentry.Replay

@mydea
Copy link
Member

mydea commented Jan 4, 2024

Hmm, very weird... could you try updating to 7.75.0 and see if that works? This is before the last change we did to that file (#9394), so I wonder if that resulted in this or if this is something else.

@randomailer
Copy link
Author

@mydea, yes with 7.75.0 everything works as expected. I also tried 7.76.0 and it started to show that error

@lforst
Copy link
Member

lforst commented Jan 4, 2024

I just checked our generated files for 7.76.0 and I don't see any syntax errors: https://unpkg.com/browse/@sentry/utils@7.76.0/esm/isBrowser.js

Can you share what webpack generated for your build? I suspect that you have a buggy transpiler of some sort. Thanks!

@randomailer
Copy link
Author

hmm, I don't know how to share it because first of all I tried to build a production build and it fails. If I build dev build it will provide chunk file which is completely wrapped by webpack (so it is unreadable).

Second thing, there is no way to update webpack because I'm using vue-cli (at least for now).

@lforst
Copy link
Member

lforst commented Jan 4, 2024

You didn't share the production build error yet. Can you do so? Thanks!

@randomailer
Copy link
Author

 ERROR  Failed to compile with 1 error                               12:50:23 PM

 error  in ./node_modules/@sentry/replay/esm/index.js + 2 modules

Unexpected token (16:175)
|   return (
|     // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|     __WEBPACK_MODULE_REFERENCE__5_5b22474c4f42414c5f4f424a225d_asiSafe1__._ ).process !== undefined && __WEBPACK_MODULE_REFERENCE__5_5b22474c4f42414c5f4f424a225d_asiSafe1__._ ).process ).type === 'renderer'
|   );
| }
while analyzing module /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/@sentry/utils/esm/isBrowser.js for concatenation

 ERROR  Error: Build failed with errors.
Error: Build failed with errors.
    at /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
    at /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/webpack.js:148:8
    at /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/HookWebpackError.js:68:3
    at Hook.eval [as callAsync] (eval at create (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.shutdown (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/Cache.js:150:23)
    at /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/Compiler.js:1228:15
    at Hook.eval [as callAsync] (eval at create (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.close (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/Compiler.js:1221:23)
    at /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/webpack.js:147:16
    at finalCallback (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/Compiler.js:441:32)
    at /Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/Compiler.js:458:13
    at Hook.eval [as callAsync] (eval at create (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/tapable/lib/Hook.js:18:14)
    at onCompiled (/Users/titovvalentin/projects/bc-standalone-2-review/node_modules/webpack/lib/Compiler.js:456:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@lforst
Copy link
Member

lforst commented Jan 4, 2024

This looks suspiciously like getsentry/sentry-electron#805.

I firmly believe this is not an issue within our SDK but rather Webpack itself. Would you mind opening an issue over at https://github.com/webpack/webpack. Referencing this issue and getsentry/sentry-electron#805 may help the maintainers figuring out what is going on.

@getsantry
Copy link

getsantry bot commented Mar 6, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Mar 6, 2024
@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants