-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to configure auth for sentry-cli on sentry for nextjs #5061
Comments
Is your issue possibly related or same as this issue we are working on at the moment? #3865 |
someone from the team can have a look at it, I don't know for sure, but I would hope if removing cli from build this would become a non-top Could you try out the beta release for V7 and let me know if that works, we want to make sure we get the right fix out |
@smeubank Same error with 7.0 beta 0 |
Is moving |
Hi, this is a known issue we want to fix very very soon. Blocking people's For now, please set the following environment variables in your CI:
More information on those settings: https://docs.sentry.io/product/cli/configuration/#to-authenticate-manually |
@lforst Thanks for your attention to this. The values you mentioned were already set in my Vercel configurations by the Sentry Vercel integration button. But when I reviewed the values again, I found that the |
@smeubank as far as i can tell. yes! |
Perfect for me too ! Thanks @lforst :) |
Have you made any progress for this? |
@Manonicu sadly no. Our priorities currently lie somewhere else but we have a bigger internal meeting coming up with all of the SDK teams to find a solution and behavior that will determine how this works in the future. We're tracking the issue for JS SDKs here: getsentry/sentry-webpack-plugin#379 Btw, PRs over at https://github.com/getsentry/sentry-webpack-plugin are always welcome! Helps us get this out the door faster! |
I can't find a way to be able to store my auth token in a secret manager like Google Secret Manager and then pull it down and set it when the application starts up. This is frustrating because we should check this token into VCS and setting it in the environment variable for me (I'm using docker to containerize my app) is a less sustainable pattern. Is there any way to set this token when calling |
@abineetds No, but it is also not necessary to pass this token to Can you try using these options to disable the webpack plugin when the application is started inside the container? You should not use these options when building your Docker image because that's probably the moment you want to upload the source maps. |
@lforst Thank you! I figured out a way to set the environment variable on the build step! |
@abineetds Awesome. If you have any feedback on how we could have made this whole thing smoother for you, let us know! |
Hey, i'm currently unable to figure it out. Mind sharing how you did it? |
For anyone who got this far, here's the solution that worked for us:
|
Hey there - any progress on this? Why is an auth token even needed - surely just a DSN should be enough? I'm working on a Next.js project which is routinely built:
Having to provide an auth token for every developer, CI job and deployed environment seems like a massive headache when our backend just authorises with a DSN that we can commit to VCS. Is there no way we can just pass in some token that we can commit, or enable Sentry only on deployed environments so it doesn't block builds in local & CI? |
For those viewing this issue after me: I personally worked around it by only including Sentry conditionally in const nextConfig = {
// Original Next.js config
};
const { withSentryConfig } = require("@sentry/nextjs");
const sentryExports = {
...nextConfig,
sentry {
// Sentry config
}
};
const sentryWebpackPluginOptions = {
// Sentry Webpack config
};
if (process.env.ENABLE_SENTRY) console.log("Building frontend with Sentry enabled...");
module.exports = process.env.ENABLE_SENTRY
? withSentryConfig(sentryExports, sentryWebpackPluginOptions)
: nextConfig; This effectively disables Sentry unless the |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
6.19.6
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Expected Result
Build should be OK without any auth token for sentry-cli ( why sentry-cli is included in sentry nextjs ? )
Actual Result
The text was updated successfully, but these errors were encountered: