# Subflows broken with 0.20.0

**URL:** <https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143>\
**Category:** General\
**Created:** [18 March 2019 19:02 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143 "2019-03-18T19:02:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![caralmar](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@caralmar](https://discourse.nodered.org/u/caralmar)\
**Post date:** [18 March 2019 19:02 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/1 "2019-03-18T19:02:02Z")

</div>

Hi, I have tested this with a simple "hello world" function.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b0f21a690f589cbe69133936a8ddb975895ae3cb.png)

The datamapper is a hello world for now:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bf5c9f5a1cf294f10ac88056e082b82b4025705a.png)

the function "hello":  
msg.payload = "hello world";  
return msg;

When I hit the inject node, I see nothing in the debug console. This works fine in previous versions.

Thanks,

Carlos Marin

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 March 2019 19:24 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/2 "2019-03-18T19:24:13Z")

</div>

Works fine for me - please provide your exact flow.

---

<div class="post-metadata">

**Author:** ![caralmar](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@caralmar](https://discourse.nodered.org/u/caralmar)\
**Post date:** [18 March 2019 19:36 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/3 "2019-03-18T19:36:02Z")

</div>

I'm working on Bluemix NodeRED. I will create another instance and test again and if it doesn't work, I'll paste the complete flow here. Thanks.

---

<div class="post-metadata">

**Author:** ![caralmar](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@caralmar](https://discourse.nodered.org/u/caralmar)\
**Post date:** [18 March 2019 19:47 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/4 "2019-03-18T19:47:03Z")

</div>

I just reproduced it on a clean 0.20.2 build. How do I upload attachment? It says I'm a new user so I can't upload the flow.

---

<div class="post-metadata">

**Author:** ![caralmar](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@caralmar](https://discourse.nodered.org/u/caralmar)\
**Post date:** [18 March 2019 19:49 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/5 "2019-03-18T19:49:20Z")

</div>

Paste flow here:

```auto
[{"id":"b380f145.2a52","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"a7f6f640.5d3568","type":"subflow","name":"hello","info":"","category":"","in":[{"x":120,"y":100,"wires":[{"id":"97471d17.7e59a"}]}],"out":[{"x":380,"y":100,"wires":[{"id":"97471d17.7e59a","port":0}]}],"env":[]},{"id":"97471d17.7e59a","type":"function","z":"a7f6f640.5d3568","name":"hello","func":"msg.payload = \"hello world\";\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":100,"wires":[[]]},{"id":"f14482d0.20d77","type":"inject","z":"b380f145.2a52","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":140,"wires":[["53354d28.fa51a4"]]},{"id":"53354d28.fa51a4","type":"subflow:a7f6f640.5d3568","z":"b380f145.2a52","name":"","x":320,"y":140,"wires":[["d0db4ce5.84c91"]]},{"id":"d0db4ce5.84c91","type":"debug","z":"b380f145.2a52","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":500,"y":140,"wires":[]}]
```

---

<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:** [18 March 2019 20:05 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/6 "2019-03-18T20:05:48Z")

</div>

Hi @caralmar  
the flow you've shared works fine for me.

In the same Node-RED instance, could you add a simple Inject-\>Debug flow and check you get those messages in the sidebar?

It could be an issue with the websocket comms connection between the editor and runtime stopping the messages from appearing - giving it the impression that the flow isn't working.

---

<div class="post-metadata">

**Author:** ![caralmar](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@caralmar](https://discourse.nodered.org/u/caralmar)\
**Post date:** [18 March 2019 20:17 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/7 "2019-03-18T20:17:03Z")

</div>

Hi, I can give you access to that env. It is running in IBM Cloud. Empty env. Just the one flow. This problem first manifested itself when I was turning a mapping function into a subflow so I could use it in some other flows. The mapper is invoked via a REST API. When I invoke it using POSTMan, it just hangs, waiting on a response. It is then that I discovered that the subflow is not responding. If you would like to see it first-hand, please ping me on Slack ([cmarin@us.ibm.com](mailto:cmarin@us.ibm.com)). Thanks.

Carlos.

---

<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:** [18 March 2019 20:41 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/8 "2019-03-18T20:41:53Z")

</div>

For anyone reading along at home, the problem has been identified to the fact the instance was using Node 6.x - not the required 8.x or later.

We're working on getting the IBM Cloud boilerplate for Node-RED updated to pull in Node 8.

---

<div class="post-metadata">

**Author:** ![caralmar](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@caralmar](https://discourse.nodered.org/u/caralmar)\
**Post date:** [18 March 2019 21:15 UTC](https://discourse.nodered.org/t/subflows-broken-with-0-20-0/9143/9 "2019-03-18T21:15:45Z")

</div>

Thanks for your help. I manually upgraded that instance to NodeJS 8.x and can confirm that the subflow is working now.

Take care,

Carlos.
