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

Unhandled 'error' event after 15 min streaming #6

Open
Ninitage opened this issue Jan 8, 2017 · 4 comments
Open

Unhandled 'error' event after 15 min streaming #6

Ninitage opened this issue Jan 8, 2017 · 4 comments

Comments

@Ninitage
Copy link

Ninitage commented Jan 8, 2017

Hi, Many thanks for your work, this is really great, I'm testing webtorrent from "feross" reposity, I explained him that issue, and he told me this issue come from dlnacasts, that way I need your help to understand what's wrong... I noticed this issue is coming only when webtorrent is streaming to TV, anyway through VLC or MPV, it working well.
As I'm not really an expert about "node" codes, I'm just going to try to explain what's happening.

I'm starting "webtorrent-hybrid" as:

webtorrent-hybrid "torrent file or URL" --dlna

It's starting downloading and streaming to my tv but 15 min later stop working and let me know this into the terminal window:

DEBUG INFO: webtorrent-cli 1.8.1, webtorrent 0.98.0, node v7.2.1, darwin x64, exit 1
events.js:160
throw er; // Unhandled 'error' event
^

Error: SUBSCRIBE renewal error
at ClientRequest.
(/usr/local/lib/node_modules/webtorrent-hybrid/node_modules/upnp-device-client/index.js:234:25)
at ClientRequest.g (events.js:292:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:362:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)

I forgot to tell you I'm working on Mac OS X 10.11.6, the installed node version is 7.2.1, and webtorrent seems to be 0.98.0 and webtorrent-cli 1.8.1...

I installed node through HomeBrew, and webtorrent with npm...

Any ideas? If you need further informations, just ask me, thanks..

@grunjol
Copy link
Owner

grunjol commented Jan 9, 2017

Could you provide TV Brand and Model if you don't mind?

My guess is one of these two

Either case, the problem resides in the underlying upnp-device-client module. I can catch the error and prevents to error bubbling but the event subscription will be lost and you could no longer control the TV from the client.

To solve the issue I need more technical debugging on your TV <-> device communication using a network sniffer like wireshark or if you are using macOS http://packetpeeper.org and check for HTTP SUBSCRIBE requests.

@Ninitage
Copy link
Author

Sorry for waiting, my TV is effectively a Samsung model : EU128J 4100AWXZF Version : 2, and I'm really sorry I mistake precise as it's not a DLNA receiver, I've got a DLNA receiver in front named "Freebox Player".

I made a new test by capturing with tshark from start running communications until the issue came so 6 minutes later this time.

Here you will find some tshark captures about communications between my laptop and the Freebox Player.

dlnacasts.HTTP.report.txt
dlnacasts.report.txt

@grunjol
Copy link
Owner

grunjol commented Jan 19, 2017

Thanks for the logs. What is missing in there (and I am interested in) is the header part of the request and response of both SUBSCRIBE HTTP requests.

19321 20.591292 192.168.0.13 → 192.168.0.19 HTTP 317 SUBSCRIBE /service/AVTransport/event HTTP/1.1
84133 50.610380 192.168.0.13 → 192.168.0.19 HTTP 248 SUBSCRIBE /service/AVTransport/event HTTP/1.1
367044 320.626009 192.168.0.13 → 192.168.0.19 HTTP 248 SUBSCRIBE /service/AVTransport/event HTTP/1.1

My suspicion is the SID header is missing or in another case.
.

@Ninitage
Copy link
Author

Yes, could I get this information for you and how? I tried different ways with tshark, but I doesn't seem to give me more informations about this three requests concerning headers.

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