-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
This flow causes Node-Red to crash. #67
Comments
If you post the error message in nodered log may be able to help. I am in process of major rebuild to make it more resilient. |
Hi Peter. Here's the logging for the crash you requested 18 Aug 16:06:35 - [debug] Kafka Broker {"label":"Metadata refresh","node":"cff5e121c002955d","connected":true} |
looks like there may be an error being raised or the debugger message has been past a recursive JSON property. My guess is the payload from http has been past onto to kafkAdmin node. If you rename property payload, it may get over the issue. I will make sure such is not an issue with the new version . |
I assume you may be attempting to store entire http payload. Basically you have an object that needs to be converted to serializable form or stringify. In either case you need to appreciate in consuming message it will not have access to all properties of original json object. |
Hi Peter. If the flow is started with the 'http' node followed by 'function' node to set 'topic' value then it's the same as when it's triggered by by the 'inject' node, except there are the additional elements of 'req' and 'res' in the 'msg' structure related to the http request. The cause of this issue is the node-red-contrib-logger code. The 'msg.req' part of the http request is by definition a circular object. The node-red-contrib-logger is using JSON.stringify(message) which will throw on this circular reference because JSON.stringify doesn't handle circular references (though, there are libraries that can). I know you're aware of the possibility because you commented in the code about circular references in other parts of the logger code. Perhaps in your rebuild efforts you can address this line of code. For my use case, I'm not so concerned with this logging so I just commented out the offending line of code in my local copy (node-red-contrib-logger logger.js line 21) |
Thanks for detail, will fix issue by fixing logger as this clearly should be better at handling situation. |
The code in the 'function' node is
The flow as taken from test/generalTest.json, then just adding the HTTP request and response nodes with the function node only supplying the value for msg.topic which normally comes from the 'inject' node in this example. If this flow is triggered from the 'inject' node then it operates correctly. It's something in the 'msg' from the HTTP node that's killing Node-Red from within the 'Kafka Admin' node. Any ideas on what I can try or supply to diagnose further?
The text was updated successfully, but these errors were encountered: