Title: Gatsby build fails when run locally without SENTRY_AUTH_TOKEN · Issue #7852 · getsentry/sentry-javascript · GitHub
Open Graph Title: Gatsby build fails when run locally without SENTRY_AUTH_TOKEN · Issue #7852 · getsentry/sentry-javascript
X Title: Gatsby build fails when run locally without SENTRY_AUTH_TOKEN · Issue #7852 · getsentry/sentry-javascript
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/...
Open Graph 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 th...
X 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 th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/7852
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Gatsby build fails when run locally without SENTRY_AUTH_TOKEN","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### 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.\r\n\r\n@sentry/gatsby\r\n\r\n### SDK Version\r\n\r\n7.47.0\r\n\r\n### Framework Version\r\n\r\ngatsby ^5.8.1, react 18.2.0\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### SDK Setup\r\n\r\n```js\r\nSentry.init({\r\n dsn: 'my_dsn',\r\n release: 'my_release',\r\n environment: 'my_environment',\r\n})\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\nRun `gatsby build` (without setting `SENTRY_AUTH_TOKEN`) on my local machine.\r\n\r\n### Expected Result\r\n\r\nThe site builds, skipping the upload of sitemaps or creation of release (this works fine on my CI).\r\n\r\n### Actual Result\r\n\r\nFails the build with the following error message:\r\n\r\n```\r\nfailed Building production JavaScript and CSS bundles - 25.753s\r\n\r\n ERROR #98123 WEBPACK.BUILD-JAVASCRIPT\r\n\r\nGenerating JavaScript bundles failed\r\n\r\nSentry CLI Plugin: Command failed: /home/adam/Work/optimus/optimusmine.com/node_modules/@sentry/cli/sentry-cli releases new 5ef49904f28dae3baa2d66773a83443f2df58cef\r\nerror: API request failed\r\n caused by: sentry reported an error: Authentication credentials were not provided. (http status: 401)\r\n\r\nAdd --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.\r\nPlease attach the full debug log to all bug reports.\r\n```\r\n\r\nNot 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","author":{"url":"https://github.com/abemedia","@type":"Person","name":"abemedia"},"datePublished":"2023-04-13T20:08:44Z","url":"https://github.com/getsentry/sentry-javascript/issues/7852"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ce28d1f-e540-2fd3-87dc-ce8bb2b26709 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D032:2D47A6:763056:9E7ADD:6B04A64A |
| html-safe-nonce | b304ea0f313a190bd0537565ba88448a72e5b3b326f08e332086181d95f2aaf4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDMyOjJENDdBNjo3NjMwNTY6OUU3QUREOjZCMDRBNjRBIiwidmlzaXRvcl9pZCI6Ijg5OTAwNjA4NzY3MzY1MzgxODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 238b9f57b7ee4b6340be51cf9481e3c36cf1bb0f8ca4b3243ded0ba0bd253336 |
| hovercard-subject-tag | issue:1667061986 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/7852/issue_layout |
| twitter:image | https://opengraph.githubassets.com/183e2b9e5374989f27bd864b3b59339e725e24779b666e759b47fa1bbec47565/getsentry/sentry-javascript/issues/7852 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/183e2b9e5374989f27bd864b3b59339e725e24779b666e759b47fa1bbec47565/getsentry/sentry-javascript/issues/7852 |
| og:image:alt | 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 th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abemedia |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width