# New to nodered and first problem

**URL:** <https://discourse.nodered.org/t/new-to-nodered-and-first-problem/21369>\
**Category:** General\
**Created:** [6 February 2020 20:41 UTC](https://discourse.nodered.org/t/new-to-nodered-and-first-problem/21369 "2020-02-06T20:41:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcoGT](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@MarcoGT](https://discourse.nodered.org/u/MarcoGT)\
**Post date:** [6 February 2020 20:41 UTC](https://discourse.nodered.org/t/new-to-nodered-and-first-problem/21369/1 "2020-02-06T20:41:46Z")

</div>

Hi all,

very new to nodered; I am using it with this contribution to control my HomeAutomation SW (running on a MacMini);  
I did the same setup with nodejs 12.14.1 and nodered 1.0.3 and on a machine is working fine, on a second one I have different error; when using that contribution, after I created an indigo-controller I try to get the device list, I get this error

```auto
getting devices
(node:14305) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'requestAsync' of undefined
    at /Users/domotica/.node-red/node_modules/indigodomo-node/dist/index.js:128:31
    at Generator.next (<anonymous>)
    at /Users/domotica/.node-red/node_modules/indigodomo-node/dist/index.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/domotica/.node-red/node_modules/indigodomo-node/dist/index.js:3:12)
    at Get (/Users/domotica/.node-red/node_modules/indigodomo-node/dist/index.js:127:12)
    at Object.<anonymous> (/Users/domotica/.node-red/node_modules/indigodomo-node/dist/index.js:43:22)
    at Generator.next (<anonymous>)
    at /Users/domotica/.node-red/node_modules/indigodomo-node/dist/index.js:7:71
    at new Promise (<anonymous>)
(node:14305) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:14305) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 
```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [6 February 2020 20:44 UTC](https://discourse.nodered.org/t/new-to-nodered-and-first-problem/21369/2 "2020-02-06T20:44:48Z")

</div>

> [@MarcoGT](#):
>
> Cannot read property 'requestAsync' of undefined

I would start there.

It would seem you are sending it a message which has a part of it which is not defined.

Put a `debug` node on the _input_ (Well, on the _output_ of the previous node) and tick the `show complete message` in the `debug` node.

Send it a message and see what is being sent into the node.

That should get you a bit of the way to understanding the problem.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [6 February 2020 21:09 UTC](https://discourse.nodered.org/t/new-to-nodered-and-first-problem/21369/3 "2020-02-06T21:09:30Z")

</div>

I found the node, node-red-contrib-indigo. The problem you describe above is caused by this line of code:

> <https://github.com/jh71283/node-red-contrib-indigo/blob/65a8f18e65b6cdcc5076901459e2be1ee3823eb2/77-indigo.js#L219>

  
What happens is that the node uses asynchronous calls to the underlying indigo library. The line above does that exact call, but doesn’t have a responding answer in case the call fails. Node-red isn’t capable of handling errors when async calls fail, thus the system crashes. This is a bug in the node, so you should try to report it, but I can’t find a bug tracker for it. It might be worth finding out why it fails on discovering devices.

---

<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:** [6 April 2020 21:09 UTC](https://discourse.nodered.org/t/new-to-nodered-and-first-problem/21369/4 "2020-04-06T21:09:38Z")

</div>

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