JoinOrCreateRoom adds two clients as master in the same room

Options
I noticed after using JoinOrCreateRoom (PUN2) that both clients were added to the same room as ActorNumber = 1 and MasterClient = true. Is this something we are suppose to account for or is this a bug?

Thanks in advance!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @meatloaf,

    I noticed after using JoinOrCreateRoom (PUN2) that both clients were added to the same room as ActorNumber = 1
    Could you make sure that both clients are joined to the exact same room? Just print the room name and all users inside with their ActorNr, UserId and if they are MasterClient or not.

    After double checking:

    This is not expected.
    What PUN2 version is this?
    Could you send us 100% repro steps?
  • meatloaf
    Options
    I have confirmed it was the exact same room name, ActorNumbers and MasterClient. As for sending you the exact repro steps i'm not sure as it was part of our main game flow. I want to say it might have been a race condition as both players were calling JoinOrCreateRoom at nearly the same time.

    If the issue occurs again i'll try and further track it down and reproduce it so we can get it fixed :).

    As for my pun version i'm currently on Pun: 2.4 Photon lib 4.1.2.4
  • meatloaf
    meatloaf
    edited November 2018
    Options
    Ok just had the bug occur again, here is an image confirming the issue.

    The left and right "SR Options" Windows are two different clients spitting out there photon room values.

    https://drive.google.com/file/d/1tQReY0FOl0ncvbNZ3DKbplbFhAo87fdw/view?usp=sharing
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @meatloaf,

    This still does not prove that both clients are inside the same room.
    They can be joined to different rooms with the same name because they are connected to different servers.
    Make sure that clients are connected to the same region and using the same PUN version and AppVersion and AppId, etc.
    "Matchmaking Checklist"
  • meatloaf
    meatloaf
    edited November 2018
    Options
    Ah after doing some investigating I think i have figured it out.

    I was setting my GameVersionbefore calling ConnectUsingSettings, but after disconnecting, my subsequent ConnectUsingSettingscalls did not set GameVersion again first.

    After staring at this for a while though I did notice something strange. If I call the below method before ever connecting, my AppVersion = 74_2.4. However if I Disconnect -> ConnectToOfflineRoom -> Reconnect using the below method, my AppVersion = _2.4.
        private bool ConnectUsingSettingsAndGameVersion() {
            PhotonNetwork.GameVersion = gameVersion;
            return PhotonNetwork.ConnectUsingSettings();
        }
    Hope this makes sense. Thanks in advance!