Unity 6: Cannot resolve destination host

Hi! I need help regarding an error I am getting on Unity6 IN the editor.

The code worked last time I used it, but it was not on Unity6. After the change, it seems that the URL is not reachable anymore. I tested it with other URLs on testrequests, but the same error occured.

Is there a setting anywhere which I have to configure in Unity6?

Here is the test request:

IEnumerator TestGetRequest()
{
string testUrl = “https://jsonplaceholder.typicode.com/todos/1”;
UnityWebRequest testRequest = UnityWebRequest.Get(testUrl);

yield return testRequest.SendWebRequest();

if (testRequest.result == UnityWebRequest.Result.ConnectionError ||
testRequest.result == UnityWebRequest.Result.ProtocolError)
{
Debug.LogError("Error: " + testRequest.error);
}
else
{
Debug.Log(“Test Request Success”);
Debug.Log("Response: " + testRequest.downloadHandler.text);
}
}

I get the error:
“Cannot resolve destination host”

I would appreciate any help!

Perhaps a temporary downtime of the server or your connection?

PS: please put code in code tags for readability.

Okay, this is somehow embarassing. My 2 years old son pressed the power button on my PC resulting in it starting to shut down. I have managed to click the “abort” button to not let it shut down since I would lose the changes on my project.
It happens to be, that this “midway shutdown” had already somehow shut down processes that where needed for Unitys WebRequest to work.
So, just restarting the PC fixed the bug :'). Hours of bug-search for nothing.

For the unlikely - but maybe possible - situation someone get’s the same mistake.

1 Like