-
Notifications
You must be signed in to change notification settings - Fork 395
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
Fix bug of var m equals null(Hot fix for v1.7.2) #154
Conversation
newrelic/lib/instrumentation/shared/connect-express.js:141 if (m.handle !== sentinel) { ^ TypeError: Cannot read property 'handle' of null
That's no good 😦 I would like to add a test to guard against this fix from happening again. Can you describe your setup that caused the error? |
express@4.0.0 or latest. I start, and it occurs immediately.
|
Got the same error. I noticed it's because I used express 4.0 router.
|
I tried reproducing this with the following snippet, using require('newrelic')
var http = require('http')
var express = require("express")
var bodyParser = require('body-parser')
var app = express()
app.use(bodyParser.urlencoded())
app.use(bodyParser.json())
app.use(function(req,res,nxt){
nxt()
})
app.use(function(err,req,res,nxt){
nxt()
})
app.get("/", function (req, res) {
res.send("index")
})
http.createServer(app).listen(8080) I get no errors with If you can help me refine the case and generate an error, that would be greatly appreciated. |
Thanks to @marcbachmann for the (slightly modified) repro case below: require('newrelic');
var express = require('express');
var router = express.Router();
router.get('/1', function(req, res, next) {
next();
});
router.get('/2', function(req, res, next) {
next();
}); This produces the following error:
I haven't resolved the underlying issue yet. Stay tuned. |
Just an update. This is an error in our instrumentation, and we're hoping to release a fix this week. |
This should be fixed in Please let us know if this does, or does not resolve the issue. Sorry about breaking things! |
Still getting similar errors, but not on startup – only when requesting a page. Using latest krakenjs which might complicate debugging, but doesn't seem to be involved judging by the stack trace.
|
@groundwater Thanks, version 1.7.3 solved the problem with express.Router. |
@marcbachmann Thanks for confirming! I'm going to close this issue now. |
…/graphql-koa-dataloader/app/koa/cors-5.0.0
docs: updated readme to specify this no longer is a standalone package
newrelic/lib/instrumentation/shared/connect-express.js:141
if (m.handle !== sentinel) {
^
TypeError: Cannot read property 'handle' of null