Topic: Warning in Unity console "Couldn't connect to server"

Hi,

I just started a project I was working on a few months ago, and I noticed the following warning message showing up in the Unity editor console:

Console wrote:

Couldn't connect to server
0x00000001417B4F9B (Unity) StackWalker::GetCurrentCallstack
0x00000001417B6C4F (Unity) StackWalker::ShowCallstack
0x0000000141791010 (Unity) GetStacktrace
0x0000000140D49E7B (Unity) DebugStringToFile
0x0000000140D4A65C (Unity) DebugStringToFile
0x00000001414104C2 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000000036F68AAB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
0x0000000036F68994 (Mono JIT Code) [DebugLogHandler.cs:9] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000000036F68325 (Mono JIT Code) [Logger.cs:41] UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000000036F67B66 (Mono JIT Code) [DebugBindings.gen.cs:168] UnityEngine.Debug:LogWarning (object)
0x0000000036F66035 (Mono JIT Code) [OnlineMapsTileSetControl.cs:955] OnlineMapsTileSetControl:OnElevationRequestComplete (string)
0x0000000036F651D6 (Mono JIT Code) [OnlineMapsTextWebService.cs:56] OnlineMapsTextWebService:OnRequestComplete (OnlineMapsWWW)
0x0000000036F64E71 (Mono JIT Code) [OnlineMapsWWW.cs:195] OnlineMapsWWW:Finish ()
0x0000000023DB9E8D (Mono JIT Code) [OnlineMapsWWW.cs:307] OnlineMapsWWW/<WaitResponse>c__Iterator0:MoveNext ()
0x0000000023DB99E1 (Mono JIT Code) [Coroutines.cs:17] UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
0x0000000023DB9B5B (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
0x00007FFC5C875823 (mono) [mini.c:4937] mono_jit_runtime_invoke
0x00007FFC5C7C8435 (mono) [object.c:2623] mono_runtime_invoke
0x0000000141072BA5 (Unity) scripting_method_invoke
0x00000001410684F1 (Unity) ScriptingInvocation::Invoke
0x0000000140E1BF98 (Unity) Coroutine::InvokeMoveNext
0x0000000140E2100C (Unity) Coroutine::Run
0x00000001414AC6A3 (Unity) WWWDelayCall::Callback
0x0000000140ACE6D3 (Unity) DelayedCallManager::Update
0x0000000140D7E373 (Unity) PlayerLoop
0x0000000141730EEE (Unity) Application::UpdateScene
0x00000001417326BF (Unity) Application::UpdateSceneIfNeeded
0x000000014173AF3A (Unity) Application::TickTimer
0x000000014180693C (Unity) CrashCallback
0x0000000141808584 (Unity) WinMain
0x0000000141AECE74 (Unity) strnlen
0x00007FFC973862B4 (KERNEL32) BaseThreadInitThunk
0x00007FFC99758A41 (ntdll) RtlUserThreadStart

The maps load, and everything seems to be fine at first glance, though. Doesn't matter if I use Google, Bing, Here...  I also updated to the latest stable version which as of today seems to be 2.5.13.1.

What does the message mean, is there something I can/should do about it?

Re: Warning in Unity console "Couldn't connect to server"

Hello.

[OnlineMapsTileSetControl.cs:955] OnlineMapsTileSetControl:OnElevationRequestComplete (string)

This line means that you have some problems with connecting to Bing Maps Elevation API.
I checked the work of elevations on my side, and it works correctly.
Unfortunately, I do not know why this problem is happening on your side.
There can be many reasons why this is happens.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

3 (edited by iko79 2017-07-17 08:52:18)

Re: Warning in Unity console "Couldn't connect to server"

Right, I noticed the elevation data didn't work anymore. I have no idea why, though. The key didn't expire, I even tried creating a new one, also doesn't work. Usage report on bingmapsportal.com doesn't show any access attempts for the key. I think I remember there was a documentation with a few things to consider, but I cannot find it anymore. The documentation PDF doesn't tell much... I have to set the provider to "Virtual Earth (Bing Maps)", right? What else can be wrong, is there a way to isolate the source of the issue? I tried to check the "Use Elevation" check in the Tileset sample and enter the key -- also doesn't work, however I remember this was quite straightforward in the past. I am not sure, maybe I got some bad configuration of my assets, but I cannot think of anything that's changed as I didn't touch the project for three months or so.

Re: Warning in Unity console "Couldn't connect to server"

Provider of tiles does not matter.

How to isolate the problem:
1. Try to make a request to Bing Maps Elevation API using OnlineMapsBingMapsElevation.GetElevationByBounds.
http://infinity-code.com/doxygen/online … a5e824decb
2. Try to make the request using WWW like in example from MSDN:
https://msdn.microsoft.com/en-us/library/jj158961.aspx

If the problem persists, you can use ESRI Elevations instead of Bing Maps Elevations.
Example:
http://forum.infinity-code.com/viewtopi … 1420#p1420

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

5 (edited by iko79 2017-07-19 15:49:56)

Re: Warning in Unity console "Couldn't connect to server"

Hi Alex,
Thanks for the reply. I tested 1) and got the same error (Couldn't connect to server). With 2), when I'm requesting

http://dev.virtualearth.net/REST/v1/Elevation/List?points=35.89431,-110.72522,35.89393,-110.72578,35.89374,-110.72606,35.89337,-110.72662&key=BingMapsKey

with my BingMaps key inserted at the end, I'm getting the following response:

<html>
<head>
<script>window.close();</script></head>
<body>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
</body>
</html>

Not sure what that's supposed to tell me. Maybe somebody can give me a hint. ESRI works so far, thanks for the hint!

Re: Warning in Unity console "Couldn't connect to server"

Hello.

<script>window.close();</script>

This is a very interesting line.
Do you have any corporate or personal proxy?
It looks like your request has been blocked from the outside.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Warning in Unity console "Couldn't connect to server"

Jesus! You were right, there was a misconfigured DNS adblocker installed by our IT guys, listing the domain site as ad/scam. I actually expected getting something like an HTTP error code in such a case...

Works again, thanks!