-
Hi, I'm trying to upload source maps as part of an Angular application build but for some reason, the stack traces still look mangled. I don't know what I'm doing wrong to be honest. I suspect this is because the paths look wrong here: The file in question is called 133.bc4ebc49840176eb.js.map, but the source map file path is just the debug ID it seems. I guess it can't find the file because the paths don't match. But I don't know where this name comes from, when I run the build locally these paths are nowhere to be found. I have enabled source maps for the production build in my import { sentryWebpackPlugin } from '@sentry/webpack-plugin';
import { CustomWebpackBrowserSchema, TargetOptions } from '@angular-builders/custom-webpack';
import * as webpack from 'webpack';
import * as dotenv from 'dotenv';
import { version } from 'src/version.json';
import * as process from 'node:process';
// Load .env file
dotenv.config();
export default (
config: webpack.Configuration,
_options: CustomWebpackBrowserSchema,
targetOptions: TargetOptions,
): void => {
// Upload source maps to Sentry on production builds
if (targetOptions.configuration === 'production' && process.env['SENTRY_AUTH_TOKEN']) {
config.devtool = 'source-map';
config.plugins!.push(
sentryWebpackPlugin({
url: '[redacted]',
org: '[redacted]',
project: '[redacted]',
authToken: process.env['SENTRY_AUTH_TOKEN'],
release: {
name: version,
},
debug: true,
sourcemaps: {
filesToDeleteAfterUpload: './dist/**/*.map',
},
}),
);
}
}; The generated JS files have the Does anyone have a clue what I'm missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Can you share a link to the event in question? |
Beta Was this translation helpful? Give feedback.
-
I'm seeing something similar with 8.40.0 of the nextjs package on Vercel. In the deployment build:
In Sentry on an error:
In Sentry the error refers to path: In the production build source, this is at the top of that file, as per the sourcemap troubleshooting page: !function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}
, t = (new e.Error).stack;
t && (e._sentryDebugIds = e._sentryDebugIds || {},
e._sentryDebugIds[t] = "e783f4c8-ac7e-444a-9936-c08fc6573090",
e._sentryDebugIdIdentifier = "sentry-dbid-e783f4c8-ac7e-444a-9936-c08fc6573090")
} catch (e) {}
}(), So the debug ID matches but it still can't find it. Here's the error: https://team-reflex.sentry.io/share/issue/de418fd6339d4805be1fabe24ed16aa6/ Configs can be found here: |
Beta Was this translation helpful? Give feedback.
If that is the case I recommend checking the logs of the
symbolicator
service of your self hosted instance.