Xcode Cloud comms errors - "A server with the specified hostname could not be found."

I have Xcode Cloud setup to run my unit tests a couple of times a day so I can be informed of any API issues.

Quite often, my tests will fail with "A server with the specified hostname could not be found." even though the server is fine. I re-run the tests locally in Xcode and they all pass.

I'm wondering if there's something Xcode Cloud might be doing to the request to make the connection fail?

Is it possible to maybe setup a proxy for the tests from Xcode Cloud?

Post not yet marked as solved Up vote post of dazboj Down vote post of dazboj
402 views

Replies

I have been experiencing the exact same issue ever since my workflows started running on macOS Sonoma. I can workaround it by setting my workflow to run on Ventura instead, but obviously that is not a proper fix.

A similar thing has been happening since updating our Xcode Cloud workflow to Sonoma for some UI Tests. For a while we were using the workaround mentioned by @cam-dh, setting the workflow to run on Ventura, but unfortunately this approach now sees other problems, by failing to install the simulators seemingly randomly.

Doing some testing on this, it seems the problem does not apply to all API's, as calling something like the https://dummyjson.com endpoints, works like a charm. While any attempt to contact our own API, hosted on azure, will fail with the error mentioned.