UNITYTLS_INTERNAL_ERROR, verify result: 4294936704. Any idea what that is ?

Context: I’m trying to use secure web socket between a WebGL Unity client and a Unity EXE running on Windows Server 2012 with Amazon Gamelift. I’m using Unity 2021.3.4 for this.

The game uses Fishnet Networking (websocket code is the same as Mirror Networking), and I have figured out how to get the required certificate.pfx file for the SSL configuration.

However, when a WebGL client tried to connect through secure websockets, I get that UNITYTLS_INTERNAL_ERROR error, with the verify result that really doesn’t help me much.

Has anyone had any similar problems with websockets in Unity ?

The same game with insecure websockets on server and client works fine.

@unisip Did you find a fix? Im having the same issue

@N3Essential are you using gamelift ? As far as I remember we finally got SSL to work on gamelift (not sure exactly how we fixed the issue), but we dropped gamelift because it was causing massive slowdown with SSL and was not viable. Instead we decided to run our how containers on EC2 machines, and it works much better for us.

@unisip @N3Essential we are also running into this issue. Works on http but not https. I generated the .pfx and enabled wss. I’m using Unity v2021.3.16 and Mirror. I’m going to try different versions to see if this helps.

Are you also on GameLift ? Unfortunately, unless they fixed it (which I haven’t heard about(, GameLift was a no go for us —> they seem to be doing some cryptic stuff for security that turns out to slow down SSL vert badly on their spawned server instances. We reported that to the AWS support guys but they were never able to get back to us with a solution, so we ended up ditching GameLift altogether and manager AWS containers ourselves (which work fine with SSL). So unless you have good contacts at AWS that can ensure you won’t be stuck with slow SSL network rate, I wouldn’t even bother. GameLift not handling SSL well for us was in sept 2022. I hope the AWS folks fix that in the future, as the rest of the tech is quite helpful if you don’t want to bother with matchmaking

@unisip thanks for your response. We finally fixed our issue. We are not using gamelift. However, I am going to post what fixed this issue for us in case others get stuck with the UNITYTLS_INTERNAL_ERROR.

# 1) Setup a Server to run your game server

  • This server will host your dedicated server build files exported from unity.
  • I used this video as a refernce to get this setup.

# 2) Create a Domain that will point to your ec2 server.

  • I used DreamHost for my example, but other hosting services should also work.
  • You do not need the hosting option for this domain, as it will simply serve as a way to point to your unity server IP address.

# 3) Point your domain to your server IP address (e.g., ec2)

  • To do this, you will need to update your DNS record
  • In my case, setting the @ record to my public ec2 elastic IP address worked

# 4) Configuring Server

  • ssh into the ec2 server and follow the instructions in the Setting Up SSL section
  • You may need superuser permissions for some of the steps.

# 5) Testing

  • Run your server as shown in the video referenced in step 1.
  • Connect your client to the host using the domain name created in step 2
  • In my case, the webgl files are hosted on a separate server from the ones mentioned in steps 1 and 2 (although this may not be necessary).
  • Assuming you have completed the previous steps correctly, your client should now connect to the server using wss from an https site.