Since version 1.75.2: Cannot read properties of undefined (reading 'name') in node

Describe the problem/error/question

In my Add Category node I’m getting the error:
Cannot read properties of undefined (reading ‘name’)

Since version 1.75.2.

I must admit that I do not understand why this is happing suddenly, is there anyone that can explain it to me why this isn’t working anymore in my Add Category node:

// Loop over input items and add categories
for (const item of items) {
  item.json.categories = [$node["Loop Over Items"].json["tag"]];
}

return items;

Till today n8n was completely happy with getting the tag from “Loop Over Item” :S

Thanks for thinking with me :slight_smile:

What is the error message (if any)?

Er ging iets mis met...

Workflow
NOS

Error
Cannot read properties of undefined (reading 'name')

Last node executed
Add category

Execution URL
https://n8n.golgi.nl/workflow/rXGnabaYnNXEW74N/executions/25425

Stacktrace
TypeError: Cannot read properties of undefined (reading 'name') at standardizeOutputRecursive (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/utils.js:25:35) at standardizeOutput (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/utils.js:31:5) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/Code.node.js:142:47) at processTicksAndRejections (node:internal/process/task_queues:95:5) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:632:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:890:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1224:20

Please share your workflow

Information on your n8n setup

  • n8n version: 1.75.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Synology NAS

Hi - I started to get this exact same error on a code node of mine today only after upgrading to 1.75.2 (I was on 1.74.1 before).

To make things more odd, the workflow and code node that are having problems sometimes work fine when run in test mode (even using the exact state from a failed execution via “Debug in editor”, and I got it to succeed in some cases by renaming the title of the code node.

I haven’t noticed any other workflows failing in the same way.

For reference, here’s my setup:

  • n8n version: 1.75.2
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker on ARM64 AWS EC2
  • Operating system: Ubuntu Linux 22.04.5 LTS / Docker Engine 27.5.1

Here’s the code node that is failing, and the node before it with some pinned sample data. The code node is just sorting a dictionary by the value of a key in each object.

Sentry is configured for my system with a DSN given to me by @netroy

I have a little update!

N8N is investigating this issue in an internal issue after I’ve created almost the same issue on Code node throws "Cannot read properties of undefined (reading 'name')" in version 1.75.2 · Issue #12846 · n8n-io/n8n · GitHub

I believe this has been fixed in #12744 and released in 1.76

1 Like

I have the same issue on version 1.75.2 - When i restart the failed executions, the named error is gone. I hope that the next version is fixing it. Thanks.

Hi @StoneCat

He mentioned 1.76 as the version that it was fixed in, so would be good to update to that version and check if it is solved :wink:

Yes right! Got it. But 1.75.2 is still the latest (stable release) and I hope that version 1.76 will be ready for installation soon.

Thanks. I’ve deployed a 1.76.1 image to test. The workflow in question for me is one that only gets hit a few times a day, so I’ll report back once I have some data.

Things are working consistently enough with my problem workflow now that I’d say the issue is indeed fixed in 1.76 and above, thanks!

1 Like

I have updated my instance to the pre-release version 1.75.2 and since then the error has also disappeared. Positive feedback from me too. Thank you very much!

1 Like

Looks like version 1.76.1 also solved my problem :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.