Open bonesoul opened 7 years ago
Thanks for reporting this @bonesoul. We'll take a look and hopefully get a fix quickly. Note that while this looks like a lot of errors, Glimpse should still be working, the only thing impacted is our ability to display source code locations where certain events occur (e.g., where middleware is registered, where log statements are made, or where http client calls occur)
i can't get glimpse working as the huge amount of errors slows down my application, i can not even boot it.
sorry to hear that. :(. Is your application public by chance so that I can take a look?
it's a private repository but i can help you with the information you need.
Thanks @bonesoul. I don't understand why your stack frames are formatted as - next_tick.js:109 process._tickCallback
. Are you using some library that changes the format of stacks?
When I run this code in win 10/node 7.10.0:
process.nextTick(() => {
func = () => {
const e = new Error();
console.log(e.stack);
};
const a = [func];
a.forEach((f) => {
f();
});
});
I see this output:
Error
at func (d:\tutorials\nodejs\stack\app.js:5:19)
at a.forEach (d:\tutorials\nodejs\stack\app.js:10:9)
at Array.forEach (native)
at process.nextTick (d:\tutorials\nodejs\stack\app.js:9:7)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:151:9)
at bootstrap_node.js:542:3
which is very different from the stack frames reported in those error messages.
Can you send me the output on your machine from above code?
Hi @bonesoul -
Could you answer these questions for me?
process.nextTick(() => {
func = () => {
const e = new Error();
console.log(e.stack);
};
const a = [func];
a.forEach((f) => {
f();
});
});
Error:
- app.js:107 func
D:/source/vapingdb/src/app.js:107:19
- app.js:112 a.forEach
D:/source/vapingdb/src/app.js:112:9
- Array.forEach
- app.js:111 process.nextTick
D:/source/vapingdb/src/app.js:111:9
- async-track.js:293 wrappedCallback
[vapingdb]/[@glimpse]/glimpse-agent-node/release/async-track/async-track.js:293:33
- next_tick.js:73 _combinedTickCallback
internal/process/next_tick.js:73:7
- next_tick.js:104 Immediate._tickCallback
internal/process/next_tick.js:104:9
- timers.js:672 runCallback
timers.js:672:20
- timers.js:645 tryOnImmediate
timers.js:645:5
- timers.js:617 processImmediate [as _immediateCallback]
timers.js:617:5
Just wondering, are you using any packages that change the format of stack frames?
i'm not aware of any that makes changes, but i'm aware of ones that watch it actually, but they are already disabled;
risingstack/trace: "3.10.0", "opbeat": "4.13.1",
additinoally i've packages that may depend on stack;
"debug": "2.6.6", "http-errors": "1.6.1", "pretty-error": "2.1.0",
i'll be disabling them to see the outcome.
found it; https://github.com/AriaMinaei/pretty-error is the offending package.
Thanks @bonesoul. Given the usage of pretty-error, we'll look into supporting parsing stack frame format produced by pretty-error. Stay tuned. Until we get support in, you could remove pretty-error & you shouldn't see those error messages any longer.
Also, we should have an update out today that will chagne our error reporting logic such that we'll only emit an error message once per unsupported frame, so this should limit the noise here.
OK, v0.20.9 is now available on NPM. This will limit the number of errors we output when we can't parse certain stacks, so your app should be usable even if you include pretty-error.
great i'll give it a try
node 7.10.0 win10 - x64
my code;
if (process.env.NODE_ENV !== 'production') { require('@glimpse/glimpse').init(); }
getting luts of errors like;