Open novabyte opened 4 years ago
We're using the provided RpcHttpKeyExtensions.cs
and until now it was working perfectly!
We've just rolled out HTTPS support across our solutions and we're getting an issue with the only implementation that uses RPCAsyncPost
. The returned exception is Cert handshake failed. verify result: UNITYTLS_X509VERIFY_FATAL_ERROR.
@ShadowFactoryTeam I took another look at the extension code I'd written to refresh it in my mind. There's nothing in it that does anything different to the rest of the SDK. It uses the same UnityWebRequestAdapter.Instance
as all the other SDK functions would.
Can you share code for how you initialize the Client
type in your project?
There's no difference with how we initialize
public Client Client
{
get
{
if (_client == null)
{
_client = new Client(_httpScheme, _ipAddress, _port, _authSocketString, UnityWebRequestAdapter.Instance);
}
return _client;
}
}
This particular function with the issue is run on headless unity servers, we now believe it has to do with another issue that plagues Linux / Unity projects outlined here - https://forum.unity.com/threads/ubuntu-headless-build-tls-handshake-fails.546704/
@ShadowFactoryTeam I had a read of the issue on that forum thread and it looks like what you'll need to do:
curl
package is installed on the base distro that your headless instances are running on.Hope that helps.
@novabyte the missing CURL package was indeed the issue. Thanks for helping.
As a workaround its possible to add the attached extension method to the
IClient
type which will enable usage which looks like:A proper fix should be implemented in the code generator for the client sdk to handle this special case logic.
RpcHttpKeyExtensions.cs.txt