Problems using nod-red-node-dweetio

#1

I'm using Dweetio node on my Win10 machine and its often causing Node-RED to fall over and fail

this is my most recent failure

12 Apr 16:43:30 - Error: not opened
    at WebSocket.send (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\WebSocket.js:181:16)
    at WS.send (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transports\websocket.js:107:22)
    at WS.Transport.packet (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transport.js:178:10)
    at WS.payload (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transports\websocket.js:120:12)
    at Socket.flushBuffer (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\socket.js:327:20)
    at Socket.setBuffer (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\socket.js:314:14)
    at Socket.onConnect (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\socket.js:409:14)
    at WS.Transport.onConnect (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transport.js:139:17)
    at WS.Transport.onPacket (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transport.js:91:12)
    at WS.Transport.onData (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transport.js:69:16)
    at WebSocket.websocket.onmessage (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\socket.io-client\lib\transports\websocket.js:73:12)
    at WebSocket.onMessage (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\WebSocket.js:355:18)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver.self._receiver.ontext (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\WebSocket.js:682:10)
    at Receiver.finish (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\Receiver.js:391:14)
    at Receiver.expectHandler (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\Receiver.js:378:31)
    at Receiver.add (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\Receiver.js:87:24)
    at TLSSocket.firstHandler (C:\Users\Simon\.node-red\node_modules\node-dweetio\node_modules\ws\lib\WebSocket.js:663:22)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

I'm wondering if it needs a bit more internal error checking to prevent Node-RED failing overall

0 Likes

#2

Sounds like it does...
It hasn't been touched for ages... - the underlying library is over 4 years old and uses a socket.io version 0.9 when they are now up to 2.2 - so it's unlikely to get updated, but as that is the official library from the company that own dweet it may be worth asking them if they do still want to maintain it.
As the error is being thrown asynchronously there's not much we can do to catch it. There is already a try catch around the send routine and as you can see from your error it's not getting caught.

1 Like

#3

Ta for info - I'll just remove it

0 Likes