I can't upload the Avatar in Unity 2022

I can upload Avatars smoothly in Unity 2019, but I completely can’t upload them in 2022.
The following is a Unity error message.

ArgumentException: Illegal byte sequence encounted in the input.
Parameter name: string
System.Runtime.InteropServices.Marshal.PtrToStructure[T] (System.IntPtr ptr) (at <27124aa0e30a41659b903b822b959bc7>:0)
System.Net.NetworkInformation.Win32NetworkInterface.get_FixedInfo () (at :0)
System.Net.NetworkInformation.Win32IPGlobalProperties.get_DomainName () (at :0)
System.Net.CookieContainer…ctor () (at :0)
VRC.SDKBase.Editor.Api.VRCApi.GetCookies (System.Uri url) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:81)
VRC.SDKBase.Editor.Api.VRCApi.GetClient (System.Uri url) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:98)
VRC.SDKBase.Editor.Api.VRCApi.MakeRequestWithResponse[T,TResponse] (System.String requestUrl, System.Net.Http.HttpMethod method, System.Collections.Generic.Dictionary2[TKey,TValue] queryParams, System.Boolean forceRefresh, T body, System.String contentType, System.Byte[] contentMD5, System.Int32 contentLength, System.Int32 timeout, System.Action1[T] onProgress, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:268)
VRC.SDKBase.Editor.Api.VRCApi.MakeRequest[T,TResponse] (System.String requestUrl, System.Net.Http.HttpMethod method, System.Collections.Generic.Dictionary2[TKey,TValue] queryParams, System.Boolean forceRefresh, T body, System.String contentType, System.Byte[] contentMD5, System.Int32 contentLength, System.Int32 timeout, System.Action1[T] onProgress, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:340)
VRC.SDKBase.Editor.Api.VRCApi.Get[T] (System.String requestUrl, System.Collections.Generic.Dictionary2[TKey,TValue] queryParams, System.Boolean forceRefresh, System.Boolean allowRetry, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:357) VRC.SDKBase.Editor.Api.VRCApi.Get[T] (System.String requestUrl, System.Collections.Generic.Dictionary2[TKey,TValue] queryParams, System.Boolean forceRefresh, System.Boolean allowRetry, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:365)
VRC.SDKBase.Editor.Api.VRCApi.GetAvatar (System.String id, System.Boolean forceRefresh, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:573)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder.HandleAvatarSwitch (UnityEngine.UIElements.VisualElement root) (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1383)
UnityEngine.Debug:LogException(Exception)
VRC.SDK3A.Editor.d__86:MoveNext() (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1421)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(d__86&)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder:HandleAvatarSwitch(VisualElement)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder:CreateContentInfoGUI(VisualElement) (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1327)
VRCSdkControlPanel:b__184_1() (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/ControlPanel/VRCSdkControlPanelBuilder.cs:672)
UnityEditor.RetainedMode:UpdateSchedulers()

Is there just one message shown here or multiple? Stack trace information from the bottom half pointing at specific lines is only useful for unity developers who need to change thier code.

For VRChat SDK purposes it’s just nonsense to try and scroll past.

Something is going wrong with the conversation betw3n the editor and the VRChat service. Check for other messages?


There is indeed another error.

NullReferenceException: Object reference not set to an instance of an object
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder+<>c.b__85_0 (System.String selected) (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1264)
UnityEngine.UIElements.PopupField1[T].GetValueToDisplay () (at <332857d8803a4878904bcf8f9581ec33>:0) UnityEngine.UIElements.BasePopupField2[TValueType,TValueChoice].SetValueWithoutNotify (TValueType newValue) (at <332857d8803a4878904bcf8f9581ec33>:0)
UnityEngine.UIElements.PopupField1[T].SetValueWithoutNotify (T newValue) (at <332857d8803a4878904bcf8f9581ec33>:0) UnityEngine.UIElements.BaseField1[TValueType].set_value (TValueType value) (at <332857d8803a4878904bcf8f9581ec33>:0)
UnityEngine.UIElements.PopupField`1[T].set_value (T value) (at <332857d8803a4878904bcf8f9581ec33>:0)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder.HandleAvatarSwitch (UnityEngine.UIElements.VisualElement root) (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1481)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at <27124aa0e30a41659b903b822b959bc7>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext.Exec () (at :0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at :0)


And the upload panel keep showing me that it is loading. I also tried reinstalling the Unity editor, but it didn’t help at all.

This is caused when all three of these things happen at the same time:

  • There is a non-english character in your project path
  • Your system is set to a non-english locale
  • You are using a project plugin that uses Harmony to patch a method

VRCFury will resolve this issue if it’s in your project. Your other alternative is to move your project to a folder path that only contains english characters.