Photon Server - Rejoin and Tokens

When trying to rejoin a room, after cutting client access to the server, I've noticed the following error:

ReconnectAndRejoin() failed. It seems the client doesn't have any previous authentication token to re-connect.

While debugging, I noticed during authentication that OperationResponse never contains the neverParameterCode.Secret key so the Token is never set. I do not have any authentication provider setup but it should provide me a session token either way right?



MSMaster.log

Comments

  • hi, @Erethan , not sure what you are doing but master and gs update your token after authentication

    so, I would assume that something is broken in your side. what did you modify? does it work same way for you with unchanged version of photon sdk?

    best,
    ilya
  • Hi, @chvetsov!

    The problem still persists in a clean PhotonServer.
    The only changes I made were in the GS and MS log levels where I changed to DEBUG, and the GS 'PublicIPAddress' in '\GameServer\bin\Photon.LoadBalancing.dll.config'.


    I am not sure if it helps but I instantiate an AuthenticationValues to set its userId. This is because, I have checkUserIdOnJoin=true.
    PhotonNetwork.AuthValues = new AuthenticationValues(System.Guid.NewGuid().ToString());
    

  • Hi @Erethan,

    Does ReconnectAndRejoin work as expected on Photon Cloud?
    What Photon Server version do you use? did you test using v5?

    Do you use ReconnectAndRejoin to recover from unexpected disconnects or for another purpose?
    It is meant only as a quick rejoin when connection is lost during a match.
    Otherwise use Reconnect OR connect again from scratch and try RejoinRoom.
  • Hi, @JohnTube !
    Does ReconnectAndRejoin work as expected on Photon Cloud?

    Yes, it does.
    What Photon Server version do you use? did you test using v5?

    I did not test it with v5. I think am currently using 4.0.28.2962 as Photon Control states. However, I've recently removed it and downloaded 4.0.29.11263. Maybe I didn't cleaned it properly?

    To remove the service, I stopped it in the Windows Services tab, I run
    .\PhotonSocketServer.exe /remove LoadBalancing
    
    with admin privileges, and deleted the root folder. Do I need to do anything else?

    Do you use ReconnectAndRejoin to recover from unexpected disconnects or for another purpose?

    I intend to use it only to recover from unexpected disconnects
  • I just tested it with v5, and the Tokens were created as expected.

    Thanks, @JohnTube and @chvetsov !
Sign In or Register to comment.