Reputation: 38035
I've built a very simple custom receiver for Chromecast, but I can't seem to get it to launch. When I try, I get the following error...
{
code: 'session_error',
description: 'CANCELLED',
details: {
reason: 'CANCELLED',
type: 'LAUNCH_ERROR'
}
}
I have no idea what this means or how to get more information about the error. The app worked last night, but stopped when I came in to work this morning.
Here's what I've tried:
The only thing I can think of that changed between last night and this morning is that I'm using my phones hotspot to connect my Chromecast to my laptop (it's the only semi-reliable wifi I have access to at the office). i took my phone with me when I left, so the laptop and Chromecast became disconnected overnight. However, since I'm able to communicate with Chromecast (my sender app - a html page - can see the device, the built-in media apps work, the debugger can connect, etc), that doesn't seem to be the culprit.
Here is the code for the receiver...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World Chromecast App</title>
</head>
<body>
Hello World!
<script src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script>
window.onload = function () {
window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();
window.castReceiverManager.start();
}
</script>
</body>
</html>
Any ideas of what I can try to either fix this or find out what the actual error is?
Upvotes: 1
Views: 919
Reputation: 19094
Chromecast doesn't use your local network (router) DNS, it uses Google's DNS regardless of what you have defined locally so a local name on your network cannot be resolved; you always need to use an ip address when you are using your own local network for serving the receiver or any other assets there in.
Upvotes: 6
Reputation: 38035
I finally figured this out. Since I am using my phones hotspot, I had to use the IP address that it assigned to my laptop instead of the name of the machine (not sure why it doesn't work, I'm able to bring up the app using the name on my Android tablet). Basically I just opened a command-line and ran ipconfig, found the "Wireless LAN adapter Wi-Fi" entry, and used the IPv4 address for the URL to my receiver app in the Chromecast developer console. Hopefully this will save somebody else from spending all day on this issue.
Upvotes: 1