dpjanes / iotdb-upnp

Universal Plug & Play Library - for IOTDB and Stand Alone
Apache License 2.0
0 stars 0 forks source link

Error thrown #2

Open mishoboss opened 8 years ago

mishoboss commented 8 years ago
/node_modules/iotdb-upnp/upnp/upnp-controlpoint.js:200
    var udn = device.udn.replace(/^uuid:/, '')
                        ^

TypeError: Cannot read property 'replace' of undefined

This error is thrown some seconds after start.

This is shown right before the error:

{"name":"iotdb-upnp","module":"upnp/upnp-controlpoint","hostname":"Mihails-MacBook-Pro-9.local","pid":54787,"level":50,"method":"UpnpControlPoint._getDeviceDetails","location":"192.168.80.18:49156","cause":"we are only supporting http: in UPnP for now","msg":"ignoring not http: device","time":"2016-10-07T07:55:52.467Z","v":0}

If this code is put before line 200, its ok:

if (!device.udn) {
     return;
    }
dpjanes commented 8 years ago

I've done a major overhaul of this code, and also corrected the constant forget device / discover device behaviour. New version pushed to NPM