Cannot get a list of user's friends in a build
Users. is not firing the callback in a build.
When we run the game in the Unity Editor, everything works as expected. The editor uses the AppId of the Rift version of the app while the build is running on the headset directly and using the AppID of the Quest version of the app.
- Data Use Checkup is all good and everything is allowed for the app (Quest App).
- We are using Users.GetLoggedInUser() just fine in the build to get the user's username.
- All the user's friends have launched the game and are also in the app.
Why is the callback not being fired in a build? Any help is appreciated.
Below is the code for the function I am calling. "HERE GetLoggedInUserFriends" is printed but none of the other logs are printed which means the callback is never fired.
public void GetLoggedInUserFriends(Action<List<User>> onSuccess, Action<Error> onError = null)
{
Debug.Log("HERE GetLoggedInUserFriends");
Users.GetLoggedInUserFriends().OnComplete(msg =>
{
if (msg.IsError)
{
Error error = msg.GetError();
Debug.LogError($"[{nameof(GroupPresenceManager)}] Failed to get LoggedInUser Friends: {error.Code} - {error.Message}");
onError?.Invoke(error);
}
else
{
Debug.Log($"[{nameof(GroupPresenceManager)}] Got LoggedInUser Friends successfully.");
List<User> users = msg.Data.ToList();
onSuccess?.Invoke(users);
}
});
}
