Closed randomailer closed 7 months ago
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 (https://github.com/getsentry/sentry-javascript/pull/9394), so I wonder if that resulted in this or if this is something else.
@mydea, yes with 7.75.0 everything works as expected. I also tried 7.76.0 and it started to show that error
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!
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).
You didn't share the production build error yet. Can you do so? Thanks!
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.
This looks suspiciously like https://github.com/getsentry/sentry-electron/issues/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 https://github.com/getsentry/sentry-electron/issues/805 may help the maintainers figuring out what is going on.
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 🥀
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
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
If I remove from sentry initialisation
Sentry.Replay
integration then it works againExpected Result
Sentry works well with
Sentry.Replay
Actual Result
Sentry doesn't work with
Sentry.Replay