Node-red Crashing- Could it be node-red-contrib-cast


Hi, for the last several days node-red has been crashing throughout the day. I have not updated any node nor am I showing any nodes need to be updated. below is the log that shows when I start node-red up until it crashes. Based on the information below, my assumption is that the problem node is node-red-contrib-cast, but I'm not sure, since I have never had a problem until now.


Welcome to Node-RED

15 Oct 05:48:40 - [info] Node-RED version: v0.19.4
15 Oct 05:48:40 - [info] Node.js version: v8.12.0
15 Oct 05:48:40 - [info] Windows_NT 10.0.17134 x64 LE
15 Oct 05:48:44 - [info] Loading palette nodes
15 Oct 05:48:45 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See module.js:653:30
15 Oct 05:48:49 - [info] RedBot version: 0.15.3 (node-red-contrib-chatbot)

15 Oct 05:48:51 - [info] Dashboard version 2.9.8 started at /ui
15 Oct 05:48:51 - [warn] nodes/core/io/lib/mqtt.js is deprecated and will be removed in a future release of Node-RED. Please report this usage to the Node-RED mailing list.
15 Oct 05:48:51 - [warn] nodes/core/io/lib/mqttConnectionPool.js is deprecated and will be removed in a future release of Node-RED. Please report this usage to the Node-RED mailing list.
15 Oct 05:48:51 - [warn] ------------------------------------------------------
15 Oct 05:48:51 - [warn] [node-red/tail] Not currently supported on Windows.
15 Oct 05:48:51 - [warn] ------------------------------------------------------
15 Oct 05:48:51 - [info] Settings file : \Users\unpue.node-red\settings.js
15 Oct 05:48:51 - [info] HTTP Static : C:\Users\unpue\public
15 Oct 05:48:51 - [info] Context store : 'default' [module=memory]
15 Oct 05:48:51 - [info] User directory : \Users\unpue.node-red
15 Oct 05:48:51 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Oct 05:48:51 - [info] Flows file : \Users\unpue.node-red\flows_WR-DESKTOP.json
15 Oct 05:48:51 - [info] Server now running at
15 Oct 05:48:51 - [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.

15 Oct 05:48:51 - [info] Starting flows
15 Oct 05:48:51 - [info] [yeelight-compat-hue-config:WR Table Lamp Color] Connecting to Yeelight
registering node 4b8837cc.54ae58
registering node edb65760.c04638
registering node 7bdac50c.e20ffc
registering node ab3756e.79497a8
15 Oct 05:48:52 - [error] [] No credentials set for pushbullet config.
15 Oct 05:48:52 - [info] Started flows
15 Oct 05:48:52 - [info] [mqtt-broker:Win-Mosquitto] Connected to broker: mqtt://
15 Oct 05:48:52 - [info] [yeelight-compat-hue-config:WR Table Lamp Color] Connected to
15 Oct 05:50:54 - [info] [exec:Doorbell] error:Error: Command failed: curl "" on
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28 0 28 0 0 28 0 --:--:-- --:--:-- --:--:-- 77
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0curl: (6) Could not resolve host: on

15 Oct 07:06:09 - [warn] [mytimeout:Timer] L495: newMsg(inMsg): RangeError: Maximum call stack size exceeded <{"payload":{"domain":"light","service":"turn_on","data":{"entity_id":"light.master_bedroom_level"}},"_msgid":"2edeb051.06437","domain":"light","service":"turn_on","data":{"entity_id":"light.master_bedroom_level"}}>
15 Oct 07:07:21 - [warn] [mytimeout:My Timeout] L495: newMsg(inMsg): RangeError: Maximum call stack size exceeded <{"payload":{"domain":"switch","service":"turn_on","data":{"entity_id":"switch.arellys_bedroom_light_switch"}},"_msgid":"f535a518.a249f8","domain":"switch","service":"turn_on","data":{"entity_id":"switch.arellys_bedroom_light_switch"}}>
15 Oct 07:17:06 - [warn] [mytimeout:My Timeout] L495: newMsg(inMsg): RangeError: Maximum call stack size exceeded <{"payload":{"domain":"switch","service":"turn_on","data":{"entity_id":"switch.andrews_bedroom_switch"}},"msgid":"1137c255.0bbd7e","domain":"switch","service":"turn_on","data":{"entity_id":"switch.andrews_bedroom_switch"}}>
15 Oct 07:22:46 - [red] Uncaught Exception:
15 Oct 07:22:46 - ReferenceError: node is not defined
at client.launch (C:\Users\unpue.node-red\node_modules\node-red-contrib-cast\cast-to-client.js:73:13)
at C:\Users\unpue.node-red\node_modules\castv2-client\lib\senders\platform.js:95:20
at C:\Users\unpue.node-red\node_modules\castv2-client\lib\controllers\receiver.js:51:14
at fn.onmessage (C:\Users\unpue.node-red\node_modules\castv2-client\lib\controllers\request-response.js:27:7)
at emitTwo (events.js:131:20)
at fn.emit (events.js:214:7)
at Channel.onmessage (C:\Users\unpue.node-red\node_modules\castv2-client\lib\controllers\controller.js:16:10)
at emitTwo (events.js:126:13)
at Channel.emit (events.js:214:7)
at Client.onmessage (C:\Users\unpue.node-red\node_modules\castv2\lib\channel.js:23:10)
at emitMany (events.js:152:20)
at Client.emit (events.js:224:7)
at PacketStreamWrapper.onpacket (C:\Users\unpue.node-red\node_modules\castv2\lib\client.js:81:10)
at emitOne (events.js:116:13)
at PacketStreamWrapper.emit (events.js:211:7)
at TLSSocket. (C:\Users\unpue.node-red\node_modules\castv2\lib\packet-stream-wrapper.js:28:16)
at emitNone (events.js:106:13)
at TLSSocket.emit (events.js:208:7)
at emitReadable
at emitReadable (_stream_readable.js:507:7)
at addChunk (_stream_readable.js:274:7)
at readableAddChunk (_stream_readable.js:250:11)


You might want to edit out your email address contained in your log message that you pasted.

Yes the cast node is causing the crash, you should open an issue against the node on the nodes github page (follow the link from the nodes page on )

But there are also several other issues in your log. One is the warning about using a mqttconnectionpool as this file will be removed in a future version of node-red. Which nodes (other than the included mqtt ones) are you using that use mqtt?


I've had exactly the same issue with 'Cast' crashing my RPi - I've given up using it and deleted the node.


Darn, missed that just fixed it.

I will submit the issue shortly.

I only have and use the included ones, I checked to be sure and it is the one in my palette! I just check to see if there was an update but saw none.

I guess I'll go and report that issue as well.

@dynamicdave, this is the first problem I've had with this node, it was working well for the last month and there hasn't been an update since them. May I ask what are you using in its place?


It's an inherited issue from node-red-contrib-chromecast which really needs sorting.
I highlighted this in a previous post, and raised an issue here.

This potentially could be a popular contrib-node, as it engages node-RED with Google Home & Chromecast which is a common forum request.

Any help with error handling would really benefit the community...



Thank you @Paul-Reed, just read your other article, unfortunately, I don't know how to program (may be a good time to learn :slight_smile: ), for now, I'm moving back to exec node along with LANnouncer, unless someone has an alternative.


I have changed several. Can you please check the newest Version 0.1.0?


Hi @Hypnos, left you feedback at github. Basically it hasn't crashed but the error is now showing up on the debug screen in node-red and it is different than the original one I posted.