KraigM / homebridge-harmonyhub

HomeBridge Plugin for Logitech Harmony Hub
182 stars 52 forks source link

Uncaught, unspecified "error" event #35

Open thoukydides opened 8 years ago

thoukydides commented 8 years ago

I am regularly getting Uncaught, unspecified "error" event with the 0.2.0-alpha release. It is by far the most frequent cause of my homebridge installation crashing. This did not occur with the previous version of homebridge-harmonyhub.

This error mostly seems to occur after receiving a notification about the state of my Philips Hue lights, but that may be a coincidence since those notifications are the most common entries in the log.

Here is an example from homebridge.err:

Tue, 07 Jun 2016 04:57:32 GMT xmpp:connection receive: <message content-length="367"/>
<message from="HarmonyOne_Pop@qa1.com" to="ab903454-7bee-4410-9eea-bb5355bb667e"><event xmlns="connect.logitech.com" type="automation.state?notify"><![CDATA[{"hue-00:17:88:01:10:3c:88:cc-0b":{"statusMsg":"nocon","color":{"xy":{"y":0.3726,"x":0.3696},"mode":"xy","temp":234,"hueSat":{"hue":32900,"sat":51}},"brightness":254,"on":false,"status":2}}]]></event></message>
events.js:87
      throw Error('Uncaught, unspecified "error" event.');
            ^
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at Client.emit (events.js:87:13)
    at Client._handleAuthState (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-client/lib/Client.js:297:10)
    at Client._handleStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-client/lib/Client.js:235:12)
    at Client.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-client/lib/Client.js:223:8)
    at Connection.emit (events.js:107:17)
    at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:377:10)
    at StreamParser.<anonymous> (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10)
    at StreamParser.emit (events.js:107:17)
    at SaxLtx.<anonymous> (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14)
    at SaxLtx.emit (events.js:107:17)
    at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:28:22)
    at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26)
    at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17)
    at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17)
    at Socket.emit (events.js:129:20)
    at readableAddChunk (_stream_readable.js:163:16)
    at Socket.Readable.push (_stream_readable.js:126:10)
    at TCP.onread (net.js:540:20)

and the entries leading up to this from homebridge.log:

[6/7/2016, 5:57:31 AM] [Living Room Harmony Hub] Updated reachability of undefined to false
[6/7/2016, 5:57:31 AM] [Living Room Harmony Hub] [TimeoutError: operation timed out]
[6/7/2016, 5:57:31 AM] [Living Room Harmony Hub] Updated reachability of undefined to false
[6/7/2016, 5:57:32 AM] [Living Room Harmony Hub] Hub went online: 0d47c28d-87b2-4642-8840-9c2eb5a3727a
[6/7/2016, 5:57:32 AM] [Living Room Harmony Hub] received update event from harmonyhubjs-discover. there are 1 hubs
batman1470 commented 8 years ago

I am getting the same error. Have you found a solution?

brianhanifin commented 8 years ago

I am having this issue as well. I am running the 0.2.0-alpha release, with node 4.5 and npm 2.15.9 on a Pine64 board.

xeospeed commented 7 years ago

Having this issue as well. 0.2.0, with node 7.2 and npm 3.10.9 on Raspberry Pi 3 w/ Raspian.

Iiviin commented 7 years ago

did you fine folks find a solution for this?