FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
205 stars 49 forks source link

Text widget not updated on network reconnection. Also other nodes affected by the same problem I think #1115

Open colinl opened 3 months ago

colinl commented 3 months ago

Current Behavior

If a text node is updated during a network outage, so the client has lost contact with the server, then on re-connection the displayed text is not updated.

I think this could be considered a serious issue as there is no indication that the node has lost contact with reality. Consider for example if the display was showing alarm status information. If the network fails for a short while, such as a router reboot possibly, and during that time an alarm occurs, the client will see no indication of the alarm.

Expected Behavior

When the network reconnects the display should be updated to show the latest text.

Steps To Reproduce

Connect two inject nodes to send different text to a Text widget. View the dashboard on a separate machine. Disconnect the network and wait for the Connection Lost message. Inject the alternative text and reconnect the network. The connection recovers but the text shown remains as it was. Refreshing the page shows the new text.

Environment

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

kaushalkumarjoshi commented 3 months ago

I am also facing same issue. If ui-event can generate a message for reconnection, a refresh can be triggered from the flow as a workaround.

arturv2000 commented 3 months ago

I am also facing same issue. If ui-event can generate a message for reconnection, a refresh can be triggered from the flow as a workaround.

In this case, if you use ui-control will receive a message with:

{"payload":"connect","_client":{"socketId":"DNJkHm6b7I-daCidAAA7","socketIp":"192.168.1.79"},"_msgid":"bcea0cbb67aa93d3"}

Shouldn't be really necessary, but it is a possible workaround.

ppielorz commented 3 months ago

I'm also facing this issue which is especially annoying when I'm using Dashboard as mobile app (in my case on iOS). It disconnects almost every time when the app is closed. Workaround with refresh triggering using ui-control is working fine.

kaushalkumarjoshi commented 3 months ago

I am also facing same issue. If ui-event can generate a message for reconnection, a refresh can be triggered from the flow as a workaround.

In this case, if you use ui-control will receive a message with:

{"payload":"connect","_client":{"socketId":"DNJkHm6b7I-daCidAAA7","socketIp":"192.168.1.79"},"_msgid":"bcea0cbb67aa93d3"}

Shouldn't be really necessary, but it is a possible workaround.

I haven't checked it yet but combined with rate limiting this can be a good workaround. Thanks