You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
I'm not sure if this is the result of me logging an Axios response object but it causes my app to crash due to a fatal error.
I'm using Axios which apparently uses some circular structure for response objects - so when I log them, my app crashes.
Here's a minimal example using an express server:
if(process.env.NODE_ENV!=='production'){require('@glimpse/glimpse').init();}constapp=require("express")();app.get('/test',function(req,res,next){constobj={a: "foo",}obj.b=obj;// make a circular referenceconsole.log(obj);// try to log itres.json({done: true})});letserver=app.listen(3000);
This produces the following console output:
{ a: 'foo', b: [Circular] }
^^^ that is from my console.log(obj)
THEN....
/Project/node_modules/@glimpse/glimpse-agent-node/release/messaging/MessageConverter.js:38
transformedMessage.payload = JSON.stringify(payload);
^
TypeError: Converting circular structure to JSON
at Object.stringify (native)
at MessageConverter.transformMessageForTransit (/Project/node_modules/@glimpse/glimpse-agent-node/release/messaging/MessageConverter.js:38:43)
at /Project/node_modules/@glimpse/glimpse-agent-node/release/inspectors/ConsoleProxy.js:271:61
at /Project/node_modules/@glimpse/glimpse-agent-node/release/inspectors/util/StackHelper.js:117:25
at /Project/node_modules/@glimpse/glimpse-agent-node/release/inspectors/util/StackHelper.js:236:21
at /Project/node_modules/@glimpse/glimpse-agent-node/release/inspectors/util/StackHelper.js:297:17
at wrappedCallback (/Project/node_modules/@glimpse/glimpse-agent-node/release/async-track/async-track.js:346:33)
at tryToString (fs.js:449:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436:12)
This is something which should be caught. As can be seen, the native buffer just says [Circular] instead of trying to output it.
The text was updated successfully, but these errors were encountered:
Hello,
I'm not sure if this is the result of me logging an Axios response object but it causes my app to crash due to a fatal error.
I'm using Axios which apparently uses some circular structure for response objects - so when I log them, my app crashes.
Here's a minimal example using an express server:
This produces the following console output:
^^^ that is from my console.log(obj)
THEN....
This is something which should be caught. As can be seen, the native buffer just says
[Circular]
instead of trying to output it.The text was updated successfully, but these errors were encountered: