Exception: ApiResponseException: Unknown Error

The same code is normal on Android, but it will report an exception on iOS. How to solve it?
Exception is:
Exception: ApiResponseException: Unknown Error

Nakama.ApiClient.AuthenticateCustomAsync (System.String basicAuthUsername, System.String basicAuthPassword, Nakama.ApiAccountCustom account, System.Nullable1[T] create, System.String username, System.Nullable1[T] cancellationToken) (at <00000000000000000000000000000000>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.Task.FinishContinuations () (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.Task.TrySetException (System.Object exceptionObject) (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.TaskCompletionSource1[TResult].TrySetException (System.Exception exception) (at <00000000000000000000000000000000>:0) Nakama.UnityWebRequestAdapter+<SendRequest>d__13.MoveNext () (at <00000000000000000000000000000000>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0) --- End of stack trace from previous location where exception was thrown --- Nakama.RetryInvoker.InvokeWithRetry[T] (System.Func1[TResult] request, Nakama.RetryHistory history) (at <00000000000000000000000000000000>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.Task.FinishContinuations () (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.Task.TrySetException (System.Object exceptionObject) (at <00000000000000000000000000000000>:0)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].SetException (System.Exception exception) (at <00000000000000000000000000000000>:0) Nakama.ApiClient.AuthenticateCustomAsync (System.String basicAuthUsername, System.String basicAuthPassword, Nakama.ApiAccountCustom account, System.Nullable1[T] create, System.String username, System.Nullable`1[T] cancellationToken) (at <00000000000000000000000000000000>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)

Hello @zhuguiqing,

What are the Nakama and SDK versions you are using? Is there an error log on the server side?

@flavio SDK version is 3.10.1.There is no error log on the server side.

If I’m not mistaken a ApiResponseException would result from a server error however “Unknown Error” isn’t very helpful and distinct from the usual “Internal Error”. That exception should contain as fields the status code and response content, could you verify which values those contains? Could you share a code snippet as well?

OK,thank you.We finally found the problem. In the plist of iOS, a field called NSAppTransportSecurity blocks the client’s network.