Comments (7)
Thanks @AbhiPrasad & @lforst, it sounds like disabling the entire plugin would not be in our best interest.
I confirmed adding
release: {
create: false,
}
resolves the aforementioned error. We could probably also make the auth token escape hatch work. We certainly don't need to have the token set locally, but would have to tweak our CI/CD pipeline to make sure it's not set when doing something like deploying a PR. When I tested it locally, I noticed it does add some noise to the output though (warning numerous times about the auth token not being provided). Interestingly enough, it emits these warnings even when the options for disabling source maps and releases are passed, which seems unnecessary since the intention is to not perform those tasks anyway. Think it's worth logging an issue for this?
[@sentry/nextjs - Node.js] Warning: No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
[@sentry/nextjs - Node.js] Warning: No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
In any case, I have a path forward so I think we can close this issue out. Thanks again for your help!
from sentry-javascript.
Interestingly enough, it emits these warnings even when the options for disabling source maps and releases are passed, which seems unnecessary since the intention is to not perform those tasks anyway.
That is a very fair point. We will fix this!
from sentry-javascript.
You should be able to disable sourcemaps via sourcemaps.disable
.
export default withSentryConfig(nextConfig, {
sourcemaps: {
disable: true,
},
});
Does this suffice for what you are looking for?
from sentry-javascript.
You should be able to disable sourcemaps via
sourcemaps.disable
.export default withSentryConfig(nextConfig, { sourcemaps: { disable: true, }, });Does this suffice for what you are looking for?
Hi @AbhiPrasad, this is what I first tried, but when I run next build
on my local machine it fails with:
unhandledRejection Error: Command failed: /Users/sean.parmelee/Projects/voltron-app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli-darwin/bin/sentry-cli releases new BADIDEA5
error: API request failed
caused by: sentry reported an error: Invalid token (http status: 401)
So it seems the plugin still tries to create a release in this case and we don't want that to happen unless it's part of our CI/CD flow.
from sentry-javascript.
Ah gotcha.
you can do
export default withSentryConfig(nextConfig, {
release: {
create: false,
},
});
to prevent the release from being created. @lforst does it makes sense for us to introduce an option that just turns everything off entirely?
from sentry-javascript.
@AbhiPrasad Yeah I think this is not asking for too much. We could add something like disableSentryWebpackPlugin
, however, that will also disable things like the react component annotation. This changes my thought process around this a bit. Generally speaking, if authToken
is not defined, and there is also no SENTRY_AUTH_TOKEN
environment variable present, the plugin will not attempt to do anything in Sentry. Is it possible that this is enough of an escape hatch? I think something like disableSentryWebpackPlugin
might be confusing. Sorry for the stream of consciousness lol
from sentry-javascript.
I guess I missed this earlier because I was getting a separate build error (related to the @sentry/fullstory
plugin), but I found out I also need to set release.finalize = false
because it was trying to finalize the release as well.
Starting to wonder if it's better to just go the route of making sure the auth token isn't set (and live with the warnings) so it doesn't end up adding the releaseManagementPlugin
🤔
from sentry-javascript.
Related Issues (20)
- Ember Canary ember-release Test Failed HOT 2
- nextjs-14 (canary) Test Failed
- nextjs-app-dir (canary) Test Failed HOT 1
- Astro Integration throws error after upgrade to v8.3.0 HOT 8
- Add support for angular v18 HOT 1
- Mongo instrumentation doesn't work with promises HOT 4
- Replay no longer reexported by @sentry/nextjs after upgrade to v8 HOT 1
- Release v8 for loader script HOT 3
- Create versioned global sentry carrier object
- Astro integration follow the guide will get a error ENOENT: no such file or directory, open '/Users/xxx/astro-project/node_modules/@sentry/astro/esm/@sentry/node' HOT 1
- nextjs-15 (latest) Test Failed
- nextjs-14 (latest) Test Failed HOT 3
- Add React 19 peer dep HOT 2
- Sentry.feedbackIntegration TypeScript autocomplete not working
- Implement `metrics.timing()`
- The `failure_issue_threshold` does not take effect HOT 4
- Vercel integration is causing runtime errors in undici integration HOT 9
- Client-side sourceMappingURL is being erased despite of settings HOT 4
- Distribution tracing is not working in V8.3.0 in Javascript browser CDN bundle HOT 3
- Regression: Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available when using vercel/pkg HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-javascript.