-
-
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
@sentry/nuxt breaks Nuxt context for ~1% of requests #15433
Comments
Thanks for taking the time and looking into this!
|
I know you meant commenting it like this :) You could either build the |
It looks like I forgot to write about the results of commenting |
Okay thank you, we'll look into this! :) |
I just successfully solved the issue in our apps by simply enabling the experimental |
Okay this is interesting. Enabling But since you wrote that you get the error For Sentry's Node-part of the SDK, we need the AsyncLocalStorage to be available. However, the AsyncLocalStorage should be also available when |
I tested using Node.js 22.11.0. Since I'm not familiar with the |
Considering that the error message says @maxtomczyk Could you try running this again with 9.7.0? With the PR #15749, the Sentry server config is not "leaking" out of Nitro into the Nuxt environment anymore. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nuxt
SDK Version
9.1.0
Framework Version
3.15.4
Link to Sentry event
No response
Reproduction Example/SDK Setup
Steps to Reproduce
node --import ./dist/apps/core/.output/server/sentry.server.config.mjs ./dist/apps/core/.output/server/index.mjs
Expected Result
All requests are correctly handled.
Actual Result
About 1% of requests fails with 500 status code:
K6 results for
node ./dist/apps/core/.output/server/index.mjs
:K6 results for
node --import ./dist/apps/core/.output/server/sentry.server.config.mjs ./dist/apps/core/.output/server/index.mjs
:I 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 becausesetup
function is called inside vue'srunWithContext
, which doesn't throw error.Another 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
.Also, commenting
maybeInitializeEsmLoader
function call in@sentry/node
, while it's not a solution, maybe it will make it easier to find root cause.I'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.
The text was updated successfully, but these errors were encountered: