getsentry / sentry-webpack-plugin

Repo moved to https://github.com/getsentry/sentry-javascript-bundler-plugins. Please open any issues/PRs there.
MIT License
662 stars 116 forks source link

source-map-support #340

Closed unnsteinngardars closed 2 years ago

unnsteinngardars commented 2 years ago

Hello, I am trying to apply source maps to my Sentry project without success, I have followed the docs very thoroughly a few times and nothing works, the source maps are uploaded but they are not used when an error is thrown.

I saw a banner saying the following:

source-map-support To rely on Sentry's source map resolution, your code cannot use the source-map-support package. That package overwrites the captured stack trace in a way that prevents our processors from correctly parsing it.

And it looks like the only plausible culprit in my case, but when investigating the package.lock.json I could trace it being used to webpack and jest. And I am curious why there is a tutorial for generating and updating source maps with webpack when webpack uses a package that breaks this.

Please correct me if I am wrong.

kamilogorek commented 2 years ago

As long as source-map-support is not in your codebase, it won't override the produced stacktrace during runtime. What you are referring to, is code used during the tools (webpack/jest) runtime, not your own code runtime, thus it has no effect on the outcome.

There has to be something else wrong going on with your setup then. Please come to our Discord and provide more details about your setup there - https://discord.gg/Ww9hbqr

unnsteinngardars commented 2 years ago

As long as source-map-support is not in your codebase, it won't override the produced stacktrace during runtime. What you are referring to, is code used during the tools (webpack/jest) runtime, not your own code runtime, thus it has no effect on the outcome.

There has to be something else wrong going on with your setup then. Please come to our Discord and provide more details about your setup there - https://discord.gg/Ww9hbqr

I wrote in the javascript channel of the Sentry community, I tagged you also in a thread on the post named "Sourcemaps not working for JS project"