I’m running n8n in a Docker container on my local machine. I have a basic automation that handles file uploads through a webhook and saves them using a file writer node. The file writer saves to a mounted directory that connects to my host system.
Everything was working fine until I made some changes to install an image processing library. Now when the webhook gets triggered, the execution never completes and shows as “running…” forever in the n8n interface. The API call that triggers it returns a 500 error.
The weird part is that files do get created in the target folder, but they’re corrupted and can’t be opened as images. The logs show an error about moving files from the temp directory to the final location, but the execution directory does exist with the binary file in it.
I’m stuck and not sure how to debug this further. I could rebuild everything from scratch but I’ve made lots of custom changes that would be hard to recreate.
Here’s my workflow setup:
{
"name": "save-photo-upload",
"nodes": [
{
"parameters": {},
"name": "Trigger",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [150, 300],
"id": "start-node-123"
},
{
"parameters": {
"fileName": "=/uploads/photos/{{ $json.query.imagename }}.png",
"dataPropertyName": "=filedata",
"options": {}
},
"name": "Save File",
"type": "n8n-nodes-base.writeBinaryFile",
"typeVersion": 1,
"position": [800, 300],
"id": "file-saver-456"
},
{
"parameters": {
"authentication": "headerAuth",
"httpMethod": "POST",
"path": "photo-upload-endpoint",
"responseMode": "lastNode",
"options": {}
},
"name": "Upload Handler",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [400, 300],
"webhookId": "upload-webhook-789",
"id": "webhook-handler-101"
}
],
"connections": {
"Upload Handler": {
"main": [[
{
"node": "Save File",
"type": "main",
"index": 0
}
]]
}
},
"active": true
}
Any ideas what could be causing this or how to troubleshoot it better?