swissmanu / harmonyhubjs-client

A Node.JS library which allows you to interact with your Logitech Harmony Hub.
https://github.com/swissmanu/harmonyhubjs-client
MIT License
155 stars 42 forks source link

Unable to connect with node-xmpp-client v1.0.0 #11

Closed Pmant closed 8 years ago

Pmant commented 8 years ago

Works with node-xmpp-client v1.0.0-alpha23, but not v1.0.0 final:

error: uncaught exception: Cannot read property 'identity' of undefined
error: TypeError: Cannot read property 'identity' of undefined
    at Client.<anonymous> (/opt/iobroker/node_modules/iobroker.harmony/node_modules/harmonyhubjs-client/lib/login/hub.js:63:15)
    at Client.EventEmitter.emit (events.js:95:17)
    at Client.onStanza (/opt/iobroker/node_modules/iobroker.harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/index.js:224:14)
    at Connection.EventEmitter.emit (events.js:95:17)
    at Connection.onStanza (/opt/iobroker/node_modules/iobroker.harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:370:14)
    at StreamParser.<anonymous> (/opt/iobroker/node_modules/iobroker.harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:226:14)
    at StreamParser.EventEmitter.emit (events.js:95:17)
    at SaxLtx.<anonymous> (/opt/iobroker/node_modules/iobroker.harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:59:22)
    at SaxLtx.EventEmitter.emit (events.js:95:17)
    at SaxLtx._handleTagOpening (/opt/iobroker/node_modules/iobroker.harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/lib/parsers/ltx.js:30:18)
swissmanu commented 8 years ago

please have a look at #10. the problem is, most probably, related with the XMPP stanza parser deep below.

however, i'll have a look into possible changes from node-xmpp-client which result in incompatibilities.

swissmanu commented 8 years ago

Version 1.1.8 should fix the mess with node-xmpp-* and ltx.

Please make sure you are using the latest version of npm (npm install npm -g) and try to install the newest version 1.1.8 of harmonyhubjs-client (release notes here: https://github.com/swissmanu/harmonyhubjs-client/releases/tag/v1.1.8)