I don't know this Error Please Help me

Options
I just using callback Method
public override void OnRegionListReceived(RegionHandler regionHandler)
    {
        regionHandler.PingMinimumOfRegions(PingCompleteCallback, null);
        Debug.Log("All Region Received Callback");
    }

    void PingCompleteCallback(RegionHandler regionHandler)
    {
         Debug.Log("Best Region :" + regionHandler.BestRegion.Code +":"+ regionHandler.BestRegion.Ping);
        Debug.Log("Cache : "+regionHandler.SummaryToCache); 
   }
i wait a little time and occured error
I don't use auth
Do I have to use auth?


What is error?
OperationResponse 230: ReturnCode: 32736 (No auth request during expected wait time). Parameters: {} Server: NameServer Address: ns.photonengine.io:5058
UnityEngine.Debug:LogError(Object)

Answers

  • Tobias
    Options
    All clients do authentication in the background. Even if you don't authenticate users, the client sends it's AppId and requests info about the region you are going to use.

    When something odd happens, always let us know the PUN version and the Editor version.
    We would like to reproduce this case, so if you could send us a repro case to: developer@exitgames.com.
  • chvetsov
    Options
    hi, @tkdqjadn

    this error happens because Nameserver expects auth request after some time. we will update NS next week, so that it will not be so strict.

    Currently what you need to get rid of this error is accomplish task on NS within 20 second or send auth request

    best,
    ilya
  • tkdqjadn
    Options
    @chvetsov
    I think it's enough time.
    I was just curious about the reason for the error.
  • tkdqjadn
    Options
    @Tobias
    Hi Thanks
    I send email please check to your email
  • Tobias
    Tobias admin
    edited September 2021
    Options
    Thanks for the code. Checked it. Had to call ConnectUsingSettings to get things started but could repro the issue with that:

    Your
    override OnRegionListReceived
    
    method calls
    regionHandler.PingMinimumOfRegions(PingCompleteCallback, null)
    
    This assigns a callback for the ping-completed event, which is normally done by PUN. Unlike PUN's code, yours doesn't connect to a region, when the pings are in.
    This stalls the process of getting connected to the best region and with a short timeout for connections on the Name Server, this will get you that error code.

    So in short: You manually called PingMinimumOfRegions but don't use the result to connect to some region.

    Could be enough to add something like this:
    if (NetworkClientState == ClientState.ConnectedToNameServer)
    {
        PhotonNetwork.NetworkingClient.ConnectToRegionMaster(regionHandler.BestRegion.Code);
    }
    
  • tkdqjadn
    Options

    @Tobias

    Thanks It is working!!

    but i have question.

    Why should we use 'PhotonNetwork.NetworkingClient.ConnectToRegionMaster()' again if 'PhotonNetwork.ConnectUsingSettings()' already connects to MasterServer?

    Shouldn't we use 'PhotonNetwork.ConnectUsingSettings()' to connect to MasterServer?

    I wonder the difference between 'PhotonNetwork.ConnectUsingSettings()' and 'PhotonNetwork.ConnectUsingSettings()' .

  • Tobias
    Options

    Normally, you don't have to call ConnectToRegionMaster() yourself. PUN does that.

    But: There is only a single callback possible for PingMinimumOfRegions() and your code did set that callback to your own code (which did not connect to a master). So PUN was stranded, kind of.