Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Find source of System.Net.WebException Error: NameResolutionFailure

Discussion in 'Scripting' started by pistoleta, May 14, 2022.

  1. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Happens pretty often and I tried to log the few parts of the code that do web requests but can't find the culprit of this recurring crash... This is the stacktrace that does't tell me anything about the source....
    Please help me find a way to find the source of this:(

    System.AggregateException
    A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread....
    System.Net.WebException: Error: NameResolutionFailure
    Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw
    Module "System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter", in GetResult
    Module "System.Net.WebOperation", in WaitForCompletion
    Module "System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1", in Start
    Module "System.Net.WebOperation", in WaitForCompletion
    Module "System.Net.ServicePointScheduler", in StartScheduler
    Module "System.Threading.ContextCallback", in Invoke
    Module "System.Threading.ExecutionContext", in RunInternal
    Module "System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner", in Run
    Module "System.Action", in Invoke
    Module "System.Threading.Tasks.AwaitTaskContinuation", in RunOrScheduleAction
    Module "System.Threading.Tasks.Task", in FinishContinuations
    Module "System.Threading.Tasks.Task`1", in TrySetResult
    Module "System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise", in Invoke
    Module "System.Threading.Tasks.Task", in FinishContinuations
    Module "System.Threading.Tasks.Task`1", in TrySetResult
    Module "System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1", in SetResult
    Module "System.Net.ServicePointScheduler+AsyncManualResetEvent", in WaitAsync
    Module "System.Threading.ContextCallback", in Invoke
    Module "System.Threading.ExecutionContext", in RunInternal
    Module "System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner", in Run
    Module "System.Action", in Invoke
    Module "System.Threading.Tasks.AwaitTaskContinuation", in RunOrScheduleAction
    Module "System.Threading.Tasks.Task", in FinishContinuations
    Module "System.Threading.Tasks.Task`1", in TrySetResult
    Module "System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise", in Invoke
    Module "System.Threading.Tasks.Task", in FinishContinuations
    Module "System.Threading.Tasks.Task`1", in TrySetResult
    Module "System.Threading.Tasks.TaskCompletionSource`1", in TrySetResult
    Module "System.Func`2", in Invoke
    Module "System.Threading.Tasks.Task`1", in InnerInvoke
    Module "System.Threading.Tasks.Task", in Execute
    Module "System.Threading.ContextCallback", in Invoke
    Module "System.Threading.ExecutionContext", in RunInternal
    Module "System.Threading.Tasks.Task", in ExecuteWithThreadLocal
    Module "System.Threading.Tasks.Task", in ExecuteEntry
    Module "System.Threading.ThreadPoolWorkQueue", in Dispatch
     
  2. mrwellmann_

    mrwellmann_

    Joined:
    Jan 25, 2013
    Posts:
    4
    I had a similar issue setting Android->Configuration->Internet Access from Auto to Require in the Player settings fixed it.
     
    pistoleta likes this.