-
Notifications
You must be signed in to change notification settings - Fork 10
promise.then(...).catch(...).done is not a function #81
Comments
Same error on my site
|
@newschooler Can you tell which type of device is used? |
@atus I suspect the pimatic-gpio plugin, because it was updated recently. Could you try to revert back to the version before, which would be 0.9.0? Especially is suspect pimatic/pimatic-gpio@35b6472 |
Sorry, it's the GpioSwitch as well. I will try to revert and report then. edit: @michbeck100 I just moved back to pimatic-gpio 0.9.0 plugin and the error is gone. |
confirming that downgrading to pimatic/pimatic-gpio 0.9.0 solves the issue |
Version 0.11.2 should fix this issue. I had the same problem with pimatic-sysinfo, so it was easy to find the problem then. |
Why do you use done() in this context? It should not be used with bluebird promises and it is not part of the standard for native promise. If I recap this correctly done() is used as part of Q, but Q promises should be wrapped by the plugin as much as possible, as the are considered harmful |
Well, me neither. See
Needs further investigation which type of promise it is, as native and bluebird promise should have
The use in the pimatic code itself is for historical reasons |
Should be solved together with #78 |
I get the error below. As part of debugging this I did the following:
If I disable all devices I can set up a new home. As soon as I add a simple GpioSwitch I get the error below.
pimatic version 0.9.48
Node.js version 4.9.1
pimatic-hap version 0.11.1
I do not use tradfri where other people have reported errors previously.
Interestingly, when I add a single PowerSwitch I get this error but I can control the switch from Home app. The error appears if I open the app or click on the control.
The text was updated successfully, but these errors were encountered: