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? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js
) in your SDK setup.
@sentry/nextjs
SDK Version
7.42.0
Framework Version
Next.js 12.3.2
Link to Sentry event
https://grid.sentry.io/issues/3671197832/events/004e5ad1ed91484f92e601c6c5f13b83/?project=1871088
SDK Setup
Client config
Sentry.init({
enabled: isEnabled,
dsn: SENTRY_DSN,
environment: SENTRY_ENV,
release: BUILD_ID,
ignoreErrors,
beforeSend: event => {
const { type, title, contexts } = event;
if (type === 'error' &&
/^(?:iPhone|Mac|iPad)$/.test(contexts?.device?.family || '') &&
(
/^TypeError: (?:cancelled|geannuleerd|cancelado|annulleret|avbrutt|avbruten|Abgebrochen)$/i.test(title || '')
)) {
return null;
}
integrateWithFullstory(event);
return event;
},
integrations: [
new Integrations.BrowserTracing({
tracingOrigins: [ getApiHost() ],
beforeNavigate: context => {
const dynamicRouteName = mapSlugToRoute(window.location.pathname);
if (dynamicRouteName) {
return {
...context, name: dynamicRouteName,
};
}
return context;
},
}),
]
.filter(Boolean),
tracesSampler: samplingRate,
});
Server config
import * as Sentry from '@sentry/nextjs';
Sentry.init({
enabled: process.env.NODE_ENV === 'production',
environment: SENTRY_ENV,
dsn: SENTRY_DSN,
release: BUILD_ID,
tracesSampleRate: 0,
});
Steps to Reproduce
We recently updated the following sentry packages from version 7.26 to 7.42:
- @sentry/nextjs
- @sentry/tracing
- @sentry/utils
We have a Next.js application that has an asset prefix defined as /_client
The sourcemaps are uploaded to Sentry at build time from CircleCI. The source maps are not included in the docker image that we then later deploy.
Expected Result
Stack traces show original, unminified JavaScript/TypeScript code.
Actual Result
Stack traces show minified code.
Using the sentry-cli
tool to investigate, it appears as if the assetPrefix is causing a mismatch.
We have downgraded back to 7.26 and can verify that source maps are working again after doing so.