Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Resolved UnityWebRequest report an error : SSL CA certificate error

Discussion in 'Multiplayer' started by QianXiYa, Jan 23, 2019.

  1. arabymohammedyoussef123

    arabymohammedyoussef123

    Joined:
    Jul 17, 2023
    Posts:
    5
    Hey, I have this basic command and it says SSL CA certificate error in unity editor so what is the problem:

    Code (CSharp):
    1.  
    2.     private IEnumerator SendRegistrationRequest()
    3.     {
    4.         // Get the user input from the InputFields
    5.         string email = emailInput.text;
    6.         string password = passwordInput.text;
    7.         string username = usernameInput.text;
    8.  
    9.         WWWForm form = new WWWForm();
    10.         form.AddField("registerEmail", email);
    11.         form.AddField("registerPass", password);
    12.         form.AddField("registerUser", username);
    13.  
    14.         UnityWebRequest www = UnityWebRequest.Post("https://localhost/EpicGuardiansBackEnd/RegisterUser.php", form);
    15.         yield return www.SendWebRequest();
    16.  
    17.         if (www.result != UnityWebRequest.Result.Success)
    18.         {
    19.             Debug.Log(www.error);
    20.         }
    21.         else
    22.         {
    23.             Debug.Log("Form upload complete!");
    24.             string response = www.downloadHandler.text;
    25.             statusText.text = response;
    26.         }
    27.     }
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,766
    Based on URL you are running local server. Yet you do https, which requires proper security setup.
    Typically for local development one uses plain text http.
     
  3. anrelivant

    anrelivant

    Joined:
    May 30, 2023
    Posts:
    7
    I faced this error like 10 - 15 minutes ago. I just closed my internet connection (Wi - Fi) then I opened it again and the problem was solved. I hope this solution help those who will face this error in the future.