Uibuilder not loading anything from index.html

Hello,

somehow my uibuilder got crashed yesterday.
After I saw the puppeteer sent me unupdated screenshot over telegram I rebooted the system via telegram.
According to logs, the system went into several dozen chain reboots and afterwards the uibuilder is giving me theese errors:


As I can see, only the CSS file (where the background image is set) is loaded.

Im running node-red via the packet manager.
For some reason I can't see the start logs. Here is what I'm getting:

8 Feb 19:15:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
8 Feb 19:15:16 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

Debian 11
NodeJS 18
Node-RED 3.1.5
uibuilder 6.8.2

Also, there were some errors with the puppeteer, but I think it's not related as I don't see them when I'm not using it.

Otherwise, the rest of the node-red flow is working normally as I can see in the /home/tomislav/.pm2/logs/node-red-out.log:

9 Feb 08:46:35 - [warn] [function:TH_new] _FW_O_  21 created *************
9 Feb 08:46:37 - [warn] [function:TH_new] _FW_O_  8 created *************
9 Feb 08:46:39 - [warn] [function:TH_new] _FW_O_  20 created *************
9 Feb 08:46:39 - [warn] [function:TH_new] _FW_O_  17 created *************
9 Feb 08:46:42 - [warn] [function:TH_new] _SW_O_  want to create new object at sw_o signal
9 Feb 08:46:42 - [warn] [function:TH_new] _SW_O_  28 created ************* as sw_o
9 Feb 08:46:45 - [warn] [function:TH_new] _FW_O_  11 created *************
9 Feb 08:46:46 - [warn] [function:TH_new] 28 is not there to OUTPUT
9 Feb 08:46:52 - [warn] [function:TH_new] _FW_I_  want to create new object at fw_i= 28 signal
9 Feb 08:46:52 - [warn] [function:TH_new] _FW_I_  creating new obj as fw_o with start table number: 102
9 Feb 08:46:53 - [warn] [function:TH_new] _FW_O_  27 created *************
9 Feb 08:46:57 - [warn] [function:TH_new] _FW_O_  26 created *************
9 Feb 08:47:01 - [warn] [function:TH_new] _FW_O_  25 created *************
9 Feb 08:47:01 - [warn] [function:TH_new] _FW_O_  24 created *************
9 Feb 08:49:39 - [warn] [function:TH_new] _FW_O_  13 created *************
9 Feb 08:49:49 - [warn] [function:TH_new] _FW_O_  11 created *************
9 Feb 08:49:52 - [warn] [function:TH_new] 101 blocked
9 Feb 08:49:54 - [warn] [function:TH_new] 101 un-blocked
9 Feb 08:53:26 - [warn] [function:TH_new] 100 blocked
9 Feb 08:53:28 - [warn] [function:TH_new] 100 un-blocked
9 Feb 08:53:42 - [warn] [function:TH_new] 101 blocked
9 Feb 08:53:44 - [warn] [function:TH_new] 101 un-blocked

Can anyone help please?
I would also like to know why this happened and prevent it in the future

Again, my package.json got messed up.
@TotallyInformation can you explain pls?

What kind of hardware is it? Have you run a disc check to make sure you don't have any corruption after the reboots?

Also, manually check the uibuilder folders to make sure the files are still where you expect them to be.

And finally, check the library manager tab in uibuilder to see whether it has lost track of the installed libraries.

Generic remote PC (some intel i5 + 8gb ram + ssd).
I will check when I have a chance to disconnect it from the remote location and bring it here, because not sure if a complete corruption check can be done when the OS is running.

after I pasted JSON into /home/tomislav/.node-red/uibuilder/package.json everything works and all packages are where they need to be and installed.

Is it normal for a package.json file to be in all of these folders?
/home/tomislav/.node-red/uibuilder/SUNAMA
/home/tomislav/.node-red/uibuilder/
/home/tomislav/.node-red/
/home/tomislav/

It is still unclear why the one in uibuilder is being messed up after several reboots.
This is what was in there:

{
  "name": "uib_root",
  "version": "6.8.2",
  "description": "Root configuration and data folder for uibuilder",
  "scripts": {},
  "dependencies": {},
  "homepage": "",
  "bugs": "",
  "author": "",
  "license": "Apache-2.0",
  "repository": "",
  "uibuilder": {
    "packages": {}
  }
}

Yes. :grinning: Well, apart from the bottom one, that just means that, at some point, you installed an npm package there (probably in error).

uibuilder has one because that's where all of the front-end libraries are tracked.

Your uibuilder instance root folder (the 1st in the list) has one because you can install (mostly for development use) packages there as well.

.node-red is where its contributed nodes are installed to.

I think you've hit an edge-case that I'm aware of but cannot reproduce. It has only happened a few times. In rare cases, the uibuilder/package.json looses track of the installed libraries. I think in this case, it could be a race condition where it had started to update but then the reboot happened. So it doesn't get a chance to reset. I need to look at that part of the processing again. Maybe I can do a safer process.

Thank you. In the meantime, I will try to reproduce it. Last time I overwhelmed the uibuilder with so many writes it chain-rebooted indefinately until I got to a remote location and pulled out the incomming LAN cable.

It would help if I can find some linux logs to explain the reboots.

Hmm, I don't think that should happen. Implies a poorly trapped error somewhere. Please do let me know if you hit issues like that as uibuilder should generally be rock solid.

I do regularly re-work old code as my knowledge and understanding grows. In particular, over the last few years, I've been gradually breaking up the formally monolithic code into separate classes and then breaking down each class into structured methods. A slow process but one that is certainly improving things.

My current focus is on moving all filing system access into a separate class. With a view to removing the dependency on the 3rd party fs-extra library, having all fs access in one place for easier maintenance, and driving out a few more bugs along the way. It might also make it possible in the future to replace the class with one that uses a virtual filing system to allow uibuilder to be used on platforms that don't provide a real one.

1 Like