xat / chromecast-scanner

scan your local network for chromecast devices and return the first found
MIT License
27 stars 11 forks source link

Fix js error happening with recent chromecast or node.js version #5

Closed tiff closed 8 years ago

tiff commented 9 years ago

We are seeing this error when using castnow:

TypeError: Cannot read property 'name' of undefined
    at EventEmitter.onResponse (/usr/local/lib/node_modules/castnow/node_modules/chromecast-player/node_modules/chromecast-scanner/index.js:32:15)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at Socket.<anonymous> (/usr/local/lib/node_modules/castnow/node_modules/chromecast-player/node_modules/chromecast-scanner/node_modules/multicast-dns/index.js:41:45)
    at emitTwo (events.js:87:13)
    at Socket.emit (events.js:172:7)
    at UDP.onMessage (dgram.js:481:8)

See xat/castnow#110

bdunavant commented 8 years ago

Can confirm this fixes the issue for me.

xat commented 8 years ago

thanks ! :)