OpReJoinRoom returns "ReturnCode: 32748 (Actor with number 0 not found.)" with custom auth

ltxltx
edited June 5 in Photon Server
Hi there,

looking for some help here.
I am using Photon-OnPremise-Server-SDK_v4-0-29-11263 to test my plugin. The problem I am facing right now is after an actor is disconnected, OpRejoinRoom doesn't allow me to rejoin the room.

from the plugin log, when I disconnect, I see that
2018-06-05 19:02:32,024 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - on leave 
2018-06-05 19:02:32,031 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - check actors
2018-06-05 19:02:32,038 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - Actor: 1; Peer:'', DeactivationTime:'2018/6/5 19:02:32', UserId:'2',nick:'buser'
2018-06-05 19:02:32,045 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - 1
and when I try to rejoin, I can still see the inactive user in beforeJoin
2018-06-05 19:02:42,391 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - before join info.UserId = 2
2018-06-05 19:02:42,395 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - check actors
2018-06-05 19:02:42,401 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - Actor: 1; Peer:'', DeactivationTime:'2018/6/5 19:02:32', UserId:'2',nick:'buser'
2018-06-05 19:02:42,406 [22] ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - 1

The OnJoin hook was never called for some reason

the checkActors code is basically

        private void checkActors()
        {
            PluginHost.LogError("check actors");
            foreach (IActor actor in PluginHost.GameActors)
            {
                PluginHost.LogError(actor);
                PluginHost.LogError(actor.ActorNr);
            }

I am hosting a webservice for custom authentication, the userid should be 2 and a normal join or create will be correct.
I am not sure what this error "ReturnCode: 32748 (Actor with number 0 not found.)" imply, I would think that the user will get the same actor id he had previously based on the userid, but that doesn't seem to be working.

Any help would be greatly appreciated.

Ting

Comments

  • JohnTubeJohnTube mod
    edited June 5
    Hi @ltx,

    What is the client SDK you are using?
    Do you set RoomOptions.CheckUserOnJoin = true when creating rooms?
    Do you reproduce this all the time or from time to time?
  • ltxltx
    Hi @JohnTube ,

    thanks for the reply. I am using Unity3D sdk, i am not sure how to find the exact version of the unity sdk.
    I have not set CheckUserOnJoin = true, should I?

    Ting
  • The version is in the zip file or in the changelogs/release notes/version history file.
    latest should be v4.1.1.17:
    Photon-Unity3D-Sdk_v4-1-1-17.zip

    I have not set CheckUserOnJoin = true, should I?
    Yes. This is a must in order to rejoin rooms based on UserId and not ActorNr (old way).
  • ltxltx
    Hi @JohnTube

    Thanks for your help. Setting CheckUserOnJoin works perfectly.

    ltx
Sign In or Register to comment.