问题
I am not able to connect to my Whitelisted Chromecast through the given address (ip.address:9222) as mentioned here: https://developers.google.com/cast/developing_your_receiver#debugging
When attempting to test my Android sender implementation, my app can successfully see and select the Chromecast device via MediaRouteActionProvider I receive SessionError code CODE_REQUEST_FAILED in CATEGORY_CONNECT_CHANNEL immediately.
I've included my app id in both the Sender and Receiver. I've verified the Chromecast was in discovery state when attempting. I'm able to view the debug info through the Chromecast app on Android to see the device details, but I don't see anything that would confirm the device has been whitelisted. Is there a particular key that would verify the device is whitelisted? Am I missing another step?
回答1:
The solution is to tick the "Send this Chromecast's serial number to Google when checking for updates" box and then "Reboot Chromecast". (Thanks, methai).
The issue was that there is a bug in the Android Chromecast app (in version 1.1.1), where this setting doesn't actually get saved. I can confirm the OS X client will save this setting properly, haven't tested the other versions yet.
回答2:
Also make sure that your HTTP server will respond correctly to POST requests for your receiver URL as well as that same URL with '/whatever_you_pass_to_ApplicationSession.startSession' which was an issue with our Rails server.
回答3:
For me it was a combination of checking "Send this Chromecast's serial number to Google when checking for updates" and registering the Chromecast Device, as described here: https://developers.google.com/cast/docs/registration
After registering your device, you'll have to wait up to 15 minutes and restart your Chromecast. You'll see this if the status of the device changed in to "Ready for Testing."
来源:https://stackoverflow.com/questions/17911939/unable-to-debug-whitelisted-device-applicationsession-failing-to-start