Com.google.GCKError Code = 2 when connected to ChromeCast device
I am working on an iOS app where I now want to integrate ChromeCast support. I am using the HelloGoogleVideoCast example to test my hardware settings and get some inspiration for my application.
Now I stumbled upon a problem that is present in both my application and HelloGoogleVideoCast. When I connect to the device (connectToDevice method in HelloGoogleVideoCast), I get the error "The operation could not be completed (com.google.GCKError error 2.)". I turned off the power to the device with no change in behavior. I never get to the callback deviceManagerDidConnect and with this error deviceManager is called: didFailToConnectWithError. However, I can connect to the iOS YouTube app.
I can't find anything with the substance if I do, and I can't find good ChromeCast developer forums.
Does anyone have any deal with how to solve this?
source to share
I'm not sure if this helps, but you can try:
Download the Chromecast app from the app store: chrome link
Once you see yours -> chromecast
select -> chromecast
General -> make sure both checkboxes are checked (I know the text has nothing to do with your problem).
Try now.
If the error still occurs, try restarting chromecast
.
If the error persists, try resetting yours chromecast
and then check the boxes again (don't forget!).
source to share
I had the same problem as yours and the following changes worked for me on the receiver:
- I put script src = "//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js" inside the main tag and before the title tag;
- I put my script file that controlled all the cast functions after the body tag (in fact, I put all the script declarations except for the cast_receiver, after the body tag, including jQuery);
I hope this can help you :)
source to share