I just started using n8n and planned on doing a little test project by automating a countdown of days until a certain date and then send these messages to a discord server. Catch is, to be fancy, the text will be ASCII art of bubble letters of the number of days left. The ascii is stored as a png. I have it set so i will check the number of days to dynamically find the right file name for the given day. However, when I retrieve the file (stored locally on my pc), it doesnāt return anything. Putting the path straight to the embed in the discord node just return the error below. Iām not a docker or n8n expert my any means, so I could definitely be doing something very wrong but simple and no know it. thanks in advance.
What is the error message (if any)?
n8n version
1.105.4 (Self Hosted)
Stack trace
n8n version
1.105.4 (Self Hosted)
Stack trace
TypeError: Cannot read properties of undefined (reading 'error') at ExecuteContext.parseDiscordError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/helpers/utils.ts:32:30) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts:153:34) at processTicksAndRejections (node:internal/process/task_queues:105:5) at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/router.ts:70:17) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/DiscordV2.node.ts:33:10) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2158:11
The easiest way to get data into your container is to mount a folder from your local host machine. This will basically result in having the same folder inside the container in the location of your choosing. How do you start your n8n in docker? Via run command or through docker compose?
I, for instance, use docker compose, and here is how I mount a local folder in the service definition:
volumes:
- n8n_storage:/home/node/.n8n // this is unrelated to your question
- ./shared:/data/shared // this is what creates a folder inside the
// container with the content from the local
// folder "shared".
Then I can use /data/shared path in n8n to reach these files.
You could also host these files in the cloud, like in Google Drive and load them, which could be an easier than dealing with docker mounts. Just as an option.
Oh ok, I recall looking at this and then forgetting about it (obviously shouldnāt have) and there wasnāt a shared one listed so Iād have to crest that then yes?
Hello, follow up question, I have a shared volume set up, but to pull something from it, would I give n8n my local file path, or the file path within the docker?
Edit: Figured out, must give it the path within the docker container!
Scratch that I do have a follow up question, I see the data from the image and I can click view to see the image, but I canāt drag and drop to use the image as an embed on the discord node. I can drag and drop the picture when I click view which returns:
{
āerrorMessageā: āCannot read properties of undefined (reading āerrorā)ā,
āerrorDetailsā: {},
ān8nDetailsā: {
ān8nVersionā: ā1.105.4 (Self Hosted)ā,
ābinaryDataModeā: ādefaultā,
āstackTraceā: [
āTypeError: Cannot read properties of undefined (reading āerrorā)ā,
" at ExecuteContext.parseDiscordError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/helpers/utils.ts:32:30)ā,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts:153:34)ā,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)ā,
" at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/router.ts:70:17)ā,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/DiscordV2.node.ts:33:10)ā,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9)ā,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2158:11"
]
}
}
If i directly put the file path and skip the read/write node all together, I get this:
{
āerrorMessageā: āCannot read properties of undefined (reading āerrorā)ā,
āerrorDetailsā: {},
ān8nDetailsā: {
ān8nVersionā: ā1.105.4 (Self Hosted)ā,
ābinaryDataModeā: ādefaultā,
āstackTraceā: [
āTypeError: Cannot read properties of undefined (reading āerrorā)ā,
" at ExecuteContext.parseDiscordError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/helpers/utils.ts:32:30)ā,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts:153:34)ā,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)ā,
" at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/router.ts:70:17)ā,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/DiscordV2.node.ts:33:10)ā,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9)ā,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.29_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2158:11"
]
}
}
Looking quickly, I believe these are both the same errors.
I looked it up, but didnāt see much that applied, someone has a somewhat similar issue and they said to try using the v1 discord node, but not sure how to find thatā¦