question

Anton avatar image
Anton asked

Stopped being able to upload custom game server builds via admin api

some time ago (maybe a week or so) I started to face a problem with uploading custom game server builds. Everything worked just fine before, no code changes or api update were done. Its not 100% reproduce rate, but quite often.

TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_FLAG_NOT_TRUSTED Mono.Unity.Debug.CheckAndThrow (Mono.Unity.UnityTls+unitytls_errorstate errorState, Mono.Unity.UnityTls+unitytls_x509verify_result verifyResult, System.String context, Mono.Security.Interface.AlertDescription defaultAlert) (at <3845a180c26b4889bc2d47593a665814>:0) Mono.Unity.UnityTlsContext.ProcessHandshake () (at <3845a180c26b4889bc2d47593a665814>:0) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status) (at <3845a180c26b4889bc2d47593a665814>:0) (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus) Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) (at <3845a180c26b4889bc2d47593a665814>:0) Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () (at <3845a180c26b4889bc2d47593a665814>:0) --- End of stack trace from previous location where exception was thrown ---

Upgrade to latest sdk v2.62.190304 didnt help.

title id 5626

here is uploading code

https://i.imgur.com/LD1LOi2.png

var request = (HttpWebRequest)WebRequest.Create(uploadUrl); request.Method = "PUT"; request.ContentType = "application/x-zip-compressed"; request.ContentLength = zipFileBytes.Length; Stream dataStream = request.GetRequestStream(); dataStream.Write(zipFileBytes, 0, zipFileBytes.Length); dataStream.Close(); HttpWebResponse uploadResponse = (HttpWebResponse)request.GetResponse();

Thank you for response in advance, and generally for good support so far.

apisCustom Game Servers
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·
  1. What's the version of Unity Engine?
  2. Which API you are using to upload server build? Is it the Legacy Multiplayer server?
  3. In your Unity project, which version of .NET framework you are using?

According to the error message, there is a possibility that the improper TLS protocol version causes the issue.

0 Likes 0 ·
Anton avatar image Anton commented ·

1. Unity version 2018.0.f3

2. yes

3. .net 4.x equivalent

Today it worked ok, but some days it doesnt work whole day

0 Likes 0 ·

1 Answer

·
Andy avatar image
Andy answered

That's not something we've seen unfortunately. My only two pieces of advice would be to upgrade to latest Unity (which might be a hassle) or try rolling your own certificate validator. That second approach is mentioned in this thread: https://community.playfab.com/questions/25551/playfab-not-working-on-amazon-linux-20183.html

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.