Title: @sentry/nuxt breaks Nuxt context for ~1% of requests · Issue #15433 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/nuxt breaks Nuxt context for ~1% of requests · Issue #15433 · getsentry/sentry-javascript
X Title: @sentry/nuxt breaks Nuxt context for ~1% of requests · Issue #15433 · 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/15433
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/nuxt breaks Nuxt context for ~1% of requests","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/nuxt\n\n### SDK Version\n\n9.1.0\n\n### Framework Version\n\n3.15.4\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```typescript\nconst release = `${process.env.NUXT_PUBLIC_APP_NAME}@${ver.replace('v', '')}`\n\nSentry.init({\n dsn: process.env.NUXT_PUBLIC_SENTRY_DSN,\n environment: process.env.NUXT_PUBLIC_ENVIRONMENT,\n release,\n tracesSampleRate: 0.5,\n debug: true,\n})\n```\n\n### Steps to Reproduce\n\n1. Build Nuxt app\n2. Start server with `node --import ./dist/apps/core/.output/server/sentry.server.config.mjs ./dist/apps/core/.output/server/index.mjs`\n3. Run Grafana K6 to test\n\n### Expected Result\n\nAll requests are correctly handled.\n\n### Actual Result\n\nAbout 1% of requests fails with 500 status code:\n\nK6 results for `node ./dist/apps/core/.output/server/index.mjs`:\n\n\n\nK6 results for `node --import ./dist/apps/core/.output/server/sentry.server.config.mjs ./dist/apps/core/.output/server/index.mjs`:\n\n\n\nI spent the last few days trying to fix or at least find the cause of this issue. I discovered that the 500 status codes are caused by the `nuxt instance unavailable` error thrown from the pinia store setup function. It's not logged to console because `setup` function is called inside vue's [`runWithContext`](https://github.com/vuejs/core/blob/efed3ebee6794ad1d4d9a4f6f5870cf8ea4652fa/packages/runtime-core/src/apiCreateApp.ts#L461), which doesn't throw error.\n\nAnother clue is the fact that the issue doesn't occur with k6 simultaneity set to 1, which makes me believe it may be some race condition introduced by `@sentry/node`. \n\nAlso, commenting `maybeInitializeEsmLoader` function call in [`@sentry/node`](https://github.com/getsentry/sentry-javascript/blob/develop/packages/node/src/sdk/index.ts#L123), while it's not a solution, maybe it will make it easier to find root cause.\n\nI'm aware that this issue provides a small number of details, but unfortunately, I'm not able to share the codebase with you, however, I will be happy to provide you more details as needed.","author":{"url":"https://github.com/maxtomczyk","@type":"Person","name":"maxtomczyk"},"datePublished":"2025-02-17T16:22:08Z","url":"https://github.com/getsentry/sentry-javascript/issues/15433"}
| 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:2cc3a2d4-cead-f612-302a-d2f97c30163b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC12:1C5C1D:1663776:1DAD377:6B0415AE |
| html-safe-nonce | a96723ec43efd9f455e912d60c388f4b866da3134e62f5ebb5a6f38c2130fb25 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzEyOjFDNUMxRDoxNjYzNzc2OjFEQUQzNzc6NkIwNDE1QUUiLCJ2aXNpdG9yX2lkIjoiOTA0MzgwNjEzODk3MzU1ODE5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 45e1a63caf24ff4544f406947e86a3984f842423b336293df2a3583bae374d63 |
| hovercard-subject-tag | issue:2858294908 |
| 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/15433/issue_layout |
| twitter:image | https://opengraph.githubassets.com/01257e4f48b3d414f32801f99a604737e0359f7752ff400b73139ac966000ff9/getsentry/sentry-javascript/issues/15433 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/01257e4f48b3d414f32801f99a604737e0359f7752ff400b73139ac966000ff9/getsentry/sentry-javascript/issues/15433 |
| 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 | maxtomczyk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| 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