OpFindFriend() returns friend is offline although friend is online.

Options

My logic is that Player A and other player are in a room. And then, player A create a room and other players in room find player A's info with OpFindFriends() and join player A's room. It works perfectly fine for months. But, suddenly other players frequently get updated as player A is offline although player is online and successfully created a room. To make sure, I waited OnFriendListUpdate() for five times before deciding the player A is actually offline. Every time the player A information is returned as offline.

How can I test Player A is actually went offline? Or, is this the bug from PUN?

Answers

  • SawYuNwe
    Options

    PUN got updated on Aug 2. The bug is introducing around that time too. I have updated to latest version of PUN 2. Still the same.

  • Tobias
    Options

    It is likely that your clients ended up in different regions or Virtual AppIds (based on PUN's version and the Game Version value you set in the PhotonServerSettings). Check those values.

    Also make sure you set and know the proper userID for each user you want to find. FindFriends needs the userID (set in AuthValues or randomly assigned).

    It's not a PUN client side issue.

  • SawYuNwe
    Options

    Thank you for your reply. I already set userId with PhotonNetwork.AuthValues.

    PhotonNetwork.AuthValues = new AuthenticationValues { UserId = PlayFabManager.Instance.PlayFabId };

    PhotonNetwork.ConnectUsingSettings();


    Both clients are using the same apk build.

    And, they were in the same room. And then the first player left the room and the other player find the first player's current room with FindFrined. So, I assumes, both clients are in the same server.

    Any other thing I can look for?