CoAP in Node-RED "Error:getaddrinfo ENOTFOUND" (node-red-contrib-coap)

So, I want do an application for my university IOT project and I decided to use node-red, but I'm having some issues specifically with the protocol CoAP in node-red and I don't know the cause.
The problem is that, I can't connect to my server with the request node from (node-red-contrib-coap) and this doesn't make sense to me because (node-red-contrib-coap) it's based on Matteo Collina's [node-coap] for node.js and with Matteo Collina's [node-coap] I used an identical script, but of course for node.js and I can connect normally to my server and receive a response, even with a python application I can do the same, so I really don't know why this is only happening on node-red (node-red-contrib-coap) ...

The error:
"13 Apr 06:40:04 - [info] [coap request:coapAC09] TypeError: The "chunk" argument must be one of type string or Buffer. Received type number
13 Apr 06:40:04 - [info] [coap request:coapAC09] client error
13 Apr 06:40:04 - [info] [coap request:coapAC09] Error: getaddrinfo ENOTFOUND [bbbb::12:4b00:2f4:ac09]
13 Apr 06:44:11 - [info] [coap request:coapAC09] Error: No reply in 247s"

The request node configuration:
WhatsApp Image 2022-04-13 at 08.07.57

The script in node.js (works fine):

const coap = require('coap')
const req = coap.request({hostname:'bbbb::12:4b00:2f4:ac09', pathname:'/d'})
//const req = coap.request('coap://[bbbb::12:4b00:2f4:ac09]/d') this works as well

req.on('response', (res) => {
  res.pipe(process.stdout)
})

req.end()

Hi @lOcszp, thanks again for reporting this issue! Version 0.7.3 should have fixed the issue, have you been able to try it out, yet? :slight_smile:

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