Http post request gives an error

Describe the problem/error/question

I try to make a post request to RecraftAi api to use image to image feature , I try to upload image via postman and make post request , it works fine , but when I try it via http request node and "read write file from desk " node , gives me the error below

What is the error message (if any)?

error message : Problem in node ‘HTTP Request‘
Cannot read properties of null (reading ‘name’)

error details :
{
“errorMessage”: “Cannot read properties of null (reading ‘name’)”,
“errorDetails”: {
“rawErrorMessage”: [
“Cannot read properties of null (reading ‘name’)”
]
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “3/10/2025, 3:25:00 PM”,
“n8nVersion”: “1.78.1 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Cannot read properties of null (reading ‘name’)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:751:15)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1123:8)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1470:27",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2029:11"
]
}
}

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.78.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): selfhosting on my mac machine
  • **Operating system:macOS big sur

Can you confirm the read/write files node provides correct output?

The error, “reading properties of null (reading ‘name’)” typically means that the name parameter was attempted on an object that is null. Which implies the input file did not exist, causing name property to fail, or was referenced incorrectly.

it gives a binary format

Can you try remove the name field from the http node? Or is it required?

I don’t have any field called " name " on http request node

please any other suggestion

Right here? Is it not removable? I wonder if the binary is provided but name is not for some reason?

name it’s just a label not a field

Oh yes my mistake, I see, the name of the form param. Shouldn’t be an issue.

Could you try update n8n? I am not quite sure then what could be occurring. Did you try import from curl?

I update to the last version and I try curl but same error

Can you show me the advanced error log for latest version? The full error details with stack trace.

this is the full error : {
“errorMessage”: “Cannot read properties of null (reading ‘name’)”,
“errorDetails”: {
“rawErrorMessage”: [
“Cannot read properties of null (reading ‘name’)”
]
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “3/12/2025, 5:31:18 PM”,
“n8nVersion”: “1.81.4 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Cannot read properties of null (reading ‘name’)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:751:15)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1123:8)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1470:27",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2029:11"
]
}
}

Interesting. The error seems to occur here in the HttpRequestV3 node.

let error;
if (responseData?.reason instanceof NodeApiError) {
	error = responseData.reason;
	set(error, 'context.itemIndex', itemIndex);
} else {
	const errorData = (
		responseData.reason ? responseData.reason : responseData
	) as JsonObject;
	error = new NodeApiError(this.getNode(), errorData, { itemIndex });
	}

The error seems to occur because the error line:
error = new NodeApiError(this.getNode(), errorData, { itemIndex }); itself had a parsing error. (I believe)

If it reached that logical path, that indicates the request itself is broken as you received an error of some kind from recraft.

Can you open open chrome/browser dev tools and watch the console output, and the network logs. Then run the scenario/recraft http request. Find the requests made to recraft and see if you can send me their responses.