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

Incompatibility with raven-node #94

Closed
gotvitch opened this issue Dec 17, 2013 · 3 comments
Closed

Incompatibility with raven-node #94

gotvitch opened this issue Dec 17, 2013 · 3 comments

Comments

@gotvitch
Copy link

This error is throw when I use newrelic and raven-node TypeError: Cannot read property 'accept-encoding' of undefined.

There is already a similar issue #86 but I'm not sure if it's also because raven-node is used.

raven-node use raw-stacktrace to have a detailed stack trace with this code :

traces.on("trace", function(err, callsites) {
    err.structuredStackTrace = callsites;
});

And this create a problem in bunyan module line 685 :

str = JSON.stringify(obj, safeCycles()) + '\n';

It can no longer serialize errors because it can not serialize structuredStackTrace property set by raven-node.

Here a sample of code to produce the bug :

var newrelic = require('newrelic');
    raven = require('raven'),
    express = require('express'),
    app = express(),
    ravenClient = new raven.Client();

app.get('/error', function(req, res){
  throw new Error();
});

app.listen(3000);

And the package.json

{
  "dependencies": {
    "express": "~3.4.7",
    "newrelic": "~1.1.1",
    "raven": "~0.6.0"
  }
}

Run and go to http://localhost:3000/error

@othiym23
Copy link
Contributor

I'm not sure this is New Relic's bug, because bunyan is the piece that's crashing and raven is the thing stashing the array of CallSites on the side of the Error. We can't work around all the crazy monkeypatching that goes on in Node modules, but we do do a lot of (probably excessively) clever stuff ourselves, so I'll take a look at how difficult it would be to harden against this kind of weirdness.

Your test case will be super helpful, so thanks for the clear description and sample code!

@adrianpike
Copy link

This cropped up from a google search - we're seeing similar things from Raven when you send it circular references. We're not using node-newrelic either. :)

@gotvitch
Copy link
Author

Fixed with the last version of raven-node

cmcadams-newrelic pushed a commit to cmcadams-newrelic/node-newrelic that referenced this issue Jan 29, 2024
…prisma-app/app/protobufjs-7.2.4

chore(deps): bump protobufjs from 7.2.3 to 7.2.4 in /prisma-app/app
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 11, 2024
fixed troubleshooting issue type and updated all deprecated actions
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 16, 2024
…omation

added husky + lint staged and hook to update third party manifest/notices
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 19, 2024
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants