# I can't upload the Avatar in Unity 2022

**URL:** <https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876>\
**Category:** Help!\
**Tags:** avatar, sdk3\
**Created:** [July 30, 2024, 6:22am UTC](https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876 "2024-07-30T06:22:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AronaSaikoudesu](https://yyz1.discourse-cdn.com/vrchat/user_avatar/ask.vrchat.com/aronasaikoudesu/32/25773_2.png) [@AronaSaikoudesu](https://ask.vrchat.com/u/AronaSaikoudesu)\
**Post date:** [July 30, 2024, 6:22am UTC](https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876/1 "2024-07-30T06:22:17Z")

</div>

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.Dictionary`2[TKey,TValue] queryParams, System.Boolean forceRefresh, T body, System.String contentType, System.Byte[] contentMD5, System.Int32 contentLength, System.Int32 timeout, System.Action`1[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.Dictionary`2[TKey,TValue] queryParams, System.Boolean forceRefresh, T body, System.String contentType, System.Byte[] contentMD5, System.Int32 contentLength, System.Int32 timeout, System.Action`1[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.Dictionary`2[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.Dictionary`2[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()

---

<div class="post-metadata">

**Author:** ![docteh](https://yyz1.discourse-cdn.com/vrchat/user_avatar/ask.vrchat.com/docteh/32/12171_2.png) [@docteh](https://ask.vrchat.com/u/docteh)\
**Post date:** [July 31, 2024, 7:01pm UTC](https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876/2 "2024-07-31T19:01:37Z")

</div>

> [@AronaSaikoudesu](#):
>
> ArgumentException: Illegal byte sequence encounted in the input.  
> Parameter name: string

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?

---

<div class="post-metadata">

**Author:** ![AronaSaikoudesu](https://yyz1.discourse-cdn.com/vrchat/user_avatar/ask.vrchat.com/aronasaikoudesu/32/25773_2.png) [@AronaSaikoudesu](https://ask.vrchat.com/u/AronaSaikoudesu)\
**Post date:** [August 1, 2024, 11:12am UTC](https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876/4 "2024-08-01T11:12:36Z")

</div>

> [@docteh](#):
>
> 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?

 ![屏幕截图 2024-08-01 190806](https://global.discourse-cdn.com/vrchat/original/3X/c/1/c19b2d02d420b8f094850abda15ddfc0ec5b79d3.png)  
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.PopupField`1[T].GetValueToDisplay () (at <332857d8803a4878904bcf8f9581ec33>:0) UnityEngine.UIElements.BasePopupField`2[TValueType,TValueChoice].SetValueWithoutNotify (TValueType newValue) (at \<332857d8803a4878904bcf8f9581ec33\>:0)  
UnityEngine.UIElements.PopupField`1[T].SetValueWithoutNotify (T newValue) (at <332857d8803a4878904bcf8f9581ec33>:0) UnityEngine.UIElements.BaseField`1[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)

---

<div class="post-metadata">

**Author:** ![AronaSaikoudesu](https://yyz1.discourse-cdn.com/vrchat/user_avatar/ask.vrchat.com/aronasaikoudesu/32/25773_2.png) [@AronaSaikoudesu](https://ask.vrchat.com/u/AronaSaikoudesu)\
**Post date:** [August 1, 2024, 11:22am UTC](https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876/6 "2024-08-01T11:22:51Z")

</div>

![屏幕截图 2024-08-01 191929](https://global.discourse-cdn.com/vrchat/original/3X/c/7/c78e2b8ba584b6321b293439d5fce1cede74ac26.png)  
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.

---

<div class="post-metadata">

**Author:** ![SenkyDragon](https://yyz1.discourse-cdn.com/vrchat/user_avatar/ask.vrchat.com/senkydragon/32/26255_2.png) [@SenkyDragon](https://ask.vrchat.com/u/SenkyDragon)\
**Post date:** [October 3, 2024, 4:55pm UTC](https://ask.vrchat.com/t/i-cant-upload-the-avatar-in-unity-2022/25876/7 "2024-10-03T16:55:58Z")

</div>

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.
