sentry-javascript: Source map uploaded on sentry but not applying to error event
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?
SDK Version
“@sentry/angular-ivy”: “^7.54.0”
Framework Version
“@angular/cli”: “~14.2.11”
Link to Sentry event
SDK Setup
Sentry.init({ dsn: “YOUR-DSN-KEY”, release: ‘0.0.0’, integrations: [ new Sentry.BrowserTracing({ tracePropagationTargets: [“*”], routingInstrumentation: Sentry.routingInstrumentation, }), new Sentry.Replay(), ], tracesSampleRate: 1.0, replaysSessionSampleRate: 0.1, replaysOnErrorSampleRate: 1.0, });
Steps to Reproduce
- Create or throw an error from app.
- Open sentry account, Look for an error event in issues.
- Open an event, In that event there will only be minified code even when source maps are uploaded on sentry.
- So it looks like source map files are not applied on occurred error event.
I tried troubleshooting the source map by following this documentation
- [https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/]
- By following above documentation to troubleshoot step by step
-
In first step I run this command
sentry-cli sourcemaps explain c2ad049fd9e448ada7849df94575e019- After running this command I get following result. Fetched data for event: 3fb603333c664f74967757ca25e537ea ✔ Event has release name: 0.0.0 ✔ Event has a valid exception present ✔ Event has a valid stacktrace present ⚠ Exception is already source mapped and first resolved frame points to: > [missing context line]
-
In second step I verified artifacts Are Uploaded
-
Verified source map is building
-
In the next step of verifying if Source Files Contain Debug ID Injection Snippets
- In this step I found e._sentryDebugIds=e._sentryDebugIds||{}
- but After this I did not find
debug_metaproperty in event JSON payload. - As it was suggested, I updated my SDK version but it did not work and I still not getting
debug_metaproperty.
-
- By following above documentation to troubleshoot step by step
Following this, all other troubleshooting steps work but still source map is not applied on sentry event…
this is my github repo link:- [https://github.com/gopal-akkar/sentry-angular.git]
Expected Result
- When error occurs and I open that event in sentry, I want see un-minified code, So I can trace error easily
Actual Result
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 11
- Comments: 17 (8 by maintainers)
Also seeing the same issue with the next js integration - things were working for us historically, and as of the past few weeks we also haven’t seen the issues traced. The source maps are uploaded correctly, but the
sentry-cli sourcemaps explaincommand shows the same issue with[missing context line].I don’t know if all this is related, but I have also noticed that our organization’s frontend errors are not unminified correctly in the last few weeks.
sentry-cli sourcemaps explaingives the same error, but I have verified thatsentry-cli sourcemaps resolve ...yields the correct result I want.Since several people have this problem, I would like to point out that such failure scenarios can also occur for source maps without debug id or linkage via release. #54649
Hi, as I understand it, the original issue was resolved. Hence, I’m going to close the issue.
To everyone who reported other issues with source maps, please make sure you’re on the latest SDK versions and if the error still occurs please open a separate issue. Debugging source maps issues is far too specific to be tracked in one issue, especially given that we’re talking about various frameworks and bundlers in this issue. Thank you.
@gopal-akkar reported an issue with a reproduction. @lforst responded by trying it out and he couldn’t reproduce it. He pointed out that source map resolving won’t work in dev mode (i.e.
ng servefor regular Angular projects) and how source map generation needs to be enabled for prod builds. Given that we didn’t hear back from OP, I considered this issue resolved. If this isn’t the case, Gopal, please feel free to let us know and I’m happy to reopen this issue so that we can investigate this further.Now does that mean that all source maps issues are resolved? No, definitely not. But for example, NextJS source maps upload works differently than Angular+Webpack, so it doesn’t make sense to discuss this in the same issue.
If you’re still experiencing problems with other frameworks or bundlers, please open another issue.
Same issue but with Laravel & Vite.
Config: