node-red-contrib-home-assistant-websocket
node-red-contrib-home-assistant-websocket copied to clipboard
package causes NodeRed to crash if connection to HA server fails (HA reboots, etc)
Describe the bug
If the node-red-contrib-home-assistant-websocket loses connection and eventually reconnects to HomeAssistant the
[red] Uncaught Exception:
19 Aug 20:25:58 - [error] UnhandledPromiseRejection: 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(). The promise rejected with the reason "#<Object>".
is thrown.
more logs:
19 Aug 20:23:03 - [info] [server:x.duckdns.org] Connected to https://x.duckdns.org:8123
19 Aug 20:25:25 - [info] [server:x.duckdns.org] Connection closed to https://x.duckdns.org:8123
19 Aug 20:25:25 - [info] [server:x.duckdns.org] Connecting to https://x.duckdns.org:8123
19 Aug 20:25:30 - [info] [server:x.duckdns.org] Connecting to https://x.duckdns.org:8123
19 Aug 20:25:35 - [info] [server:x.duckdns.org] Connecting to https://x.duckdns.org:8123
19 Aug 20:25:40 - [info] [server:x.duckdns.org] Connecting to https://x.duckdns.org:8123
19 Aug 20:25:41 - [info] [server:x.duckdns.org] Connected to https://x.duckdns.org:8123
19 Aug 20:25:58 - [info] [server:x.duckdns.org] Connection closed to https://x.duckdns.org:8123
19 Aug 20:25:58 - [red] Uncaught Exception:
19 Aug 20:25:58 - [error] UnhandledPromiseRejection: 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(). The promise rejected with the reason "#<Object>".
Note: x.duckdns.org points to an internal IP via internal DNS settings, the same thing happens if I use an IP address.
To Reproduce
- Have HA setup on a different server/docker etc
- Connect via the package to HA.
- Restart HA
- Watch for NR to restart (if you have restart-unless-stopped etc setup for docker).
Expected behavior
Error messages only, then a connection followed by working system :)
Screenshots
No response
Example Flow
n/a
This package's version (not the Home Assistant add-on version)
0.44.0
Is Node-RED running in Docker?
Yes
Node-RED version
3.0.2
Node.js version
v16.16.0
Additional context
No response
Are you using the device node?
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.