Glimpse / Home

Project Glimpse: Node Edition - Spend less time debugging and more time developing.
http://node.getglimpse.com
Other
252 stars 9 forks source link

Cannot set property of 'action' error #98

Closed julianfrank closed 7 years ago

julianfrank commented 7 years ago

I have a normal Express app and I included this line as per your website instructions

if (process.env.NODE_ENV !== 'production') { require('@glimpse/glimpse').init() }

Now when I try to open my app it shows this error

TypeError: Cannot set property 'action' of undefined
    at ExpressInspectorActionRouteView.onRouteDispatch (e:\dev\code\ratchet\node_modules\@glimpse\glimpse-agent-node\release\inspectors\ExpressInspectorActionRouteView.js:96:32)
    at Object.listener (e:\dev\code\ratchet\node_modules\@glimpse\glimpse-agent-node\release\inspectors\ExpressInspectorActionRouteView.js:20:23)
    at Tracing.publish (e:\dev\code\ratchet\node_modules\@glimpse\glimpse-agent-node\release\tracing\Tracing.js:31:26)
    at Route.dispatchRoute [as dispatch] (e:\dev\code\ratchet\node_modules\@glimpse\glimpse-agent-node\release\tracing\module_instrumentors\ExpressProxyActionRouteView.js:21:35)
    at Layer.handle [as handle_request] (e:\dev\code\ratchet\node_modules\express\lib\router\layer.js:95:5)
    at e:\dev\code\ratchet\node_modules\express\lib\router\index.js:281:22
    at param (e:\dev\code\ratchet\node_modules\express\lib\router\index.js:354:14)
    at param (e:\dev\code\ratchet\node_modules\express\lib\router\index.js:365:14)
    at Function.process_params (e:\dev\code\ratchet\node_modules\express\lib\router\index.js:410:3)
    at next (e:\dev\code\ratchet\node_modules\express\lib\router\index.js:275:10)

I'm on Windows 10 Edge ...Same problem on chrome too

avanderhoorn commented 7 years ago

@julianfrank Thanks for sending through the report! Are you doing anything in your express pipeline that might be considered "unusual" or packages that might be in the pipeline that the typical scenarios mightn't have?

julianfrank commented 7 years ago

Lots actually...I've got the whole std parsers,helmet, and socket io....It is not a simple app....

mike-kaufman commented 7 years ago

From looking at the code, we've lost context for some reason. @julianfrank - any chance you can get us some code that repros this so we can dig deeper?

firefoxNX commented 7 years ago

@julianfrank can u make sure glimpse init code is the very first line in your app.js? Even before express.

julianfrank commented 7 years ago

Yes

mike-kaufman commented 7 years ago

@julianfrank - we believe this error is fixed with our release coming up in a few days, or next monday at the latest. If you'd like to try out a pre-release build to see if it addresses your issue, you can do the following:

npm config set @Glimpse:registry=https://www.myget.org/F/g-alpha/npm/
npm install @glimpse/glimpse
npm ls @glimpse/glimpse # this should say v0.21.3 or higher.
julianfrank commented 7 years ago

I tried the steps and it only updated to @glimpse/glimpse@0.20.9 and not c0.21.3!

In 0.20.9 it still sadly fails :(

davidkpiano commented 7 years ago

Try pinning the version:

npm install @glimpse/glimpse@0.21.3
mike-kaufman commented 7 years ago

Fix for this is availabe on NPM now with glimpse version 0.21.5.