-
Notifications
You must be signed in to change notification settings - Fork 24
Error: Cannot read property 'nameState' of null #32
Comments
Hi @jgeurts! Sorry you are running into issues. Looking at the code, I think we have two issues here. First, it looks like we don't protect against transaction state loss in our instrumentation your stack trace points to. The code is assuming Second, I'm going to assume based on the above the transaction/segment state has been lost or the transaction has been ended prior to this code. That may be due to changes in @koa/router breaking assumptions/mechanisms our instrumentation relies on or some other framework may be interfering with our ability to keep state. I'm guessing once the first item is fixed, you'll find other issues with regards to naming. To get the state loss problem figured-out/resolved, we typically need to do more in-depth information gathering, etc. by leveraging our great support team. I would recommend going through the official support channels via: https://support.newrelic.com/ so we can make sure we are as responsive as possible. You may or may not want to wait for us to fix the above to see how it impacts your app before doing so. Thank you, Michael |
Sounds good, thank you! |
Hello, I ran into this issue as well today. Here's my environment:
Stack trace: TypeError: Cannot read property 'nameState' of null
at Object.set (/app/node_modules/@newrelic/koa/lib/instrumentation.js:99:12)
at dispatch (/app/node_modules/koa-router/lib/router.js:358:23)
at wrapper (/app/node_modules/newrelic/lib/shim/shim.js:936:24)
at dispatch (/app/node_modules/koa-compose/index.js:42:32)
...
at tryCatch (/app/node_modules/koa-redis/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/app/node_modules/koa-redis/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/app/node_modules/koa-redis/node_modules/regenerator-runtime/runtime.js:118:21)
...
at wrapper (/app/node_modules/newrelic/lib/shim/shim.js:936:24)
at dispatch (/app/node_modules/koa-compose/index.js:42:32)
...
at tryCatch (/app/node_modules/koa-redis/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/app/node_modules/koa-redis/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/app/node_modules/koa-redis/node_modules/regenerator-runtime/runtime.js:118:21)
...
at new Promise (<anonymous>) |
Thank you for reporting that issue @fadliawan -- this definitely looks like a bug. The next best steps towards fixing this will be for us to be able to reproduce it. To that end we have a few questions -- if you could answers as many of these as possible it would go a long way towards us being able to investigate this further.
With these answers in hand we'll have a better idea of where to focus our debugging efforts. |
Hi, we're getting this error too. We're trying to run koa serverlessly though - using the serverless framework, on AWS lambda - so I appreciate there may be more to the problem that we're experiencing. Even if we cut the lambda down to the bare minimum, we get the error;
The bare minimum being;
However, it does not give this error if we go to a route that doesn't exist. In that case we get the expected "404 / Not Found". To answer your questions above,
|
Hi, this is a bit hard for me to diagnose, so I'm hoping posting here might help uncover the root cause. We've been seeing random errors coming from what seems to be this project, but it might be more related to Koa Router... The errors have been happening for the last few weeks and they look like:
We're currently running @koa/router v9.0.1, @newrelic/koa v3.0.0, koa v2.12.0, and newrelic v6.9.0 on the latest Node.js v10 LTS. I'm not sure what else I can provide or really how to reproduce this issue, but I will help however I can!
The text was updated successfully, but these errors were encountered: