sentry-javascript: Source map uploaded on sentry but not applying to error event

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/angular

SDK Version

@sentry/angular-ivy”: “^7.54.0”

Framework Version

@angular/cli”: “~14.2.11”

Link to Sentry event

https://testorg-kh.sentry.io/issues/4236064028/?query=is%3Aunresolved&referrer=issue-stream&stream_index=0

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

  1. Create or throw an error from app.
  2. Open sentry account, Look for an error event in issues.
  3. Open an event, In that event there will only be minified code even when source maps are uploaded on sentry.
  4. 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
      1. 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]
      2. In second step I verified artifacts Are Uploaded

      3. Verified source map is building

      4. 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 finddebug_meta property in event JSON payload.
        • As it was suggested, I updated my SDK version but it did not work and I still not getting debug_meta property.

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

  1. When error occurs and I open that event in sentry, I want see un-minified code, So I can trace error easily

Actual Result

Screenshot 2023-06-08 at 6 49 29 PM

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 11
  • Comments: 17 (8 by maintainers)

Most upvoted comments

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 explain command 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 explain gives the same error, but I have verified that sentry-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.

how was it resolved?

@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 serve for 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:

Sentry.init({
    dsn: import.meta.env.VITE_SENTRY_DSN_PUBLIC,
    replaysSessionSampleRate: 0,
    replaysOnErrorSampleRate: 1.0,
    integrations: [
        new Sentry.Replay({
            maskAllText: true,
            blockAllMedia: true,
        }),
    ],
});