- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.7k
Closed
Labels
Package: gatsbyIssues related to the Sentry Gatsby SDKIssues related to the Sentry Gatsby SDK
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/gatsby
SDK Version
7.47.0
Framework Version
gatsby ^5.8.1, react 18.2.0
Link to Sentry event
No response
SDK Setup
Sentry.init({
  dsn: 'my_dsn',
  release: 'my_release',
  environment: 'my_environment',
})Steps to Reproduce
Run gatsby build (without setting SENTRY_AUTH_TOKEN) on my local machine.
Expected Result
The site builds, skipping the upload of sitemaps or creation of release (this works fine on my CI).
Actual Result
Fails the build with the following error message:
failed Building production JavaScript and CSS bundles - 25.753s
 ERROR #98123  WEBPACK.BUILD-JAVASCRIPT
Generating JavaScript bundles failed
Sentry CLI Plugin: Command failed: /home/adam/Work/optimus/optimusmine.com/node_modules/@sentry/cli/sentry-cli releases new 5ef49904f28dae3baa2d66773a83443f2df58cef
error: API request failed
  caused by: sentry reported an error: Authentication credentials were not provided. (http status: 401)
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
Not sure why this is happening locally but not on GitHub Actions but a simple fix might be to handle that error in https://github.com/getsentry/sentry-javascript/blob/develop/packages/gatsby/gatsby-node.js#L48-L54
Metadata
Metadata
Assignees
Labels
Package: gatsbyIssues related to the Sentry Gatsby SDKIssues related to the Sentry Gatsby SDK