Typeerror: send is not a function

Hello everyone,

I face the typerror in node red when connect with ubidots.
How to solve this problem?

Kind of hard to help when you don't include the flow, the actual name of the node (i.e. node-red-contrib-???) or at least a image of what you have configured in the ubibots node.

Ubidots uses a different kind of node format, these are their official nodes: https://flows.nodered.org/node/ubidots-nodered
As the error you're seeing comes from the in node that doesn't take any user input to get there, this is likely a bug in the node. From a perspective of node developer, the send function is related to sending out messages from a node, so that shouldn't be related to any input in the properties of that node. Can you check the palette (Hamburger menu aka 3 dashes top right -> manage palette -> installed nodes -> ubidots-nodered) to see what the version is of this node that you use, as well as the version of your node-red install (same hamburger menu, the version on the bottom of that menu).

What I think is happening here is that you use a Node-RED version before 1.0.0, and that the following lines of code are hit:


The original format of this on-input function was just the msg property, and send and done were added in 1.0.0 to Node-RED. To create compatible code, as a developer you add a few lines here to check if send and done are passed as arguments to the function, and if node use the old syntax to do the same.
In practice, it means that the current version of this node is only compatible with Node-RED installs of 1.0 and later.

I just dived in the git history, version 1.2.0 was still compatible with versions below Node-RED 1.0.
It got added by this commit and wasn't noticed in the extensive code review as part of the pull request. In other words, this is a bug, and should be reported to the ubidots node-red issue page.

2 Likes

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