-
-
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
Node.js 12 "Cannot read property 'enter' of undefined" #2089
Comments
Tested with Node.js 12.4.0 too, same result, as soon as I re-add sentry initialization as shown in the previous comment, it will crash with |
Sorry @vvo, no insights at this point. @HazAT, @kamilogorek any ideas? Looks like we still have a few months before Node 12 becomes the new LTS tho. |
Getting this on node v12.6.0, sentry v5.5.0 |
I've also encountered this issue upon upgrading to NodeJS 12.6.0 |
@emhagman @kunal15595 are you also using express? Trying to see anything we have in common here |
fyi @vvo @BYK @kamilogorek @emhagman @kunal15595 - I came across your issue here as I had the exact same error show up in my hapi servers (no sentry) with node > 12.2. I believe it was caused by nodejs/node#28275. The fix for that issue was merged 5 days ago with nodejs/node@43e5478 and hopefully will be released soon and resolve our issue.
|
Thanks @spanditcaa! |
Thanks @spanditcaa ! |
For anyone curious, this landed in 12.8.0: |
Just experienced this same issue in 12.10 which came out on September 3rd. Not sure this is fixed. |
@emhagman Yep same for me, 12.10 is triggering it too. |
triggered for me as well, 12.10 version |
I am going to try and take a stab at this and submit a PR since the Sentry team has decided it's not worthy of looking at yet. I'll report back! |
Is it possible that some changes have been made to the domain module in NodeJS > 12.2.0 are causing this? (which would be in my opinion a strange decision since it's deprecated so it should be "do not touch", more or less?) I'm asking because we have almost identical crashes in an unrelated app that works swimmingly under Node < 12 and Node 12 < 12.3.0. We're using "domain" there as a sort of ambient context. |
TypeError: Cannot read property 'enter' of undefined also affected by this... any working workarround? |
The error is thrown internally within the |
@kamilogorek Sorry, I was not trying to attack the team. I was more referencing that 12 is not in LTS yet so it didn't seem a priority. Other people are claiming they don't have this issue with the same versions of NodeJS that we are having issues with, so it would seem there is something specific to how some people are using it, implying there is a fix |
@emhagman No worries. If there's a way you can reproduce it and provide the codebase, I'm more than happy to help to debug this. We need a solid repro first, as I wasn't able to break it in any way myself. |
fyi @kamilogorek the issue resurfaced for us as well. We're leaning towards moving our codebase away from domains (which is deprecated anyway) vs. expending any effort troubleshooting further. Good luck. |
@kamilogorek @spanditcaa Correct if I'm wrong, but the issue is not whether we use If that's the case, removing domains from your codebase still won't fix this issue in NodeJS >= 12.4 if you're using EDIT: Re-reading your comments you definitely know that's the case. Sorry! |
Is there any official statement for how we should go on with this issue? node 12 will be LTS in a few days... |
NodeJS 12.13.0 is now LTS. Has anyone tried that or the new 13.0.0 to see if this has been fixed in the core? |
Unfortunately it's still happening with the lts version, I have to remove the sentry express error handle for now... |
I guess a temporary solution is to use Normally I wouldn't care but there are supposed to be huge startup speed improvements and default memory setting for V8 based on environment in the newer 12.x versions which we'd really like to take advantage of. Can you confirm it doesn't happen when disabling just the |
@emhagman yes, I can confirm it's only happening with the express middleware, we still use Sentry.captureException and captureMessage with scopes.. no issues. We have our own error handler now in place, but be awaer that breadcrumbs and co don't work as they should with this "workaround". |
@simllll Thanks for the info. Breadcrumbs don't work for us currently because we use |
I've posted a bug report on the NodeJS repo. Hopefully, someone has some insight as to why it might be happening nodejs/node#30122 |
We're not using Sentry explicitly in our project and we've encountered this issue on our production server running in a Docker container:
System info: Unfortunately I could not get the debug log since the container was deleted when it crashed. |
@saniagh Check out the thread on the Check to see if you are calling |
@simllll @kamilogorek The issue has been found and there is a PR open! Thanks to @addaleax for taking the time to reproduce and fix it. @saniagh This bug can happen with |
For everyone here, the fix has landed in here nodejs/node@d26a74d It should be released into 13.x soon and then two weeks later into 12.x so keep any eye out |
Does anyone have a workaround until the fix is in? |
@scragg0x Unfortunately, the best thing you can do is stay on 12.2.x until the next version is released in a week or two. |
For those of you using 13.x, the fix has made it into 13.2.0 https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-11-21-version-1320-current-mylesborins For those of you using 12.x, we have to wait roughly 2 more weeks for it to make it into the LTS |
anyone knows if it's landed in 12.14? |
Scheduled for today: nodejs/node#31069 |
It's out! https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.14.1
|
Aye! Closing it then. |
I am posting this here though it is close because I am having a similar issue.
This is a non blocking issue when forcing node in production but it is when simply running |
=> there's no Sentry event because the error lies in Sentry code I believe
Package + Version
@sentry/node
@sentry/integrations
Version:
Description
After switching to Node 12.3.1 I started to have hard crashes of my application this way:
Here's how we use Sentry (relevant lines only):
After checking our code I believe the only places where Node.js domains are used are Sentry code. This is why I am opening this issue.
Recent changes to async_handlers linked to domains: nodejs/node@04355ef#commitcomment-33702918
Let me know if you need anything else.
The text was updated successfully, but these errors were encountered: