Error uploading avatar from unity linux 2022.3.6f1

Build only does work. but when you launch build and publish get Upload fail
and 2 console errors (also tried in fresh unity install, new project, and template avatar)

First:

[Always] Exception has been thrown by the target of an invocation.
UnityEngine.Debug:LogError (object,UnityEngine.Object)
VRC.Core.Logger:LogError (string,VRC.Core.DebugLevel,UnityEngine.Object)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/d__115:MoveNext () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2186)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/d__115> (VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/d__115&)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder:UploadError (object,string)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/d__165:MoveNext () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2381)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<System.Exception>:Start<VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/<HandleUploadError>d__165> (VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/<HandleUploadError>d__165&) VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder:HandleUploadError (System.Exception) VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/<BuildAndUpload>d__163:MoveNext () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2363) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<VRC.SDKBase.Editor.Api.VRCAvatar>:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCApi/d__35:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:705)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<string>:SetException (System.Exception) VRC.SDKBase.Editor.Api.VRCApi/<UploadFile>d__38:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:1051) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<VRC.SDKBase.Editor.Api.VRCFile>:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCApi/d__182<System.Collections.Generic.Dictionary2<string, string>, VRC.SDKBase.Editor.Api.VRCFile>:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:385)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<VRC.SDKBase.Editor.Api.VRCFile>:SetException (System.Exception) VRC.SDKBase.Editor.Api.VRCApi/<MakeRequest>d__162<System.Collections.Generic.Dictionary2<string, string>, VRC.SDKBase.Editor.Api.VRCFile>:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:341) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<System.ValueTuple2<VRC.SDKBase.Editor.Api.VRCFile, System.Net.Http.HttpResponseMessage>>:SetException (System.Exception) VRC.SDKBase.Editor.Api.VRCApi/<MakeRequestWithResponse>d__152<System.Collections.Generic.Dictionary`2<string, string>, VRC.SDKBase.Editor.Api.VRCFile>:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:332)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCTools/d__4:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCTools.cs:101)
UnityEngine.UnitySynchronizationContext:ExecuteTasks () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

Second:

NullReferenceException: Object reference not set to an instance of an object
System.Collections.Generic.Dictionary2[TKey,TValue].get_Values () (at <bb088ab5ef6b437f85ed9cbe6066127e>:0) System.Reflection.RuntimePropertyInfo.GetterAdapterFrame[T,R] (System.Reflection.RuntimePropertyInfo+Getter2[T,R] getter, System.Object obj) (at :0)
System.Reflection.RuntimePropertyInfo.GetValue (System.Object obj, System.Object index) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimePropertyInfo.GetValue (System.Object obj, System.Object index) (at :0)
System.Reflection.PropertyInfo.GetValue (System.Object obj) (at :0)
VRC.SDKBase.Editor.Api.VRCTools.IncreaseSendBuffer (System.Uri targetUrl, System.Threading.Tasks.Task sendRequest, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCTools.cs:111)
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.Post[T,TResponse] (System.String requestUrl, T body, System.Collections.Generic.Dictionary2[TKey,TValue] queryParams, System.Boolean forceRefresh, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:385) VRC.SDKBase.Editor.Api.VRCApi.UploadFile (System.String filename, System.String fileId, System.String friendlyFileName, System.Action2[T1,T2] onProgress, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:765)
VRC.SDKBase.Editor.Api.VRCApi.CreateNewAvatar (System.String id, VRC.SDKBase.Editor.Api.VRCAvatar data, System.String pathToBundle, System.String pathToImage, System.Action`2[T1,T2] onProgress, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:660)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder.BuildAndUpload (UnityEngine.GameObject target, VRC.SDKBase.Editor.Api.VRCAvatar avatar, System.String thumbnailPath, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2321)
Rethrow as UploadException: Exception has been thrown by the target of an invocation.
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder.BuildAndUpload (UnityEngine.GameObject target, VRC.SDKBase.Editor.Api.VRCAvatar avatar, System.String thumbnailPath, System.Threading.CancellationToken cancellationToken) (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2363)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder+<>c__DisplayClass104_0.b__4 () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1817)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

2 Likes

also encountering same errors- if any fixes are found, would be greatly appreciated

1 Like

I’m having the same problem on macOS.

1 Like

a long time ago on old version of unity and vrchat i just made a vm on virtualbox and when i finish a project put it on the vm and upload. but this is very bruteforce on my opinion and resource wasting, this error should be fixed. sdk was working just 1 patch before update unity to 2022…

I had and just avoid same problem

  1. click “./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCTools.cs:101” on error message to open VisuakStudioEditor.
  2. insert " return; " statement at 1st line of “internal static async Task IncreaseSendBuffer()” function ( at next line of “{” , before “var servicePointScheduler = …” )
  3. save file, then Unity will run auto-rebuild of SDK script by detecting file change.
  4. you should be able to upoad avatars

This function is explained as “expanding send buffer to speed-up”, and cause error. So we should have no problem to skip this function’s process, just slow-down.

3 Likes

it just worked. thanks.

I’m not sure what exactly you mean. I think I did the code wrong. Its been a few years since I have looked at coding

Can you post a screenshot or something of how exactly step 2 should look? I’ve got zero brain for code and have no clue what I’m doing.

Thank you!

All I did was Detach the Pipeline Manager and it worked so I don’t know