n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
48.47k stars 7.59k forks source link

Error on Rocketchat node on n8n@0.103 #1367

Closed fcollonval closed 3 years ago

fcollonval commented 3 years ago

Describe the bug

After updating from 0.101.0 to 0.103.0, I'm getting the following error in the Rocketchat node for all worflows:

ERROR: Cannot read property 'body' of undefined

TypeError: Cannot read property 'body' of undefined
    at Object.rocketchatApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Rocketchat/GenericFunctions.js:25:28)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

This is also happening with 0.103.1

The workflows were working without problem on 0.101.0

Expected behavior A clear and concise description of what you expected to happen.

RocketChat node is working.

Environment (please complete the following information):

Additional context N/A

fcollonval commented 3 years ago

Ok diving into the JS code the error comes from:

https://github.com/n8n-io/n8n/blob/cc4d6ab02a7da2a94674b3b13793ebf407c4b0c8/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts#L34

It should probably be modified to:

if (error.response?.body?.error) {
RicardoE105 commented 3 years ago

@fcollonval thank you for letting us know. Got fixed. We will let you know when is released.

janober commented 3 years ago

Sorry forgot to update here. Got merged and released a while ago. Please update to the latest version.