Expected Users array is null, despite being set on room creation.

Options
dt1000
dt1000
Hello!
I have got my turn-based game saving and loading state data from Playfab pretty nicely now!
However when I create a room with type Load and pass it the following State data...

{
  "ActorCounter": 1,
  "ActorList": [
    {
      "ActorNr": 1,
      "UserId": "59FCE1AD1A872162",
      "Username": "",
      "Binary": "RGIAAAEBRAAAAAFi/3MAAA==",
      "DeactivationTime": "2017-11-08T03:36:51.4038169+00:00"
    }
  ],
  "MaxPlayers": 4,
  "ExcludedActors": [],
  "PublishUserId": true,
  "ExpectedUsers": [
    "59FCE1AD1A872162",
    "A5F29DFD0274B092",
    "453275C8340F5E91",
    "39BEBAF8646A2B0F"
  ],
  "RoomFlags": 9,
  "Binary": {
    "18": "RAAAAAVi+nkABHMABERlY2sABERpY2UACVN0YXRlTGlzdAAITW92ZUxpc3RzAAREaWNlcwAEaDAwMHMACE1vdmVMaXN0cwAXc3RhcnQsMC4wLjAuMzU0MzU1LjQwMzFzAAREZWNrcwA8ZXJoZzgwazZxbmw0MzFvYmRwaWNhamZzOTVtdDI3dlBETldPSUx1RXpCR0hBd01GVVJ5VnhKU1RLQ1FYcwAJU3RhdGVMaXN0cwAlMC5lcmguLjAwMDAuMy4wLDEuZXJoLjAwNDEwMy4wMDAwLjMuMQ=="
  },
  "CheckUserOnJoin": true,
  "DeleteCacheOnLeave": false,
  "EmptyRoomTTL": 12000,
  "IsOpen": true,
  "IsVisible": false,
  "LobbyType": 0,
  "LobbyProperties": [
    "Deck",
    "Dice",
    "StateList",
    "MoveList"
  ],
  "PlayerTTL": -1,
  "SuppressRoomEvents": false,
  "Slice": 0,
  "CustomProperties": {
    "Deck": "erhg80k6qnl431obdpicajfs95mt27vPDNWOILuEzBGHAwMFURyVxJSTKCQX",
    "Dice": "h000",
    "StateList": "0.erh..0000.3.0,1.erh.004103.0000.3.1",
    "MoveList": "start,0.0.0.354355.4031"
  }
}

...if I join the room, and try to fetch it's properties, the returned ExpectedUsers array is null.

This is baffling, because the expected users array should be filled by the state data, and PublishUserId is set to true. Is there some flag I am missing? Do I need to expose ExpectedUsers in the LobbyProperties?

Does anyone have any idea what could be causing this?

Cheers,
Dan

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @dt1000,

    I just need to understand the issue before trying to reproduce or investigate further.

    You mean ExpectedUsers are not being reset to previous value when you reload the room state? Is that it?

    and try to fetch it's properties
    How are you doing this exactly?
  • dt1000
    Options
    I am using the Photon PUN PlayMaker actions.
    There is an action to retrieve room properties, here is the salient code...

    public override void OnEnter()
    {
    bool ok = getRoomProperties();


    if (ok)
    {
    Fsm.Event(successEvent);
    }else{
    Fsm.Event(failureEvent);
    }

    Finish();
    }


    bool getRoomProperties()
    {
    Room _room = PhotonNetwork.room;
    bool _isInRoom = _room!=null;
    isInRoom.Value = _isInRoom;

    if (_isInRoom )
    {
    if (isInRoomEvent!=null)
    {
    Fsm.Event(isInRoomEvent);
    }
    }else{

    if (isNotInRoomEvent!=null)
    {
    Fsm.Event(isNotInRoomEvent);
    }
    return false;
    }

    // we get the room properties
    RoomName.Value = _room.Name;
    maxPlayers.Value = _room.MaxPlayers;
    open.Value = _room.IsOpen;
    visible.Value = _room.IsVisible;
    playerCount.Value = _room.PlayerCount;
    autoCleanUp.Value = _room.AutoCleanUp;
    expectedUsers.Values = _room.ExpectedUsers;

    // get the custom properties
    int i = 0;
    foreach(FsmString key in customPropertyKeys)
    {
    if (_room.CustomProperties.ContainsKey(key.Value))
    {
    PlayMakerUtils.ApplyValueToFsmVar(this.Fsm,customPropertiesValues[i],_room.CustomProperties[key.Value]);
    }else{
    return false;
    }
    i++;
    }

    return true;
    }


    I use Photon Network Rejoin Room to rebuild the room from the saved data, but when I try and grab the Expected Users I get null. Everything else seems fine.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @dt1000,

    Thank you for reporting this!

    I managed to reproduce this issue, I will create an internal task to investigate the root cause and fix it asap.
    This may take a while sorry for the inconvenience.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @dt1000,

    Status update:
    The issue has been fixed but the deploy to Photon Cloud will have to wait another 2 or 3 weeks.
    Thank you for your understanding and patience!