-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'childrenNamed' of null #7
Comments
Sorry wrong information about error code and test example is posted above..Below is the correct info Test example: // First, create a client instance controlPoint.on("DeviceAvailable", function(device) { controlPoint.on("DeviceFound", function(device) { controlPoint.search('urn:schemas-upnp-org:device:InternetGatewayDevice:1'); |
Versions of software used are: upnp-client v0.0.1 step: v0.0.5 |
As far as I can see you need to use an old version of Node. 0.10 works for me. |
I have installed node-upnp-client v0.0.2 , nodeJS 0.12.2 on Ubuntu 11.10
I used the basic test example JS code to discover devices but I get below error about "Cannot read property "childrenNamed"
Any pointers about whats the fix, workaround.
/home/test/node_modules/node-upnp-client/lib/client.js:223
device.icon = device.baseUrl+dev.childNamed("iconList").childrenNamed("i
^
TypeError: Cannot read property 'childrenNamed' of null
at /home/test/node_modules/node-upnp-client/lib/client.js:223:62
at XmlElement.eachChild (/home/test/node_modules/node-upnp-client/node_modules/xmldoc/lib/xmldoc.js:72:18)
at IncomingMessage. (/home/test/node_modules/node-upnp-client/lib/client.js:210:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
Test example used to discover upnp devices:
var upnpClient = require('node-upnp-client');
var cli = new upnpClient();
//start search
cli.searchDevices();
// listen for search terminated
cli.on('searchDevicesEnd', function() {
console.log('Servers'+ JSON.stringify(cli._servers))
console.log('Renderers'+ JSON.stringify(cli._renderers))
console.log('AVTransport'+ JSON.stringify(cli._avTransports))
console.log('ConnectionManagers'+ JSON.stringify(cli._connectionManagers))
});
// listen for added / removed devices
cli.on('updateUpnpDevice', function() {
console.log('Servers'+ JSON.stringify(cli._servers))
console.log('Renderers'+ JSON.stringify(cli._renderers))
console.log('AVTransport'+ JSON.stringify(cli._avTransports))
console.log('ConnectionManagers'+ JSON.stringify(cli._connectionManagers))
});
The text was updated successfully, but these errors were encountered: