Getting sourcemaps / releases working
See original GitHub issueVersion
Reproduction link
https://github.com/cdnjs/static-website
Steps to reproduce
I have the following config in nuxt.config.js
:
sentry: {
dsn: sentryDsn,
publishRelease: 'SENTRY_AUTH_TOKEN' in process.env,
sourceMapStyle: 'hidden-source-map',
},
sentryDsn
is a valid DSN url imported from another config file.
The SENTRY_AUTH_TOKEN
environment variable is set during build & start.
.sentryclirc
has our org/project set correctly:
[defaults]
org = cloudflare
project = cdnjs-website
When nuxt build
is run, it creates the release correctly on Sentry as far as I can tell, using the latest commit hash.
However, when errors are then generated in the app (after nuxt start
), they appear in Sentry without any attached release and don’t appear to be using the source maps.
What is expected ?
Maybe I’m configuring something wrong, but I would expect errors generated both server-side and client-side to be correctly attached to the release generated during nuxt build
and to use the source maps so that the stack trace is useful in Sentry.
What is actually happening?
Issues have no attached release and don’t use the source maps, resulting in the stack trace being the raw bundled files which is unusable.
<div align="right">This bug report is available on Nuxt community (#c104)</div>Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top GitHub Comments
Just a note that while this fix catches the newly-added
sentry-cli
usage, thesentry-webpack-plugin
would still crash when release is not set. So I guess you have to unsetpublishRelease
also when you don’t have the version. Maybe the module should do it itself (with an extra warning printed)…In v4.3.2 the
publishRelease
will be ignored (with a warning printed) whenrelease
is not defined.