Search Unity

DNS issue under IPv6 environment when using .Net 4.6 scripting runtime

Discussion in 'iOS and tvOS' started by unalone, Dec 29, 2017.

  1. unalone

    unalone

    Joined:
    Sep 3, 2013
    Posts:
    8
    When using .Net 4.6 runtime, any Dns class's method, such as GetHostEntry/Async and BeginGetHostAddresses, no metter sync or async, will failed, and throw exception like this:

    BTW, this error will only affect to DEVICES, NOT EDITOR, so, why?

    SocketException: Could not resolve host 'SOME HOST ADDRESS'
    at System.Net.Dns.Error_11001 (System.String hostName) [0x00000] in <00000000000000000000000000000000>:0
    at System.Net.Dns.hostent_to_IPHostEntry (System.String originalHostName, System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00000] in <00000000000000000000000000000000>:0
    at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] in <00000000000000000000000000000000>:0
    at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00000] in <00000000000000000000000000000000>:0
    at Venus.Network.Connection`1+<connect>c__async0[THeader].MoveNext () [0x00000] in <00000000000000000000000000000000>:0
    at Venus.Network.Connection`1[THeader].connect (System.Action`1[T] callback) [0x00000] in <00000000000000000000000000000000>:0
    at Venus.Network.ConnectionManager.reconnect (System.String connectionName, System.String address, System.Int32 port, System.Action`2[T1,T2] completion) [0x00000] in <00000000000000000000000000000000>:0
    at reconnect (System.Action`2[T1,T2] completion) [0x00000] in <00000000000000000000000000000000>:0
    at LobbySceneController+<Login>c__AnonStorey6.<>m__3 (System.Boolean result) [0x00000] in <00000000000000000000000000000000>:0
    at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0
    at Account+<sendAccountLoginViaWeb>c__AnonStorey0.<>m__0 (SimpleJSON.JSONNode node) [0x00000] in <00000000000000000000000000000000>:0
    at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0
    at NetworkHelper+<loadWebJsonDataRoutine>c__Iterator2.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    at System.Threading.SendOrPostCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.UnitySynchronizationContext.ExecuteTasks () [0x00000] in <00000000000000000000000000000000>:0
     
  2. MoranGlobo

    MoranGlobo

    Joined:
    Dec 18, 2016
    Posts:
    4
    Did you manage to solve this? I have a similar issue.