thibauts/node-upnp-mediarenderer-client

Error: socket hang up

alinos38 opened this issue · 6 comments

I have installed node.js 0.12 on my MacBook Pro Yosemite. I wanted test your script but get this error:
play_media.js:8
if(err) throw err;
^
Error: socket hang up
at createHangUpError (_http_client.js:215:15)
at Socket.socketOnEnd (_http_client.js:293:23)
at Socket.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)

Have an idea?
Regards,
Alinos38

Looks like your UPnP device hangs up on you. Maybe you're not connecting to the right IP.

If you show me your code I'll see if there is anything I can do.

I have just copy snippet of your code :
ar MediaRendererClient = require('upnp-mediarenderer-client');

// Instanciate a client with a device description URL (discovered by SSDP)
var client = new MediaRendererClient('http://192.168.216.4:54243/device.xml'
);

// Load a stream and play it immediately
client.load('http://youtu.be/mDcxSPBpF_c', { autoplay: true },
function(err, result) {
if(err) throw err;
console.log('playing ...');
});

I have used peer-ssdp to get my freebox player parameters:
receive found message from { address: '192.168.216.4',
family: 'IPv4',
port: 1900,
size: 334 }
{ 'CACHE-CONTROL': 'max-age=1800',
DATE: 'Sun, 01 Mar 2015 17:39:57 GMT',
EXT: '',
LOCATION: 'http://192.168.216.4:54243/device.xml',
SERVER: 'Linux/2.6 UPnP/1.0 fbxupnpav/1.0',
ST: 'urn:schemas-upnp-org:device:MediaRenderer:1',

2015-03-01 15:26 GMT+01:00 Thibaut Séguy notifications@github.com:

Looks like your UPnP device hangs up on you. Maybe you're not connecting
to the right IP.

If you show me your code I'll see if there is anything I can do.


Reply to this email directly or view it on GitHub
#14 (comment)
.

Hi,

The URL does not matter. The problem is socket as you can see:
/Users/alinos38/NetBeansProjects/upnp.js/play_media.js:8
if(err) throw err;
^
Error: socket hang up
at createHangUpError (_http_client.js:215:15)
at Socket.socketOnEnd (_http_client.js:293:23)
at Socket.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)

I have changed URL address that works :
http://anon.nasa-global.edgesuite.net/HD_downloads/GRAIL_launch_480.mov

Could you help?

2015-03-01 18:43 GMT+01:00 Thibaut Séguy notifications@github.com:

I suppose your media renderer has no clue how to play straight YouTube
pages


Reply to this email directly or view it on GitHub
#14 (comment)
.

I need to know exactly where in my code the error triggers. Can you locate it or provide a full stack trace ?

No feedback for more than on month, I consider this issue closed.