# Error starting subflow

**URL:** https://discourse.nodered.org/t/error-starting-subflow/66499
**Category:** General
**Created:** [16 August 2022 13:14 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499 "2022-08-16T13:14:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vajonam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vajonam/32/36588_2.png) [@vajonam](https://discourse.nodered.org/u/vajonam)
#### Post date: [16 August 2022 13:14 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499/1 "2022-08-16T13:14:06Z")

</div>

I am using node-red with home assistant and during a recent upgrades it caused node-red to start crashing. looking at the logs I found this error I couldn't get rid of. Not sure where to look the stack trace points to Subflow a not being able to start, but what should I look for in there? functionally everything seems to be working.

```auto
TypeError: Cannot read properties of undefined (reading 'id')
    at /opt/node_modules/@node-red/runtime/lib/flows/Subflow.js:209:140
    at Array.map (<anonymous>)
    at /opt/node_modules/@node-red/runtime/lib/flows/Subflow.js:209:95
    at Array.map (<anonymous>)
    at Subflow.start (/opt/node_modules/@node-red/runtime/lib/flows/Subflow.js:209:62)
    at Flow.start (/opt/node_modules/@node-red/runtime/lib/flows/Flow.js:224:41)
    at start (/opt/node_modules/@node-red/runtime/lib/flows/index.js:394:33)

```

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [16 August 2022 13:47 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499/2 "2022-08-16T13:47:22Z")

</div>

Exactly what version of Node-RED have you got? Check the bottom of the main menu in the Node-RED editor - the home assistant packaging uses different version numbers to those we use.

---

<div class="post-metadata">

### Author: ![vajonam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vajonam/32/36588_2.png) [@vajonam](https://discourse.nodered.org/u/vajonam)
#### Post date: [16 August 2022 14:28 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499/3 "2022-08-16T14:28:18Z")

</div>

Running 3.0.2. and HA-Addon version is 13.3.1

---

<div class="post-metadata">

### Author: ![vajonam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vajonam/32/36588_2.png) [@vajonam](https://discourse.nodered.org/u/vajonam)
#### Post date: [16 August 2022 14:51 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499/4 "2022-08-16T14:51:12Z")

</div>

bit more trace logging if that helps identify which flow/node is causing me grief.

```auto
16 Aug 09:33:13 - [trace] [flow:7c8450cf.91f9] start flow [7c8450cf.91f9]
16 Aug 09:33:13 - [debug] [ha-entity:44178828.588e18] instantiated node, name: undefined
16 Aug 09:33:13 - [debug] [trigger-state:bfeb6b2b.d41298] instantiated node, name: undefined
16 Aug 09:33:13 - [debug] [api-call-service:Notify iOS] instantiated node, name: Notify iOS
TypeError: Cannot read properties of undefined (reading 'id')
    at /opt/node_modules/@node-red/runtime/lib/flows/Subflow.js:209:140
    at Array.map (<anonymous>)
    at /opt/node_modules/@node-red/runtime/lib/flows/Subflow.js:209:95
    at Array.map (<anonymous>)
    at Subflow.start (/opt/node_modules/@node-red/runtime/lib/flows/Subflow.js:209:62)
    at Flow.start (/opt/node_modules/@node-red/runtime/lib/flows/Flow.js:224:41)
    at start (/opt/node_modules/@node-red/runtime/lib/flows/index.js:394:33)
16 Aug 09:33:13 - [debug] [ha-entity:fa441d9e.1b4cc] instantiated node, name: undefined
16 Aug 09:33:13 - [debug] [api-call-service:Alphrad] instantiated node, name: Alphrad
16 Aug 09:33:13 - [debug] [inject:noon] crontab = 00 12 * * *
16 Aug 09:33:13 - [debug] [api-call-service:a723c6f5.a9c8e8] instantiated node, name: undefined
16 Aug 09:33:13 - [debug] [server-state-changed:4c8b149b.72ee6c] instantiated node, name: undefined
16 Aug 09:33:13 - [debug] [inject:17:00] crontab = 00 17 * * *
16 Aug 09:33:13 - [debug] [api-call-service:Notify iOS] instantiated node, name: Notify iOS
16 Aug 09:33:13 - [debug] [api-call-service:Notify iOS] instantiated node, name: Notify iOS
16 Aug 09:33:13 - [debug] [inject:4:00] crontab = 00 04 * * *
16 Aug 09:33:13 - [debug] [ha-entity:b1c6d402.e40af8] instantiated node, name: undefined

```

---

<div class="post-metadata">

### Author: ![vajonam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vajonam/32/36588_2.png) [@vajonam](https://discourse.nodered.org/u/vajonam)
#### Post date: [17 August 2022 19:35 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499/5 "2022-08-17T19:35:44Z")

</div>

@knolleary added some trace logging. not sure if this is red herring.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 October 2022 19:36 UTC](https://discourse.nodered.org/t/error-starting-subflow/66499/6 "2022-10-16T19:36:00Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
