Closed maddox closed 7 years ago
I think one of the node-xmpp-*
packages may have gotten bumped and is causing this crash.
It may be that a bug got fixed there, that this package was not crashing on, and is now crashing on.
I tested for the existence of response
on my fork, and it doesn't crash anymore. But it also doesn't log in. It's def getting a bad response on the log in part of this.
Same issue here:
Starting discovery.
Hub discovered: Harmony Hub at 192.168.1.70.
stanza.children[0].attrs: { xmlns: 'connect.logitech.com',
mime: 'vnd.logitech.connect/vnd.logitech.pair',
errorcode: '200',
errorstring: 'OK' }
BODY: [empty]
/home/dale/node/harmony-api/node_modules/harmonyhubjs-client/lib/login/hub.js:61
if (response.identity && response.identity !== undefined) {
^
TypeError: Cannot read property 'identity' of undefined
at Client.<anonymous> (/home/dale/node/harmony-api/node_modules/harmonyhubjs-client/lib/login/hub.js:61:19)
at emitOne (events.js:77:13)
at Client.emit (events.js:169:7)
at Client._handleStanza (/home/dale/node/harmony-api/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/lib/Client.js:227:12)
at Client.onStanza (/home/dale/node/harmony-api/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/lib/Client.js:221:8)
at emitOne (events.js:77:13)
at Connection.emit (events.js:169:7)
at Connection.onStanza (/home/dale/node/harmony-api/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:377:10)
at StreamParser.<anonymous> (/home/dale/node/harmony-api/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:231:10)
at emitOne (events.js:77:13)
I tracked the problem down to node-xmpp-client
. Anything newer than 3.0.0
breaks. Rolling back and freezing to 3.0.0
makes it work again.
I'm running xmpp client 3.0.0 but still have no luck. xmpp stanza is at 1.1.0 as listed in package.json
Same error, response body is empty.
@lanzer I'm not sure why. Make sure you rm -Rf node_modules
and re run npm install
.
1.1.10
should fix this. thanks for a short confirmation.@swissmanu thanks!
Hi, this thread is closed? I cannot start the bridge because of some xmpp issue and i followed "@lanzer I'm not sure why. Make sure you rm -Rf node_modules and re run npm install." and i get this errors trying to reinstall npm:
pi@raspberrypi:~ $ sudo rm -Rf node_modules
pi@raspberrypi:~ $ sudo npm install
npm ERR! install Couldn't read dependencies
npm ERR! Linux 4.4.21-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! path /home/pi/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open
npm ERR! package.json ENOENT: no such file or directory, open '/home/pi/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log
Can anyone please help? Thanks.
please check your files.
npm ERR! package.json ENOENT: no such file or directory, open '/home/pi/package.json'
says there is no package.json
in your current directory.