Describe the problem/error/question
I am getting sporadic errors for my Webhook Node: Error: ENOENT: no such file or directory
.
Data is sent from a Symfony Http Client 5.x (https://symfony.com). The caveat with this library is, that normal fields (non-files) are sent with text/plain
content type in the form-data. This causes n8n (formidable) to interpret the fields as files (ContentType: text/plain not showing in fields · Issue #875 · node-formidable/formidable · GitHub). Since n8n 1.0 the formidable package was updated and the webhook behaviour for files.
We tried to solve this problem by checking if the file has a filename, if not, extract the contents as a JSON field. However, sometimes n8n is unable to save all the files. I tried to to change N8N_DEFAULT_BINARY_DATA_MODE
, but the error occurs with both default
and filesystem
. I am not sure if this error is caused by too many files being saved in general (about 25 files) or with the “incorrect” content-type for normal text fields. The former sounds more plausible, because the error occurs sporadic. The same also happens with a custom node I used.
Is there any other n8n configuration I could try to solve this issue?
This thread has a similar issue Webhook node ERROR: ENOENT: no such file or directory, open '/tmp/12c77b592ffcb06bdd075cc07' - #3 by Jayavel.
What is the error message (if any)?
{
"errorMessage": "Internal error",
"errorDetails": {},
"n8nDetails": {
"n8nVersion": "1.49.0 (Self Hosted)",
"binaryDataMode": "filesystem",
"stackTrace": [
"Error: ENOENT: no such file or directory, lstat '/tmp/57319c332c52116932cb3c73c'",
" at lstat (node:internal/fs/promises:1018:18)",
" at async Promise.all (index 0)",
" at checkPaths (node:internal/fs/cp/cp:76:39)",
" at cpFn (node:internal/fs/cp/cp:65:17)",
" at FileSystemManager.copyByFilePath (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/BinaryData/FileSystem.manager.js:76:9)",
" at BinaryDataService.copyBinaryFile (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/BinaryData/BinaryData.service.js:77:38)",
" at copyBinaryFile (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:855:12)",
" at Object.copyBinaryFile (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2176:61)",
" at Webhook.handleFormData (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Webhook/Webhook.node.js:330:57)",
" at Webhook.webhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Webhook/Webhook.node.js:190:20)",
" at Workflow.runWebhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:661:15)",
" at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/WebhookHelpers.js:220:33)"
]
}
}
Information on your n8n setup
- n8n version: 1.49.0
- Database (default: SQLite): PostgreSQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker