Help with error please - exec node chromium kiosk

Hi Everyone,
I have been leaving my Pi running for longer periods and I'm seeing that the browser Chromium is crashing. Node Red itself is still up and running and if I point an external browser at it all is good.

The only clue I have is this:
Chromium Error

the line of code inside the exec node is:
DISPLAY=:0 chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:1880/ui -start-fullscreen enable-logging --v=1

If I google the problem there is information which points to increasing the buffer size and other stuff I don't understand.

If anyone could point me in right direction as to how to increase the buffer size please.

I have since connected three msg nodes to the outputs of the exec node and am waiting........

Cheers.
Paul.

What is the memory capacity of your Pi ?

Are you getting the message "Can't update Chromium" in your browser when Chrome crashes ?

Hi @Andrei,
Thanks for responding.
It's a Pi 4B 2Gb. Updated everything to the latest yesterday otherwise running faultlessly.
The problem has been apparent for a few weeks now.

When chromium crashes it just disappears, revealing the Pi desktop.
No other clues apart from the error next to the exec node.

This morning I looked at the Pi screen (directly connected via HDMI) I didn't touch the Pi. I went straight to my desktop PC and connected to the 1880/ui and all is there and working.
I then used 1880/#flow and saw the error as shown above.

Node red was continuing to work as expected. I then connected three msg nodes to the outputs of the exec node. I then did a full deploy. It's all working again, I'm just waiting now hoping to get more info from the msg nodes.

Is there anything wrong with my cmd line?
DISPLAY=:0 chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:1880/ui -start-fullscreen enable-logging --v=1

That's all the info I have.

Hope that's of some use.

Cheers.
Paul.

When I look in - /home/pi/.config/chromium/Crash Reports - as sudo the folder is empty.

Hi Paul, this is very similar to the configuration I use my kiosk applications. The difference is that you start Chromium inside a shell opened by the exec node in Node-RED whereas I open Chromium using the autostart file in the LXDE Desktop environment. Your approach is interesting but I think it is sensitive to the status of the exec session opened in your flow. Anything that breaks your flow will stop the exec session ad will terminate Chrome (for instance a full deploy or if you switch to another project in Node-RED). I don´t have access to a Pi running in kiosk mode right now. I will have a look tonight on how my configuration looks like.

In the exec node have you got Output when Command Complete, or Output as the Command is Running? If you have the former then it will have to buffer all the stdio output until the browser closes, which it never does, which is possibly why you get the overflow. Change the output mode and see what happens.

1 Like

Hi @Colin,
When I change this I get a red circle and an error code -2

Cheers.
Paul.

What is the text of the error. Show Full Message in the three debug nodes and expand the contents.

Hi @Colin,
Here it is.

image

The only message is in the return code.

Cheers.
Paul.

Odd, could you export that flow and paste it here please.

[Edit] Is there no message at all on output 1 or 2?

No other messages.
Sorry I can't remember how to format the code.

[{"id":"3665f925.450a76","type":"exec","z":"e5593c90.29dda","command":"DISPLAY=:0 chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:1880/ui -start-fullscreen enable-logging --v=1","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Kiosk Display","x":370,"y":70,"wires":[["c3c8d968.9e3898"],["9bc4ab56.ff2458"],["ae8236a8.de0d08"]]},{"id":"4ba01b75.94a9e4","type":"inject","z":"e5593c90.29dda","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":180,"y":70,"wires":[["3665f925.450a76"]]},{"id":"c3c8d968.9e3898","type":"debug","z":"e5593c90.29dda","name":"stdout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":40,"wires":},{"id":"9bc4ab56.ff2458","type":"debug","z":"e5593c90.29dda","name":"stderr","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":70,"wires":},{"id":"ae8236a8.de0d08","type":"debug","z":"e5593c90.29dda","name":"ReturnCode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":130,"wires":}]

How to share code or flow json

Yes, you are right, I wonder about the error. I will try a few things. It seems likely that the fact that you are making it buffer the output is responsible for the buffer overflow.

@Colin, Thank you

Just to show I can do it!! :upside_down_face: :wink:

[{"id":"3665f925.450a76","type":"exec","z":"e5593c90.29dda","command":"DISPLAY=:0 chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:1880/ui -start-fullscreen enable-logging --v=1","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Kiosk Display","x":370,"y":70,"wires":[["c3c8d968.9e3898"],["9bc4ab56.ff2458"],["ae8236a8.de0d08"]]},{"id":"4ba01b75.94a9e4","type":"inject","z":"e5593c90.29dda","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":180,"y":70,"wires":[["3665f925.450a76"]]},{"id":"c3c8d968.9e3898","type":"debug","z":"e5593c90.29dda","name":"stdout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":40,"wires":[]},{"id":"9bc4ab56.ff2458","type":"debug","z":"e5593c90.29dda","name":"stderr","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":70,"wires":[]},{"id":"ae8236a8.de0d08","type":"debug","z":"e5593c90.29dda","name":"ReturnCode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":130,"wires":[]}]

Try this as the command
bash -c "DISPLAY=:0 chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:1880/ui -start-fullscreen enable-logging --v=1"

1 Like

Hi @Colin,
Using that in spawn mode seems to work
getting this repeatedly out of stderr. Is it actually an error?
it may be this message which is filling the buffer.

image

I'll reboot everything and let it run.

Thanks for your help.
Cheers.
Paul.

I think it should be -enable-logging if you need that option at all.
I can't test it on a pi as I haven't got one with a desktop version of rasbian, all mine are headless servers.

@Colin

I have removed that option.
Two of these msg's but the main bulk have stopped. There were many per second.
image

I've done some googling and the error is coming from chromium.

Thanks for your help.
I think we may be there.

Good progress you did with @Colin.

I checked the config in my environment and it looks like below. This script is executed when the desktop environment is started. The 5 seconds delay is to allow Node-RED to load the flows and have the dashboard ready.

#!/bin/bash
echo "Starting chromium in 5 seconds..."
sleep 5
chromium-browser   --noerrdialogs --disable-translate  --disable-session-crashed-bubble --start-fullscreen  http://127.0.0.1:1880/ui  &
1 Like

Hi @Andrei,

Is there something after the '&' in your codeline.

Cheers
Paul.