Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Nakama - User authentication Curl Error 60

Discussion in 'Multiplayer' started by BorpaBoatski, Apr 5, 2022.

  1. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    Unity Editor - 2020.3.25f1

    We're using Nakama for our multiplayer game and I'm trying to connect to the server with a HTTPS scheme but I'm getting this error:

    Curl error 60: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_USER_ERROR1


    I've started a thread on the Nakama forum and they said that this is more an issue on Unity's end. I've seen some previous Unity threads with this same problem and they were expired certificates that Unity eventually fixed. Is this the same issue?
     
  2. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    I mentioned this error to the people handling the server and they also seem to think this might be a problem on Unity's end.

    More info: We're making a WebGL game.
     
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    You aren't getting that error in WebGL right? The error is in Editor?
    Are you assigning custom certificate handler to UnityWebRequest (assuming it's UnityWebRequest that fails)?
     
  4. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    In Editor, I'm getting Curl Error 60.
    In WebGL, I'm getting POST <URL> net::ERR_CERT_COMMON_NAME_INVALID.
    No, I don't have a custom certificate handler.
     
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    In WebGL you have to setup CORS, otherwise you can only do request to the same website as your game.
    As for Editor, can you provide URL you are sending request to?
     
  6. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    I see, so if the WebGL build is uploaded to the same website as where we are sending the request to, we would not be facing this problem and would not need to setup CORS?

    Sorry, I can't send the full URL because it is not our own. From what I can tell we are sending a request to Amazon AWS south east.
     
  7. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
  8. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    Turns out we were using the wrong URL for the https scheme. It works now.

    Thanks for helping out @Aurimas-Cernius