groundwater / node-stackup Goto Github PK
View Code? Open in Web Editor NEWLong stack traces using async listeners
Long stack traces using async listeners
Error: Cannot find module 'shimmer'
at Function.Module._resolveFilename (module.js:332:15)
at Function.Module._load (module.js:282:25)
at Module.require (module.js:361:17)
at require (module.js:380:17)
at Object.<anonymous> (/var/www/videomail/production/source/node_modules/stackup/node_modules/async-listener/index.js:5:20)
at Module._compile (module.js:426:26)
at Object.Module._extensions..js (module.js:444:10)
at Module.load (module.js:351:32)
at Function.Module._load (module.js:306:12)
at Module.require (module.js:361:17)
module.js:334
throw err;
Solution: bump the async-listener package which fixes the above.
this is the only long stack trace module that works.
All the other ones are buggy.
That is all.
My error log has grown huge, 4.5 MB because of this one bug:
/var/www/videomail/production/source/node_modules/stackup/trace.js:13
if (this.stack) out.push(this.__format(this.stack.stack));
^
RangeError: Maximum call stack size exceeded
at join (native)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:13:53)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
... and then thousand more lines like these ...
Can you add a recursion protection here?
I occasionally see items in the stackup output with incorrect line/column results.
In the following example, the file contains 900 lines, no line having more than 120 columns. However, in the output the line number is reported as 9 with the column being reported as 34,580:
at /home/tlhunter/Projects/Project/app/models/User.js:9:34580
I suspected mixed mixed line-endings in the file but wasn't able to find any Carriage Returns in the file. It doesn't affect all files, and seems to be consistent amongst the files it does affect.
I tried using this by requiring the library in the aws lambda handler but i do not see the longer stack trace information.
Yeah, I see that in my error.log of my app:
$ cat error.log
/var/www/videomail/production/source/node_modules/stackup/trace.js:13
if (this.stack) out.push(this.__format(this.stack.stack));
^
RangeError: Maximum call stack size exceeded
at join (native)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:13:53)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
at Trace.toString (/var/www/videomail/production/source/node_modules/stackup/trace.js:14:41)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.