Node-Red UI elements not updating on some browsers

I have a UI that I have created that is simply two button nodes. Depending on a signal derived from an IOT device the button changes its label and background color. Everything works as it should usually but I have noticed that it doesnt always react as expected. Sometimes the background color will change and not the label and vice versa. I have also noticed that it is not consistent accross browsers. I can have the UI pulled up on different devices and see different results on each. One usually works as expected and sometimes the other does not. Not always the same one acting up though. I have found that refreshing the page usually takes care of it. Refreshing the page, at least manually, is not really an option as some of these displays are Andon-type signage and we depend on them to update correctly in real time. Any ideas on what might be happening here, possible fixes, workarounds, etc???

What version of node-red, node.js and node-red-dashboard?
What browsers show the issue and which work?
Can you reproduce it at will?
Does to occur if you use an inject instead of the iot device?
Can you reproduce it in a small flow?
Any errors showing in the. NR log?
Have you tried a browsers developer mode to see if any errors are showing?

2 Likes

Node.js version 10.16.3
Node Red version 0.20.8
node-red-dashboard version 2.16.2

It seems completely random so I don't think I can reproduce at will or in a small flow consistently.

It is polling an OPCUA server using the OPCUA-II0T-Inject node, which normally polls every second, which I can trigger manually from node-red and it does not resolve the behavior.

Browser 1: Chrome for android Version 74.0.3729.112
Browser 2: Chrome for Windows 10 Version 76.0.3809.132

I will be updating the android browser and trying again tomorrow but the problem is not consistently with one device, it seems to bounce back and forth between the two and NEVER seems to occurs on the both devices at the same time, though I am sure that is probably a coincidence.

I will check tomorrow to see if any errors in NR.

I have not tried developer mode yet. Will test this tomorrow also.

are you accessing the dashboard via two browsers at the same time?

msg coming from ui elements have a msg.socketid - if these are then used and sent on to other widgets - they will only get sent to the original socketid - eg so a tab change on one browser won't affect another. If you want the update to go to all you need to use a change node to delete the msg.socketid. That may explain what you are seeing if you are using multiple browsers at the same time.

Yes


zenofmud

19 September

scorbin:
I will be updating the android browser and trying again tomorrow but the problem is not consistently with one device, it seems to bounce back and forth between the two and NEVER seems to occurs on the both devices at the same time, though
I am sure that is probably a coincidence.

are you accessing the dashboard via two browsers at the same time?

Ok I tried deleting the msg.socketid coming from the UI elements. It does not seem to help. Actually I can verify the messages are reaching the UI browser elements.

So the flow is like this..

Read value from OPC server --> if value 0 then --> change node sets msg.background to "Green" and msg.label to "OK"

--or--

Read value from OPC server --> if value 1 then --> change node sets msg.background to "Red" and msg.label to "Not OK"

I know the message is being received by the UI Elements because the background color ALWAYS changes appropriately but the label often does not. Considering losing the label altogether at this point.