-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Valid cURL command fails to be imported into HTTP node with "Couldn’t import cURL command" error #9768
Comments
I hacked |
@netroy I noticed you’ve been working with n8n cURL service recently and I’d really value your opinion on this. Could you please take a look when you have a moment? Thanks! Some background: I run a web scraper builder which generates JS / cURL commands to run this web scraper - and cURL is a perfect method to embed complex web scrapers into n8n. |
Ok I have isolated the problem - it is indeed a curlconverter@3 issue. |
Fix equal sign encoding in "Import from cURL" feature. n8n-io#9768
Hey @restyler, Thanks for the report, As there is a PR for this as well I am going to close this issue and we can continue the conversation on the PR. |
It turned out that the problem is in query-string package which is used in this is where the string gets corrupted. |
Bug Description
I have a rather complex JSON payload in my cURL which fails to be imported into n8n.
If I remove
=
equals sign (let top = \\"gg\\";
) from the JSON, or wholeextractor
property, it works fine.n8n throws
{"code":400,"message":"Invalid cURL command"}
for rest curl import.Here is what is sent to n8n curl-to-json endpoint
What is interesting is that
curlconverter@3.21.0
(which is used in n8n) does not have any issues parsing this payload when I call it directly: (UPD: I was wrong! Initially I thought the problem occurs due to incorrect quotes escaping, but it was due to=
sign)So the problem is located somewhere in n8n
/rest/curl-to-json
endpoint (I confirmed this by digging through n8n code).To Reproduce
Import cURL
Expected behavior
the HTTP node should be created successfully
Operating System
Ubuntu Linux 22
n8n Version
1.45.1
Node.js Version
v20.13.1
Database
SQLite (default)
Execution mode
main (default)
The text was updated successfully, but these errors were encountered: