xat / castnow

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

Video stop playing with error 'Cannot call method 'send' of null' #51

Open daweedco opened 9 years ago

daweedco commented 9 years ago

Hi,

I was playing a video , when suddenly it stopped with this error :

/usr/local/lib/node_modules/castnow/node_modules/castv2-client/node_modules/castv2/lib/client.js:126 this.ps.send(buf); ^ TypeError: Cannot call method 'send' of null at Client.send (/usr/local/lib/node_modules/castnow/node_modules/castv2-client/node_modules/castv2/lib/client.js:126:11) at Channel.send (/usr/local/lib/node_modules/castnow/node_modules/castv2-client/node_modules/castv2/lib/channel.js:34:12) at RequestResponseController.Controller.send (/usr/local/lib/node_modules/castnow/node_modules/castv2-client/lib/controllers/controller.js:28:16) at RequestResponseController.request (/usr/local/lib/node_modules/castnow/node_modules/castv2-client/lib/controllers/request-response.js:34:8) at /usr/local/lib/node_modules/castnow/node_modules/chromecast-player/api.js:108:17 at Api.getCurrentSession (/usr/local/lib/node_modules/castnow/node_modules/chromecast-player/api.js:95:35) at Api.sessionRequest (/usr/local/lib/node_modules/castnow/node_modules/chromecast-player/api.js:105:8) at Api.pause (/usr/local/lib/node_modules/castnow/node_modules/chromecast-player/api.js:128:8) at Object.ke%

xat commented 9 years ago

This happens if castnow looses the connection to chromecast. I'm working on handleing this case better.