Jacques44 / node-red-contrib-bigexec

Apache License 2.0
3 stars 3 forks source link

BigExec is throwing error when triggered using http-in node(api call) #4

Open akhileshappala opened 2 years ago

akhileshappala commented 2 years ago

HI @Jacques44 I am using bigexec node to run the scripting command using node-red. As I have faced some deployment issues on the exec node. I have changed to bigexec.
While using bigexec, I am accessing nodered using an API call(HTTP in node) with query params for the example name. and sending that name string to big exec to print the name. It is throwing below error.

TypeError: Converting circular structure to JSON --> starting at object with constructor 'Socket' | property 'parser' -> object with constructor 'HTTPParser' --- property 'socket' closes the circle

Screenshot 2022-03-01 at 2 33 20 PM

But the same using inject it is working fine. I guess there is some issue with the integration of bigexec along with HTTP in the node. Can you please check PFA for the flow screenshot below is the flow file from the Image : bigexec-sample-with-api-call.txt

sxwebster commented 2 years ago

Were you able to resolve this? I'm experiencing the same - no issue with an inject node, but receiving an issue when using http-in

Jacques44 commented 2 years ago

Hello, didn't see your first message, sorry. Can you give me the full document sent by "sending params" node?

The node is trying to convert msg.config data as it can be configured by the way. I didn't see such information in your screenshot...

Jacques44 commented 2 years ago

Ok I've made a test. The document returned by the http node is very complex. You should modify your function to something like:

msg = { payload: msg.payload.name } return msg

akhileshappala commented 2 years ago

I have solved this issue using the EXEC node with an updated version of node-red. I will try above approach and let you know.