We have a created a nice workflow with our apis on our mac running n8n version 1.9.0.
Works great when running on the mac.
We have now created a cloud subscription so we can run it in the cloud, but the first api (which authenticates the api) fails with the following error.
Any ideas what causes this?
ERROR: Converting circular structure to JSON → starting at object with constructor ‘TLSSocket’ | property ‘_httpMessage’ → object with constructor ‘ClientRequest’ — property ‘socket’ closes the circle
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TLSSocket'
| property '_httpMessage' -> object with constructor 'ClientRequest'
--- property 'socket' closes the circle
at JSON.stringify (<anonymous>)
at toText (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:8:21)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1330:62)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:653:28)
This error would suggest somewhere in your workflow n8n is trying to stringify a circular structure as described for example here:
In order to find and isolate the issue, I’d go through the changes you might have made prior to the move to cloud, revert them and see if any of these might have caused the problem. Assuming you’re using the current version of cloud, something in nodes may have changed from 1.9.0 to our latest release.
As a next step, you might want to narrow down the problem by looking at individual parts of your workflow. For example, remove everything after the first 10 nodes and see if that works. Then add back in the next 10 nodes and re-try. Repeat this until you find which part is causing the problem.
If you need more assistance, can you use the template that appears when you make a new post? We’d need to know the n8n version you’re using on cloud, and sharing your workflow (or an example workflow) would be helpful.
Thanks for the feedback. I have a DM with @Niklas_Hatje on this now and has shared the node (http request). Since this is the first node in the workflow the error must be on this node (this is the authentication node, first node).
I have not done any changes during the migration from on-premise to cloud. I exported it from local and imported it in the cloud. no changes at all at node level.
Since I am a beginner in this its hard for me to troubleshoot on this level of error.
Hi @frankemann, I’m gonna respond here so other can learn as well. It seems like it works when you remove the option Include Response Headers and Status, execute and then add it again. Can you confirm? I would then report that as a bug.
That did not work.
Tried to remove the Include Response Headers and Status` , executed and then add it again. Tried to execute again. Same error.
What did work, was just to remove the DELETE the response Heads Status. save. and then execute. The results is just fine, so it doesnt seem I need that option. Tried to remove it locally also and that also worked. Not even sure why I have used it…