Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/angular-ivy
SDK Version
7.61.0
Framework Version
Angular 15.1.0
Link to Sentry event
SDK Setup
Sentry.init({
dsn: "DSN_HERE",
integrations: [
new Sentry.BrowserTracing({
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
routingInstrumentation: Sentry.routingInstrumentation,
}),
new Sentry.Replay(),
],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
release: "angular@1.5.2",
});
Steps to Reproduce
- sentry-cli version is 2.20.3
- ng build
- sentry-cli sourcemaps inject ./dist
- sentry-cli sourcemaps upload --release=angular@1.5.2 ./dist/angular-tour-of-heroes --org dragonfruit-dev -p javascript-angular
Expected Result
The source maps are uploaded to Sentry and correctly matched to new events.
Actual Result
After running the inject command, I noticed that there is a ;
being added into the "mappings" part of the .map files.
This breaks the source map in the browser, as an error's position seems to be wrong
Additionally, in the stack trace section in the resulting error in Sentry, we see repeating positions and we don't get readable code:
https://dragonfruit-dev.sentry.io/issues/4364427077/?query=is%3Aunresolved&referrer=issue-stream&stream_index=0
A temporary fix is to manually remove the ;
from all the .map files and after injecting the debug IDs and before uploading the source maps to Sentry. I found that this gave me the correct stack traces:
https://dragonfruit-dev.sentry.io/issues/4364645800/?query=is%3Aunresolved&referrer=issue-stream&stream_index=0
Metadata
Metadata
Assignees
Type
Projects
Status