Closed papandreou closed 6 years ago
The plot thickens -- seems like this started happening after we updated https://github.com/newrelic/node-newrelic from 2.5.0 to 2.6.0, where they changed the promise instrumentation.
I've tried fixing it here by switching to arrow functions: https://github.com/clearbit/clearbit-node/pull/33 -- but I'm not able to confirm that it does fix it yet.
Turns out the problem is in newrelic's end: https://github.com/newrelic/node-newrelic/pull/260#issuecomment-369089224
Closing this issue :)
Hi, I've just had this error occur in production (node.js 9.3.0):
I've tried and failed to reproduce it in a test setting, but then I stumbled upon https://github.com/petkaantonov/bluebird/issues/973#issuecomment-174216119 -- and it seems like it could be due to some non-Bluebird promise slipping in somewhere, rendering
.bind(this)
ineffective: https://github.com/clearbit/clearbit-node/blob/c7bf1e04806b3f3343e3b52c942681e63766b841/src/resource.js#L19Would you accept a patch that avoids the
.bind(this)
construct? Would be easy to avoid it with arrow functions (node.js 4+) or the good oldvar that = this;
trick if older environments must be supported.