swiftmacoschromecastgoogle-castgoogle-cast-sdk

Error in Xcode when trying to connect to Chromecast (Google Cast SDK)


Hi I'm trying to connect to a Chromecast using the Google Cast SDK on a Mac running macOS 10.15.4 and Xcode version 11.4.1 (11E503a) and getting the error:

nw_resolver_start_query_timer_block_invoke [C1] Query fired: did not receive both families in time for 8c3a638c-89a9-b15b-a9e1-6826acf9ee64.local.:8009

In Xcode when trying to connect to a Chromecast. I have done some research and only found this thread How to fix "nw_connection_receive_internal_block_invoke" (console). The error seems related to that the connection to the Chromecast is not over https but have not had any luck trying to allow insecure traffic as a test to see if that solved the problem.

I know that there is not much to go on besides the error code but could not find any related question.


Solution

  • Some things on Chromecast require https; others work over localhost. To check whether Chromecast-on-localhost is the source of the problem, try connecting to Chromecast's default receiver (not your own custom receiver) and streaming your media from public urls, such as those included in the Chromecast iOS codelab. If that doesn't make the errors go away, you need to look elsewhere.

    For more detail about when Chromecast requires localhost, see this answer.