Skip to content
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

Cannot read property 'statusCodes' of undefined #298

Closed
micahlmartin opened this issue Feb 2, 2015 · 11 comments
Closed

Cannot read property 'statusCodes' of undefined #298

micahlmartin opened this issue Feb 2, 2015 · 11 comments
Labels
bug
Milestone

Comments

@micahlmartin
Copy link

@micahlmartin micahlmartin commented Feb 2, 2015

I'm getting a weird error running on Heroku. I'm running version 5.0.0.

TypeError: Cannot read property 'statusCodes' of undefined
  at internals.NetworkMonitor._onResponse (/app/node_modules/good/lib/network.js:50:25)
  at emit (events.js:95:17)
  at handler (/app/node_modules/hapi/node_modules/kilt/lib/index.js:54:44)
  at emit (events.js:95:17)
  at internals.Request._finalize (/app/node_modules/hapi/lib/request.js:378:21)
  at /app/node_modules/hapi/lib/request.js:369:25
  at ServerResponse.end (/app/node_modules/hapi/lib/transmit.js:289:13)
  at ServerResponse.g (events.js:180:16)
  at ServerResponse.emit (events.js:117:20)
  at ServerResponse.emitted [as emit] (/app/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/emitter-listener/listener.js:122:21)
  at ServerResponse.OutgoingMessage._finish (http.js:1020:8)
  at ServerResponse.OutgoingMessage.end (http.js:1003:10)
  at ServerResponse.obj.(anonymous function) [as end] (/app/node_modules/nodetime/lib/core/proxy.js:61:22)
  at onend (_stream_readable.js:501:10)
  at g (events.js:180:16)
  at emit (events.js:92:17)
  at _stream_readable.js:943:16
  at args.(anonymous function) (/app/node_modules/nodetime/lib/core/proxy.js:131:20)
  at /app/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31
  at /app/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31
  at process._tickDomainCallback (node.js:463:13)
  at process.<anonymous> (/app/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/index.js:18:15)

Here is my configuration:

var options = {
  opsInterval: 1000,
  reporters: [{
    reporter: require('good-console'),
    args:[{ log: '*', request: '*', response: '*' }]
  }]
};

server.register({
    register: require('good'),
    options: options
}, function (err) {
...
});
@kanongil

This comment has been minimized.

Copy link
Member

@kanongil kanongil commented Feb 2, 2015

Lots of discussion here on this issue in #285.

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Feb 3, 2015

This explains it better I think (if in fact the same issue) hapijs/hapi#2344

@ggoodman

This comment has been minimized.

Copy link

@ggoodman ggoodman commented Feb 16, 2015

This is also crashing my server. The server handles high volumes of fast turn-around requests served from memory. This error was bringing the server down periodically until I disabled good.

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Feb 16, 2015

Good should be updated according to the issue I linked above, i'm also annoyed to get 500's

@arb

This comment has been minimized.

Copy link
Contributor

@arb arb commented Feb 16, 2015

There is a PR open #301. It just needs tests.

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Feb 16, 2015

Cool, if I find time i'll take a look at it

@lloydbenson

This comment has been minimized.

Copy link
Contributor

@lloydbenson lloydbenson commented Feb 16, 2015

Short term, it would be useful to know if you apply this fix locally, if it
actually fixes your issue. As you are annoyed with it, you are good
candidate to try this.

On Mon, Feb 16, 2015 at 9:00 AM, AdriVanHoudt notifications@github.com
wrote:

Cool, if I find time i'll take a look at it


Reply to this email directly or view it on GitHub
#298 (comment).

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Feb 16, 2015

I have only seen in production but I could try to mimic it in dev. Comes down to closing the connection before the request is done as far as I can remember.

@ggoodman

This comment has been minimized.

Copy link

@ggoodman ggoodman commented Feb 17, 2015

Thanks @arb and @AdriVanHoudt for the fix! Any plans for a patch release for this issue in the short term?

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Feb 17, 2015

@ggoodman according to https://github.com/hapijs/good/milestones 1 issue to go 🎉

@ggoodman

This comment has been minimized.

Copy link

@ggoodman ggoodman commented Feb 18, 2015

@arb you're the man. Thanks :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.