xat / castnow

commandline chromecast player
MIT License
3.81k stars 243 forks source link

serve-mp4.js TypeError at end of normal video playback #144

Open hypevhs opened 8 years ago

hypevhs commented 8 years ago
castnow\utils\serve-mp4.js:22
    var chunksize = (part.end - part.start) + 1;
                       ^
TypeError: Cannot read property 'end' of undefined
    at module.exports (castnow\utils\serve-mp4.js:22:24)
    at Object.fn (castnow\plugins\localfile.js:48:5)
    at loop (castnow\node_modules\router\index.js:43:11)
    at Server.route (castnow\node_modules\router\index.js:50:3)
    at emitTwo (events.js:87:13)
    at Server.emit (events.js:172:7)
    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:527:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)

This appeared when the 2 hour video was almost done with playback. No playlist involved, just one video. Never paused or seeked, either. The Chromecast timed out with the last few seconds of video stuck on screen.

It seems to be related to range-parser.

artheus commented 8 years ago

It would seem that the chromecast is sending some http request to the castnow host. The http request that is sent probably don´t have the byte range header. So the request is probably asking for something other than a video stream. If you´re able to, please run a network sniffer or the debug mode on your chromecast to see the requests sent, and see if you can recreate that exact problem. And please provide the request log etc. Try it with the same file.