ERROR: Cannot read properties of undefined (reading 'name')

Cannot read properties of undefined is a generic error, and it’s likely that this is caused by some other part of the code.
To be able to fix this we’d need the full stack-trace. If you want, I can send you a Sentry key, that you can set on your deployment, and when this error happens next, we’ll have the stack trace and we can then easily fix this.
Let me know if you are willing (and have access) to set an additional env variable on your n8n deployment. I can send the key over in a direct message.