Uibuilder - who is connected?

Hi @TotallyInformation

I was looking at my uibuilder node the other day and noticed there were 27 connections, so I went and closed down all the chrome browsers on my pc's pointing to my uibuilder pages and also closed down A LOT of open pages on my mobile phone that were tabbed but "hidden".

After all this there were still 8 connections remaining. Any ideas on how to determine what is connected to uibuilder?

An IP address would be very helpful, but I'm not really sure what's possible.

In case it makes any difference and perhaps to your great disappointment I am still on v2.0.8 :wink:
I upgraded to your latest version a couple of weekends ago and my pages didn't work. It could be that one line fix I had to put into your code ages ago to get page refreshes to work on pages that are not the default page, but either way, I didn't have time to figure out why, so I reverted to v2.0.8, and tbh I don't really know what I'm missing. I love uibuilder just the way it is. This could be a case of gross ignorance on my part, but I'm blissfully unware as it stands.

Hmm, some good questions there. :slight_smile:

Re who is connected, that is certainly an interesting question.

When a user connects to a uib node, some trace logs occur, you can increase your logging level to show those - I find it best to have a custom logger as mentioned in a recent thread. However, that does not show the IP address of the connected user.

With v2, I think that your best bet is to use one of the middleware capabilities that will let you log connections. Of course, that won't help with what is connected now but it would let you trace connections in the future. You should be able to use the socket.io middeware function which gets a significant amount of information on a client connection, you should be able to see the client IP address there. Sorry, I don't remember the details as I don't use it generally.


In terms of upgrading, what version of Node.js are you on? You now need at least v12, you also need to be on a recent(ish) version of Node-RED, certainly more than v1.0.

There are also several breaking changes between v2 to v3 and v3 to v4. They are listed in the changelogs. Mostly they relate to Node.js and Node-RED version dependencies though.

Otherwise, I'm happy to work through with you what is happening. You can use the trace loggin capabilities of the Node-RED log and you can turn on debug reporting in the front-end as well which will let you see a bit better when errors are happening.

It may be enough to restart Node-RED, reload the editor page and maybe to open your uib nodes, press Done on them and redeploy. Then, when opening a uibuilder web page, do a ctrl-f5 on your browser to force-reload all assets. You probably don't need all of those things but they can't hurt anyway.

I do recommend having a separate instance of Node-RED running to enable you to do major version tests - not only for uibuilder but also for node-red (that requires having a local instance of node-red, see my alternate installer for ideas on that). Then you can copy flows over and safely test them without disrupting your live flows.

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