Search Unity

Question Relay troubleshooting: Join code not found

Discussion in 'Relay' started by KingKRoecks, May 6, 2022.

  1. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    I've been playing around with the BossRoom example and basically streamlined the UI to be a "Host" or "QuickJoin" rather than relying on the lobby list.

    I've been having some issues with Relay sometimes not allowing clients to connect to the host.

    (please ignore the timestamps)
    Client A will start a Lobby and begin Hosting.
    upload_2022-5-6_15-38-14.png

    Client B will QuickJoin.
    upload_2022-5-6_15-32-22.png

    When Client B gets successfully added to the Lobby, they're given the Relay Join Code.

    This Relay Join Code is passed to the "UnityRelayUtilities" class and ultimately calls this:
    Code (CSharp):
    1. Relay.Instance.JoinAllocationAsync(joinCode)
    The result of that call is an exception that is caught that basically says 404, code not found.

    At this point, I don't believe we have any access to logs or data about what's going on behind the scenes for our project in Services, so what can we do to troubleshoot something like this?
     
    wondermagic, APTEM59 and e-ruksov like this.
  2. unity_N1mY0ckRNAknhw

    unity_N1mY0ckRNAknhw

    Joined:
    Nov 19, 2021
    Posts:
    1
    same problem for me.
     
  3. anglerge

    anglerge

    Joined:
    Dec 18, 2020
    Posts:
    15
    same here
     
  4. Soloden

    Soloden

    Joined:
    Feb 15, 2023
    Posts:
    3
  5. sebk99

    sebk99

    Joined:
    Apr 15, 2020
    Posts:
    11
    Hi,
    in January I built demos with Netcode for gameobject v1.1 & relay which 1.0.5 which were working correctly.
    Now (early march) I get this error: "JoinAllocationAsync "join code not found"

    It looks like the Relay does not work with Netcode 1.1 anymore. I updated to the "non-recommended" version 1.2 and now it seems to work.

    Cheers
     
  6. wondermagic

    wondermagic

    Joined:
    Jul 14, 2017
    Posts:
    5
    Same issue for me. This "join code not found" error occurs from time to time. It's a problem from the relay service on Unity's servers. When it happens, I just leave it for a while and come back later to see it working. Hope they eradicate they issue soon.
     
  7. Music_Corner

    Music_Corner

    Joined:
    Mar 8, 2020
    Posts:
    23
    So is there any fix for it? This is still an issue. Sometimes relay throws an error that join code not found. Is there at least any way to check this error state in host side so player can get notified that something went wrong and they need to recreate host?
     
  8. thiagownt

    thiagownt

    Unity Technologies

    Joined:
    Jul 30, 2021
    Posts:
    22
    hi,
    Relay has a timeout for every allocation. If the allocation is not bound to or if relay does not receive a ping at least once every 10 seconds it will invalidate the allocation and it's related join code. Please make use NGO/UTP is initialized (StartHost) immediately after acquiring an allocation from relay, even before creating/sharing the join code.
    Hope this helps.
     
  9. Music_Corner

    Music_Corner

    Joined:
    Mar 8, 2020
    Posts:
    23
    That doesn’t help. Ofc host starts imminent after relay. The client gets error sometimes when trying to connect with that code…
     
    ajaxlex and wondermagic like this.