You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node.js 12 "Cannot read property 'enter' of undefined" #2089
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 Cannot read property 'enter' of undefined, any insights @BYK?
changed the title [-]Node 12.3.1 "Cannot read property 'enter' of undefined"[/-][+]Node.js 12 "Cannot read property 'enter' of undefined"[/+]on Jun 17, 2019
I am posting this here though it is close because I am having a similar issue.
Working on a Nextjs project with typescript, I am getting the following error:
next-dev.js?53bc:89 Error was not caught TypeError: Cannot read property 'cwd' of undefined
at Module.eval (VM11333 parsers.js:40)
at eval (VM11333 parsers.js:252)
at Module../node_modules/@sentry/node/esm/parsers.js (_app.js?ts=1619773353632:3455)
at __webpack_require__ (webpack.js?ts=1619773353632:873)
at fn (webpack.js?ts=1619773353632:151)
at eval (VM11332 backend.js:7)
at Module../node_modules/@sentry/node/esm/backend.js (_app.js?ts=1619773353632:3299)
at __webpack_require__ (webpack.js?ts=1619773353632:873)
at fn (webpack.js?ts=1619773353632:151)
at eval (VM11287 index.js:50)
This is a non blocking issue when forcing node in production but it is when simply running yarn dev.
The element that seems to trigger it is a Sentry.init() call in my sentry utils (following the example of sentry integration from nextjs).
Using next@10.1.3, typescript@4.1.3 and @sentry/node@6.3.4
Activity
[-]Node 12.3.1[/-][+]Node 12.3.1 "Cannot read property 'enter' of undefined"[/+]vvo commentedon Jun 17, 2019
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
Cannot read property 'enter' of undefined, any insights @BYK?[-]Node 12.3.1 "Cannot read property 'enter' of undefined"[/-][+]Node.js 12 "Cannot read property 'enter' of undefined"[/+]BYK commentedon Jun 17, 2019
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.
kamilogorek commentedon Jul 3, 2019
Node v12.4.0, wasn't able to reproduce with your code ¯_(ツ)_/¯kunal15595 commentedon Jul 16, 2019
Getting this on node v12.6.0, sentry v5.5.0
fixed by reverting to v12.2.0
emhagman commentedon Jul 18, 2019
I've also encountered this issue upon upgrading to NodeJS 12.6.0
vvo commentedon Jul 22, 2019
@emhagman @kunal15595 are you also using express? Trying to see anything we have in common here
kunal15595 commentedon Jul 22, 2019
@vvo yes, express@4.17.1, node@12.6.0, sentry@5.5.0, newrelic@5.10.0
emhagman commentedon Jul 23, 2019
Yes, express@4.16.4, node@12.6.0, sentry@5.4.3
21 remaining items
emhagman commentedon Oct 25, 2019
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
saniagh commentedon Oct 29, 2019
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:
Linux <gke_pod_name> 4.14.137+ SMP Thu Aug 8 02:47:02 PDT 2019 x86_64 Linux
Unfortunately I could not get the debug log since the container was deleted when it crashed.
emhagman commentedon Oct 29, 2019
@saniagh Check out the thread on the
nodeside. It has to do with usinghttps.Agentwhen reusing the same sockets. nodejs/node#30122Check to see if you are calling
https.Agentanywhere or any of your libraries are.emhagman commentedon Oct 31, 2019
@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
httporhttpsagents so I believe this still applies to you.nodejs/node#30122 (comment)
emhagman commentedon Nov 6, 2019
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
kamilogorek commentedon Nov 7, 2019
@emhagman @addaleax thank you! :)
scragg0x commentedon Nov 13, 2019
Does anyone have a workaround until the fix is in?
emhagman commentedon Nov 14, 2019
@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.
emhagman commentedon Nov 22, 2019
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
nodejs/node@e59cc8aad8
For those of you using 12.x, we have to wait roughly 2 more weeks for it to make it into the LTS
simllll commentedon Jan 7, 2020
anyone knows if it's landed in 12.14?
SimenB commentedon Jan 7, 2020
Scheduled for today: nodejs/node#31069
emhagman commentedon Jan 7, 2020
It's out! https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.14.1
Specifically --
kamilogorek commentedon Jan 28, 2020
Aye! Closing it then.
antkougblenou commentedon Apr 30, 2021
I am posting this here though it is close because I am having a similar issue.
Working on a Nextjs project with typescript, I am getting the following error:
This is a non blocking issue when forcing node in production but it is when simply running
yarn dev.The element that seems to trigger it is a Sentry.init() call in my sentry utils (following the example of sentry integration from nextjs).
Using
next@10.1.3,typescript@4.1.3and@sentry/node@6.3.4