Search Unity

Unity Remote Settings does not work in headless instance

Discussion in 'Unity Analytics' started by louis030195, Mar 3, 2021.

  1. louis030195

    louis030195

    Joined:
    Feb 3, 2018
    Posts:
    14
    Hi,

    I am stuck for days on this issue, my client & server share some code that handles Remote Settings, the settings on the client are properly updated but on a headless instance, the settings are never updated.

    Code (CSharp):
    1. RemoteSettings.Completed += (b, b1, arg3) =>  HandleRemoteSettings();
    2.  
    3. // Never called
    4. private void HandleRemoteSettings() {
    5.     Debug.Log("Hello world");
    6. }
    7.  
    8. // Even when forcing
    9. RemoteSettings.ForceUpdate();
    10.  
    11.  
    Do Remote settings are supposed to work on a headless instance?
    Thanks
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Remote Settings is being deprecated later this year, you would be advised to migrate to Remote Config instead. I'm not familiar with the syntax you are using, I would suggest to use the documented approach first (unless the same code is working on your client). Also I trust you places similar Debug.Log statements around this code to confirm that it is properly executing. https://docs.unity3d.com/Packages/com.unity.remote-config@2.0/manual/CodeIntegration.html
     
  3. louis030195

    louis030195

    Joined:
    Feb 3, 2018
    Posts:
    14
    Great, I implemented the thing with the new package.

    It works on client and server (as a process), but I got this when I deploy my server (running in a ubuntu 20.04 container in Kubernetes).

    Curl error 35: Cert handshake failed. verify result: UNITYTLS_X509VERIFY_FATAL_ERROR. error state: 7


    My Kubernetes node is open-bar (no firewall rules anything).

    From doc "The web service from which Unity downloads Remote Config data is read-only, but not secure" so I don't even understand why it's struggling with TLS?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you Google for the error UNITYTLS_X509VERIFY_FATAL_ERROR and see if the results might apply?
     
  5. louis030195

    louis030195

    Joined:
    Feb 3, 2018
    Posts:
    14
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I wasn't implying that you didn't, I was checking to see if you tested with .NET versions as discussed in the links, for example.
     
  7. Bob-Zhang

    Bob-Zhang

    Joined:
    Jul 18, 2012
    Posts:
    2
    I've had this problem before, and finally I found the package ca-cerrificates is helpful.
    Code (JavaScript):
    1. apt-get install -y ca-certificates
     
    MeTheOo likes this.
  8. Bob-Zhang

    Bob-Zhang

    Joined:
    Jul 18, 2012
    Posts:
    2
    But I donot know why.:rolleyes: