Request timeout or Cannot resolve destination host (HttpException / WebRequestException)

Please help me understand. Are this types of exception caused just by bad user inernet connection?

WebRequestException : Cannot resolve destination host
HttpException : Cannot connect to destination host
HttpException : (0) Request timeout

Crashlytics report displays about 25-35% users face this problems with Cloud Code (C# module) and Cloud Save in my released Google Play project.

I'm also getting this Exception. didn't find any solution for it yet. Seems to be thrown internally on Cloud code service after a certain time that the service was not called. After one time it throws the exception, I can re run the project and then it works.

It's as if the service is put to sleep and wakes up after called once...
Hope someone from Unity will address this asap.

1 Like

NoInternetConnection
Request timeout

UnityEngine.Debug:LogError (object)
Unity.Services.CloudCode.CloudCodeInternal:BuildException (bool,long,int,string,Unity.Services.CloudCode.Internal.Http.HttpException) (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/CloudCode.cs:181)
Unity.Services.CloudCode.CloudCodeInternal/d_15:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/CloudCode.cs:123)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.CloudCode.Internal.Response1>:SetException (System.Exception)
Unity.Services.CloudCode.CloudCodeInternal/d
20:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/CloudCode.cs:234)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.CloudCode.Internal.Response1>:SetException (System.Exception)
Unity.Services.CloudCode.Internal.Apis.CloudCode.CloudCodeApiClient/d
8:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/com.unity.services.cloudcode.internal/Apis/CloudCodeApi.cs:167)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult (Unity.Services.CloudCode.Internal.Http.HttpClientResponse)
Unity.Services.CloudCode.Internal.Http.HttpClient/d
2:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/com.unity.services.cloudcode.internal/Http/HttpClient.cs:44)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult (Unity.Services.CloudCode.Internal.Http.HttpClientResponse)
Unity.Services.CloudCode.Internal.Http.HttpClient/d
4:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/com.unity.services.cloudcode.internal/Http/HttpClient.cs:69)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult (Unity.Services.CloudCode.Internal.Http.HttpClientResponse)
Unity.Services.CloudCode.Internal.Http.HttpClient/d
6:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/com.unity.services.cloudcode.internal/Http/HttpClient.cs:105)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult (Unity.Services.CloudCode.Internal.Http.HttpClientResponse)
Unity.Services.CloudCode.Internal.Http.HttpClient/<>c
DisplayClass6_0/<b0>d:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/com.unity.services.cloudcode.internal/Http/HttpClient.cs:102)
System.Threading.Tasks.TaskCompletionSource`1:SetResult (Unity.Services.CloudCode.Internal.Http.HttpClientResponse)
Unity.Services.CloudCode.Internal.Http.UnityWebRequestHelpers/<>c
DisplayClass0_0:b_0 (UnityEngine.AsyncOperation) (at ./Library/PackageCache/com.unity.services.cloudcode@2.5.1/Runtime/com.unity.services.cloudcode.internal/Http/UnityWebRequestHelpers.cs:34)
UnityEngine.AsyncOperation:InvokeCompletionEvent () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/AsyncOperation.cs:21)

I have similar problem.
Every time when I open my app (on phone or editor) i got timeout and i must restart app and after that everything works correctly :/

1 Like


Same here :(
I think we just have to wait until Unity fixes this bug :/

i ignored the error for a bit ; )
but now, if anyone is looking for a good work-around for this error, here's one:
https://forum.unity.com/posts/9523858/