3
votes

I've started getting this issue with my Chromecast sender app after I accidentally shut down Chrome while the receiver was still running on the Chromecast device.

Whenever I try to start the receiver, I immediately get a session error. The receiver starts, but it doesn't get any data from the sender, obviously.

The cast menu in Chrome indicates that it's casting. If I click Stop, the receiver app will close but the funny thing is that the cast menu still indicates that it's casting. If I click Stop again it will no longer show as casting.

The same thing happens every time I try to cast. I've tried restarting both the Chrome browser and the Chromecast device several times with no luck. The error object passed to the error handler provides no details. Anyone now what's up and how I can get it sorted out?

Thanks!

1
What is the complete error message that you got?KENdi
As far as I can tell, the complete error message is "session error"...Lennholm

1 Answers

2
votes

I got stuck into this problem as well. The error message that gets thrown is not that informative. For me, the problem was that I tried to cast a file located at my localhost server. Google seems to have blocked all files coming from either localhost or any 192.168.X.X IP address.

So, try with an external file and make sure you have the correct CORS headers set for your file server (Content-Type, Accept-Encoding and Range): https://developers.google.com/cast/docs/chrome_sender_advanced#cors_requirements