Dashboard (DB1)- Not working when run as windows Service

Continuing the discussion from Dasboard does not display correctly when node-red is started as a windows service:

I have exactly similar issue. when run at command prompt works OK. when run as a service only part of the dashboard is seen. no major errors shown in console.

I copied a working flow from one pc to another and when the flow is run through service (nssm) part of dashboard (only ui-table) is shown and in light mode, where as the setting is dark mode and have few other simple dashboard widgets which are not shown.

considering the above information,

I did some elimination process and found that the instant I add

node-red-node-ui-table

the dashboard starts behaving erratic. i.e,

all the other dashboard widgets vanish, theme becomes light, and i can see only the ui-table widget in the dashboard.

image

when i uninstall this and restart node-red it is all ok. version 0.4.3 also has same effect and 0.4.4 is the latest version available)

while i understand DB-1 is not supported anymore, i just want to understand what is happening here.

Can you check for errors and warnings when viewing the db1 page in your browser's dev tools please. It will hopefully give some clues as to what is happening.

I am not sure, if this is what you want. I also opened the page with 10.xx.xx.xx/ui but the result is same.

Hmm, websocket connection failed looks bad. Not clear what has caused it though.

I am fairly confident it is when i use ui-table node, if i remove that widget and restart, everything looks fine.

when i click on the websocket error link, it takes me here

Raw websockets are hard to debug. What is providing the websocket.js file? You may get clues from the folder structure that you haven't shown - to the left

this ?

Ah, right - it comes from Socket.IO as expected. Odd, I'm quite familiar with Socket.IO.

In the console error message, can you expand that error and share the trace so we can see where it originates?

Also, what version of node.js & node-red & dashboard 1 is this? Also, what browser and version?

C:\Users\oee.ldh>node --version && npm --version
v20.18.1
10.8.2
Welcome to Node-RED
===================

10 Dec 13:21:23 - [info] Node-RED version: v4.0.5
10 Dec 13:21:23 - [info] Node.js  version: v20.18.1
10 Dec 13:21:23 - [info] Windows_NT 10.0.26100 x64 LE
10 Dec 13:21:23 - [info] Loading palette nodes
10 Dec 13:21:24 - [info] Dashboard version 3.6.5 started at /ui
10 Dec 13:21:28 - [info] Settings file  : c:\users\oee.ldh\nr-dt\settings.js
10 Dec 13:21:28 - [info] Context store  : 'default' [module=memory]
10 Dec 13:21:28 - [info] User directory : c:\users\oee.ldh\nr-dt
10 Dec 13:21:28 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Dec 13:21:28 - [info] Flows file     : c:/users/oee.ldh/nr-dt/flows.json
10 Dec 13:21:28 - [info] Server now running at http://127.0.0.1:1882/
10 Dec 13:21:28 - [warn] 

Sorry, out of ideas. Everything seems OK to me but I don't really use Dashboard,

ts alright. This now forces me to permanently move to DB2 (or Uibuilder :slight_smile: )
Only sad thing is that i couldn't still find a replacement for ui-statetrail by @hotNipi

I couldn't possibly reasonably say that this will be your best approach - even if it is. :smile:

I have looked into this several times now and even started to try and create a web-component version that would be useable by both Dashboards, UIBUILDER and other frameworks and tools as well. Sadly, it is just a bit too complex for me to work on right now.

I do sincerely wish that more people would work on web component solutions that work universally rather than solutions that only work in the current generation of a single framework.

I do still think that using the chartjs (with ui_template so it can be configured to do so) it is possible to create something close enough to the state-trail. It of course depends what are the features you are definitely need from that widget ...

When I run the same flow from command-prompt (as against from windows-service)
this error doesn't show up.

Yes, it is clearly some kind of hidden permissions issue I think. I just can't work out what.

Something you could try though. Change your service start-up to use your user account instead of the SYSTEM account. Better still, install Node.js as a user install under a new users then install Node-red locally rather than globally to the same user. Then you can run everything under that user. This is much more like the standard way of running under LINUX.

with ui-template node, i was able to generate a 'state-trail' look alike, but i get stuck at the 'on click' portion. (to do with javascript ?)
what i am using this is basically to get the user click on the 'red' part of the bar and record the downtime reason. the clicking triggers a dropdown allowing user to choose the 'downtime' reason.

will put this on backburner right now, I need to fix the broken dashboard and quickly get the site up and running, since i postponed the migration for quite long now, i will need more time on understanding. thanks to you, part of my dashboard is already on ui-builder the live display part (it was easy as you told me my input was already pure html/css, so was easy to switch)
the next part is trickier as this involves user interaction (javascript!)