I’m running n8n in a Docker container on my local machine. I have a basic automation that receives data through a webhook and saves it as a file using the file writer node. The file gets saved to a folder that’s shared between the container and my host system.
This workflow was working fine until I modified the Docker container by adding an image processing library. Now when the webhook gets triggered, the execution gets stuck forever and shows a 500 error. In the n8n interface, I can see the execution stays in “running” status and never completes.
The strange part is that a file does get created in the target folder with the right size, but it’s corrupted and can’t be opened as an image. The logs show an error about moving files from the temp directory to the final location, but the file is actually there.
Here’s my workflow setup:
{
"name": "photo-upload-handler",
"nodes": [
{
"parameters": {},
"name": "Trigger",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [250, 300],
"id": "start-node-123"
},
{
"parameters": {
"filePath": "=/uploads/gallery/{{ $json.query.imagename }}.png",
"binaryPropertyName": "=filedata",
"options": {}
},
"name": "Save File",
"type": "n8n-nodes-base.writeBinaryFile",
"typeVersion": 1,
"position": [800, 300],
"id": "file-writer-456"
},
{
"parameters": {
"authentication": "headerAuth",
"httpMethod": "POST",
"path": "image-upload-endpoint",
"responseMode": "lastNode",
"options": {}
},
"name": "HTTP Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [500, 300],
"webhookId": "webhook-789",
"id": "http-receiver-abc"
}
],
"connections": {
"HTTP Trigger": {
"main": [
[
{
"node": "Save File",
"type": "main",
"index": 0
}
]
]
}
},
"active": true
}
I’m getting this error in the logs about file operations failing, but I can see the files are actually being created. Has anyone seen this before? I don’t want to rebuild everything from scratch since I’ve made lots of custom changes.