Trouble uploading vrchat avatar with unity 2022.3.6f1 using linux mint

hey, im using linux mint so im curretly stuck cause every time i press build and run these two come up:

[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/<UploadError>d__115:MoveNext () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2186)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/<UploadError>d__115> (VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/<UploadError>d__115&)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder:UploadError (object,string)
VRC.SDK3A.Editor.VRCSdkControlPanelAvatarBuilder/<HandleUploadError>d__165:MoveNext () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:2381)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<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.AsyncTaskMethodBuilder`1<VRC.SDKBase.Editor.Api.VRCAvatar>:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCApi/<CreateNewAvatar>d__35:MoveNext () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/API/VRCApi.cs:705)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<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.AsyncTaskMethodBuilder`1<VRC.SDKBase.Editor.Api.VRCFile>:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCApi/<Post>d__18`2<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:385)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<VRC.SDKBase.Editor.Api.VRCFile>:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCApi/<MakeRequest>d__16`2<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:341)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.ValueTuple`2<VRC.SDKBase.Editor.Api.VRCFile, System.Net.Http.HttpResponseMessage>>:SetException (System.Exception)
VRC.SDKBase.Editor.Api.VRCApi/<MakeRequestWithResponse>d__15`2<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/<IncreaseSendBuffer>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 one}

NullReferenceException: Object reference not set to an instance of an object
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Values () (at <bb088ab5ef6b437f85ed9cbe6066127e>:0)
System.Reflection.RuntimePropertyInfo.GetterAdapterFrame[T,R] (System.Reflection.RuntimePropertyInfo+Getter`2[T,R] getter, System.Object obj) (at <bb088ab5ef6b437f85ed9cbe6066127e>:0)
System.Reflection.RuntimePropertyInfo.GetValue (System.Object obj, System.Object[] index) (at <bb088ab5ef6b437f85ed9cbe6066127e>: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 <bb088ab5ef6b437f85ed9cbe6066127e>:0)
System.Reflection.PropertyInfo.GetValue (System.Object obj) (at <bb088ab5ef6b437f85ed9cbe6066127e>: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.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.Post[T,TResponse] (System.String requestUrl, T body, System.Collections.Generic.Dictionary`2[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.Action`2[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.<CreateBuildGUI>b__4 () (at ./Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder.cs:1817)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <bb088ab5ef6b437f85ed9cbe6066127e>: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)

Unfortunately, we don’t support the development of VRChat content on any platform except Windows! :S

The first stack seems to point to some issues with reflection, which is probably the main culprit. The second is a null ref which is probably caused by the first.

Reflection is a pretty fragile process and I would expect it to break in an unknown or unsupported environment like Linux Mint.

Can you copy the project over to a Windows OS (perhaps a VM?) and try in there?

i can try, thanks for the help :3

1 Like

Hi, there are some related Cannys for this issue.
https://feedback.vrchat.com/sdk-bug-reports/p/350-beta1-avatar-upload-fails-on-linux-editor
https://feedback.vrchat.com/sdk-bug-reports/p/unity-2022-unable-to-upload-avatars-on-unity-editor-for-macos

One of the known solutions is in this tweet (written in Japanese).

You can try it if you like.

1 Like