hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
552 stars 51 forks source link

UnhandledPromiseRejectionWarning & SIGTERM errors keep shutting down HOOBS #1206

Closed MacFlagg closed 3 years ago

MacFlagg commented 3 years ago

No matter what I do, using the Harmony v1.5.1 plug-in, I get the following errors and my hub shuts down.

SIGTERM EADDRINUSE

the newest error being

UnhandledPromiseRejectionWarning

(I’ve discovered the terminal command “sudo killall -9 node” seems to fix EADDRINUSE, so that doesn’t seem to be an issue anymore. I just included it, in case it is important diagnostically).

When I install the harmony plugin, I only fill in the following fields:

Name of YourHub IP Address of Your Hub (must be fixed) Hub name in Your Harmony App Main Activity

I leave everything else to default.

I have 3 plugins installed:

Harmony (HOOBS certified) v1.5.1 Ring (HOOBS certified) v9.15.6 OnStar v1.5.1

I’m running:

HOOBS v3.3.5 Node v14.15.1

I have restored my HOOBS hub to factory defaults several times, trying to resolve the issues, but it never works.

I’ve followed the link for using the CLI Flag, but I don’t know anything about coding, therefore, I don’t understand what needs to be done or how to do it. I’m comfortable using the terminal, as long as I’m given commands that I can copy and paste.

Here is the latest error log (If I get a SIGTERM error, I’ll add it to this post. I get them weekly, sometimes daily.).

UnhandledPromiseRejectionWarning: Error: SIP request made after call was destroyed 4/4/2021, 5:51:01 PM at SipCall.request (/home/hoobs/.hoobs/node_modules/homebridge-ring/lib/api/sip-call.js:117:35) 4/4/2021, 5:51:01 PM at SipCall.sendKeyFrameRequest (/home/hoobs/.hoobs/node_modules/homebridge-ring/lib/api/sip-call.js:188:21) 4/4/2021, 5:51:01 PM at SipCall. (/home/hoobs/.hoobs/node_modules/homebridge-ring/lib/api/sip-call.js:216:24) 4/4/2021, 5:51:01 PM at Generator.next () 4/4/2021, 5:51:01 PM at fulfilled (/home/hoobs/.hoobs/node_modules/homebridge-ring/lib/api/sip-call.js:5:58) 4/4/2021, 5:51:01 PM (node:1525) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

Thank in advance for any assistance.

MacFlagg commented 3 years ago

Latest Error Log:

4/5/2021, 9:08:26 AM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 9:08:39 AM [Harmony] (Harmony)ERROR (2)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined). at WebSocketAsPromised._handleClose (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:353:19) at WebSocket.listener (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:311:64) at WebSocket.emit (events.js:315:20) at WebSocket.emitClose (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:188:12) at ClientRequest. (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:580:15) at ClientRequest.emit (events.js:315:20) at Socket.socketErrorListener (_http_client.js:469:9) at Socket.emit (events.js:315:20) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) 4/5/2021, 9:08:39 AM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 9:08:53 AM [Harmony] (Harmony)ERROR (3)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined). at WebSocketAsPromised._handleClose (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:353:19) at WebSocket.listener (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:311:64) at WebSocket.emit (events.js:315:20) at WebSocket.emitClose (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:188:12) at ClientRequest. (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:580:15) at ClientRequest.emit (events.js:315:20) at Socket.socketErrorListener (_http_client.js:469:9) at Socket.emit (events.js:315:20) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) 4/5/2021, 9:08:53 AM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 9:09:06 AM [Harmony] (Harmony)ERROR (4)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined). at WebSocketAsPromised._handleClose (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:353:19) at WebSocket.listener (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:311:64) at WebSocket.emit (events.js:315:20) at WebSocket.emitClose (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:188:12) at ClientRequest. (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:580:15) at ClientRequest.emit (events.js:315:20) at Socket.socketErrorListener (_http_client.js:469:9) at Socket.emit (events.js:315:20) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) 4/5/2021, 9:09:06 AM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 9:09:19 AM [Harmony] (Harmony)ERROR (5)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined). at WebSocketAsPromised._handleClose (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:353:19) at WebSocket.listener (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:311:64) at WebSocket.emit (events.js:315:20) at WebSocket.emitClose (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:188:12) at ClientRequest. (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:580:15) at ClientRequest.emit (events.js:315:20) at Socket.socketErrorListener (_http_client.js:469:9) at Socket.emit (events.js:315:20) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) 4/5/2021, 9:09:19 AM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 9:09:29 AM [Harmony] (Harmony)WARNING - refreshCurrentActivity : NO refresh done since too much socket errors - will retry later 4/5/2021, 9:10:29 AM [Harmony] (Harmony)WARNING - refreshCurrentActivity : Resetting counter after network loss, trying to refresh 4/5/2021, 9:10:32 AM [Harmony] (Harmony)ERROR (1)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined). at WebSocketAsPromised._handleClose (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:353:19) at WebSocket.listener (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:311:64) at WebSocket.emit (events.js:315:20) at WebSocket.emitClose (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:188:12) at ClientRequest. (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:580:15) at ClientRequest.emit (events.js:315:20) at Socket.socketErrorListener (_http_client.js:469:9) at Socket.emit (events.js:315:20) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) 4/5/2021, 9:10:32 AM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 9:46:51 AM [Harmony] (Harmony)WARNING - socket closed

MacFlagg commented 3 years ago

Got a SIGTERM error:

4/5/2021, 2:34:56 PM [Harmony] (Harmony)WARNING - socket closed 4/5/2021, 2:35:16 PM [Harmony] (Harmony)ERROR (1)- refreshCurrentActivity TimeoutError: Can't open WebSocket within allowed timeout: 10000 ms. - Stack : TimeoutError: Can't open WebSocket within allowed timeout: 10000 ms. at PromiseController._handleTimeout (/home/hoobs/.hoobs/node_modules/promise-controller/src/index.js:172:19) at Timeout. (/home/hoobs/.hoobs/node_modules/promise-controller/src/index.js:178:43) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) 4/5/2021, 2:35:41 PM Error: connect EHOSTUNREACH 192.168.1.196:8088 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) 4/5/2021, 2:35:41 PM Got SIGTERM, shutting down Bridge... 4/5/2021, 2:35:41 PM [Harmony] INFO - shutdown 4/5/2021, 2:35:41 PM [Harmony] INFO - shutdown