Unable to send numbers through websockets

Hello everyone!

I was playing around with websockets and made a simple flow that worked, it consists in receiving every second a timestamp and a button that when is pressed it send th word "prueba" as payload. Then for some reason i changed the payload from "prueba" to "123" and when i press the button it shuts down the WS connection and all across the dashboard the "connection lost" sign pops up, so i'm a little confused by this. What am i doing wrong?

pastebin to the flow!

PD: Sorry if this is not the place to ask this kind of questions!

you have configured the websocket to send the entire msg object. This affects both in and out - so it is expecting a properly formed msg object to be sent from the browser button click. You are sending number and it is causing it to break. So yes it's a bug as we shouldn't break that badly...
The easy fix (for now) is to set it to send payload only.

1 Like

i saw that if i send the value as an object like this:

var value = {"value":123};
connection.send(JSON.stringify(value));

It works just fine