egametang/ET

ET7.2 在配置时第一次启动LoginHelper报错

snowechen opened this issue · 2 comments

错误代码如下:(论坛上看了几个帖子也有人遇到这个问题,有人说是W11的问题,有人说是HttpClient的问题,目前不知道怎么解决)
System.Exception: http request fail: http://127.0.0.1:30300/get_router
System.ArgumentException: Illegal byte sequence encounted in the input.
Parameter name: string
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_string_from_byvalstr(intptr,int)
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.PtrToStructure(intptr,System.Type)
at System.Runtime.InteropServices.Marshal.PtrToStructure[T] (System.IntPtr ptr) [0x00000] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0
at System.Net.NetworkInformation.Win32NetworkInterface.get_FixedInfo () [0x00024] in <111da4cba18442e7addb95bcddc21c3b>:0
at System.Net.NetworkInformation.Win32IPGlobalProperties.get_DomainName () [0x00000] in <111da4cba18442e7addb95bcddc21c3b>:0
at System.Net.CookieContainer..ctor () [0x0003f] in <111da4cba18442e7addb95bcddc21c3b>:0
at System.Net.Http.MonoWebRequestHandler.get_CookieContainer () [0x0000a] in <2a880b51598f4c7a8ba751c30317e881>:0
at System.Net.Http.MonoWebRequestHandler.CreateWebRequest (System.Net.Http.HttpRequestMessage request) [0x000f5] in <2a880b51598f4c7a8ba751c30317e881>:0
at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000cf] in <2a880b51598f4c7a8ba751c30317e881>:0
at System.Net.Http.HttpClient.SendAsyncWorker (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) [0x000e8] in <2a880b51598f4c7a8ba751c30317e881>:0
at ET.Client.HttpClientHelper.Get (System.String link) [0x0004f] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\Codes\Hotfix\Client\Demo\Router\HttpClientHelper.cs:14
at ET.Client.HttpClientHelper.Get (System.String link) [0x0016d] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\Codes\Hotfix\Client\Demo\Router\HttpClientHelper.cs:20
at ET.ETTask`1[T].GetResult () [0x00036] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\ThirdParty\ETTask\ETTask.cs:246
at ET.Client.RouterAddressComponentSystem.GetAllRouter (ET.Client.RouterAddressComponent self) [0x0006e] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\Codes\Hotfix\Client\Demo\Router\RouterAddressComponentSystem.cs:30
at ET.ETTask.GetResult () [0x00030] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\ThirdParty\ETTask\ETTask.cs:126
at ET.Client.RouterAddressComponentSystem.Init (ET.Client.RouterAddressComponent self) [0x0003c] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\Codes\Hotfix\Client\Demo\Router\RouterAddressComponentSystem.cs:23
at ET.ETTask.GetResult () [0x00030] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\ThirdParty\ETTask\ETTask.cs:126
at ET.Client.LoginHelper.Login (ET.Scene clientScene, System.String account, System.String password) [0x000ab] in D:\UnityProject\Project-2023\ET-release7.2\Unity\Assets\Scripts\Codes\Hotfix\Client\Demo\Login\LoginHelper.cs:20
UnityEngine.Debug:LogError (object)
ET.UnityLogger:Error (string) (at Assets/Scripts/Loader/UnityLogger.cs:29)
ET.Logger:Error (System.Exception) (at Assets/Scripts/Core/Module/Log/Logger.cs:94)
ET.Log:Error (System.Exception) (at Assets/Scripts/Core/Module/Log/Log.cs:39)
ET.Client.LoginHelper/d__0:MoveNext () (at Assets/Scripts/Codes/Hotfix/Client/Demo/Login/LoginHelper.cs:45)
ET.ETAsyncTaskMethodBuilder:Start<ET.Client.LoginHelper/d__0> (ET.Client.LoginHelper/d__0&) (at Assets/Scripts/ThirdParty/ETTask/AsyncETTaskMethodBuilder.cs:57)
ET.Client.LoginHelper:Login (ET.Scene,string,string)
ET.Client.UILoginComponentSystem:OnLogin (ET.Client.UILoginComponent) (at Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UILogin/UILoginComponentSystem.cs:26)
ET.Client.UILoginComponentSystem/UILoginComponentAwakeSystem/<>c__DisplayClass0_0:b__0 () (at Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UILogin/UILoginComponentSystem.cs:17)
UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:514)

问题原来是计算机名不能是中文的,否则就会报这个错误 !

还真是计算机设备名称不能是中文。