Skip to content
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

Error: socket hang up #14

Closed
alinos38 opened this issue Mar 1, 2015 · 6 comments
Closed

Error: socket hang up #14

alinos38 opened this issue Mar 1, 2015 · 6 comments

Comments

@alinos38
Copy link

alinos38 commented Mar 1, 2015

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

@thibauts
Copy link
Owner

thibauts commented Mar 1, 2015

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.

@alinos38
Copy link
Author

alinos38 commented Mar 1, 2015

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)
.

@thibauts
Copy link
Owner

thibauts commented Mar 1, 2015 via email

@alinos38
Copy link
Author

alinos38 commented Mar 7, 2015

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)
.

@thibauts
Copy link
Owner

thibauts commented Mar 7, 2015

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

@thibauts
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants