🎉 Node-RED 4.0 released

Start it with node-red-start and it will give you more information about the problem.

Thanks Colin for your response.

Currently I have v3.1.11 successfully installed.
I tried to do the same on a Raspberry Pi 3B+ and also on this device I wasn't able to update NodeJS to v20. This however gave more information.

Running Node-RED update for user pi at /home/pi on raspbian

node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node) node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node)

it did not install node20. I rerun the command with node18 and that successfully installed Node-RED version 3.1.11.

So I think that the GLIBCXX_3.4.26 is the (missing) issue. I still use Rasbian Buster.
So probably an OS upgrade will bring us some steps further.

Regards

To install nodejs 20 add --node20 to the node red install script.
Make sure you first run
sudo apt install build-essential
as mentioned on the Running on a Pi page.

Colin,

build-essential has already been installed.
See

sudo apt install build-essential

Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.6).
build-essential set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So this will not help much.

I really think that the OS (Buster) should be upgraded to Bullseye and Bookworm.
Will need some time for that, as I have multiple Pi's and want them all on the same level.

Regards

:

It should be fine with buster, though upgrading is probably a good idea anyway as buster is out of support. If you want to work out why it is not working, show us the install log.

Colin,

The install log of v4.0.0 is not available anymore as I already installed 3.1.11 on the same machine. Installation of 4.0.0 looked successful as it did not show any error during the installation. And the start-up log has been shown in my first post.

To which it was suggested that you delete the corrupt file.
Then I asked for the result of
node-red-start
Which I think you have not provided. Though I am on my phone so I may have missed something.

Edit: sorry the first one wasn't you was it.
node-red-start is what we need.

After update from 3.1.8 to 4.0 I have this problem ....

This is the function (test) ....

to have this array (the array comes from a flow variable)

due

and with split and join node I had one string like:

10:30 MOV - 10:30 MOV - 10:30 MOV

Now I get nothing .....

Join node don't work ?

If you are able, please select those 6 nodes and CTRL-E to export them.
Click "Copy to clipboard"
In the forum click the </> button and CTRL-V to paste.

So much easier than trying to replicate pictures for anyone prepared to advise you, and surely easier for you than capturing, cropping and pasting five screen captures.

Flow

[{"id":"262a06c7.d1a87a","type":"inject","z":"3216101a652f0ea9","name":"at set time","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":300,"wires":[["e90ce60a6dc974b5"]]},{"id":"7e06057b.d1b80c","type":"debug","z":"3216101a652f0ea9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":360,"wires":[]},{"id":"e90ce60a6dc974b5","type":"function","z":"3216101a652f0ea9","name":"function 13","func":"msg.payload = flow.get(\"hold\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":300,"wires":[["7e06057b.d1b80c","d1475eb351408ccd"]]},{"id":"fb44dce01fbd722e","type":"debug","z":"3216101a652f0ea9","name":"debug 387","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":300,"wires":[]},{"id":"d1475eb351408ccd","type":"split","z":"3216101a652f0ea9","name":"","splt":"","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"payload","x":510,"y":300,"wires":[["9ccd7d10399b1ba2","8ca50b0b593537a2"]]},{"id":"8ca50b0b593537a2","type":"join","z":"3216101a652f0ea9","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"-","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":690,"y":300,"wires":[["fb44dce01fbd722e"]]},{"id":"9ccd7d10399b1ba2","type":"debug","z":"3216101a652f0ea9","name":"debug 389","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":240,"wires":[]}]

I see that your Join node is in manual mode because you want the output as a string rather than recreating the input array.

In manual mode you need to specify how to tell that all of the input messages have arrived.
Choose one of the three options "After a number of message parts" (If the input array always has the same number of elements), "After a timeout..." (Does cause a slight delay), or "After a message with the complete property set".

This is not new for Node-red v4.
Edit - I seem to be wrong again, NR4 does behave differently.

Sorry, but this function worked in my project for a long time and has stopped working this morning after the node red update ....

Hmm I managed to find a machine running v3.1.9 and you are right.
I was certain it wouldn't do that...

There was a change to the split (and join) node for let split node specify property to split on, and join auto join correctly

I can't work out if that's the cause of this change in the split/join behaviour.

It looks like a bug to me?

Please raise an issue with the example flow.

Issue raised: https://github.com/node-red/node-red/issues/4781

1 Like

Actually it was a "fix" introduced here - Fix join node to ignore parts in manual mode by dceejay · Pull Request #4408 · node-red/node-red · GitHub - otherwise when in manual mode it would sometimes (as-in this case) - not behave like it was under user control.

Into the join node (manual mode) I entered 1 second of timeout and now the node works fine.
I don't know if is correct but works ....

I think that's a valid work-around in this case but I've always been uneasy about it because

  • It is an unnecessary delay. If the flow is processing toggling a switch in response to a button press, a 1 second delay is a long time.
  • If different message parts get processed differently, who knows how long one might be delayed?
  • It's not a real-time operating system. There may be indefinite (short) delays while the CPU's attention is elsewhere.
  • If a message does get missed from the join node output, will the corruption cascade down to the next batch of messages too?

I assume that the old version of the node must have maintained a table of message parts and indices as they are processed. I can't identify this in the changelog though.

1 Like

Today I took another attempt to install NR 4.0.0 on a Raspberry Pi 1B.
OS: Raspbian Buster
NodeJS v18
Upgrade from NR 3.1.11

Upgrade looks successful, but starting NR with node-red-start gives the following error:

pi@RPi1:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.10.51:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
nodered.service: Main process exited, code=killed, status=4/ILL
nodered.service: Failed with result 'signal'.
nodered.service: Service RestartSec=20s expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 1.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
nodered.service: Main process exited, code=killed, status=4/ILL
nodered.service: Failed with result 'signal'.

Another attempt on a Raspberry Pi 3B+
OS: Rasbian Buster
NodeJS 18

NR 4.0.0 installed successful and is running.

Conclusion: It runs on a Rasberry Pi 3B+ with Buster OS and NodeJS 18, but not on a Raspbeery Pi 1B with the same OS and NodeJS.
Updating to NodeJS 20 is not possible, because `GLIBCXX_3.4.26 is not available in the Buster repo..

Has anyone an idea, what is causing

nodered.service: Main process exited, code=killed, status=4/ILL
nodered.service: Failed with result 'signal'.


Maybe the RAM :man_shrugging: