question

Dylan Hunt avatar image
Dylan Hunt asked

"AccountNotFound" for SetFriendTags (Client) when 100% exists

For titleid 77C6:

Player 8EC68BFC7FB43C24 tried to add a friend note to friend A151D2FA6B78179F.

Debug.Log("[PF] @ SetFriendTags: " + friendPFID + " / " + friendNote);
// A151D2FA6B78179F / Casa test

The call returns err:

PlayFabError(AccountNotFound, User not found, 400 BadRequest)

After reviewing the logs, this is strange for a few reasons:

  • I can't reproduce this issue -- works fine for me and everyone else. Just this guy and maybe 1 other reported a while back that I forgot about. He's not a pirate because he's a Kickstarter backer, so it's nothing sketchy going on.
  • If you go to 3C24's profile, friends tab >> he, indeed, has 179F on his friends list and is a legit user matching the PlayFabId perfectly.

Is it possible to look into this? Normally, I would think I did something weird, but we actually added this feature months ago, and I can't reproduce this single guy's issue. I am wondering if something is weird with his profile.

Our code is nothing special:

// Logs show friendPFID passed == "A151D2FA6B78179F"
// Logs show friendNote passed == "Casa test"
List<string> _tags = new List<string>();
_tags.Add(friendNote);
SetFriendTagsRequest request = new SetFriendTagsRequest()
{
    FriendPlayFabId = friendPFID,
    Tags = _tags
};


PlayFabClientAPI.SetFriendTags(request, result =>
{
    Debug.Log("[PF] Successful SetFriendTags callback: " + result);
}, error =>
{

    Debug.LogError("[PF]**ERR callback SetFriendTags: " + error);<br>
}

I asked him if this happens just with this 1 friend or all friends:

"Yeah, it happens everytime"

Friends
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The problem is that the players in question actually aren't in the player's friends list - they're in his Steam friends list, which is distinct. We provide the option to include Steam and Facebook friends when you do things like query for friends and get friend leaderboards, but the Tags are set on the PlayFab friend record - which only exists if you add the friends using AddFriend API call.

I'm filing a bug to have the friend tag API calls clarified regarding this.

5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

Actually, those details are in the docs, it's just that the request details for calls have been temporarily hidden on the doc page. We'll have that fixed momentarily.

0 Likes 0 ·
Dylan Hunt avatar image Dylan Hunt commented ·

Ah...so if err due to this, add friend then try again, perhaps?

0 Likes 0 ·
brendan avatar image brendan Dylan Hunt commented ·

Basically, yes, if you can't add Tags, they're not in the PlayFab-specific friend list, so you'd need to add them first.

0 Likes 0 ·
Dylan Hunt avatar image Dylan Hunt brendan commented ·

Thanks ~ Final question about workflow (not just for this call, but for any chain calls) -- is it better to add friend, callback, add tag?

Or is it better to make a cloudscript that does both at the same time?

add friend >> callback >> add tag sounds EASIER, but cloudscript sounds more efficient. Or is it only milliseconds lost? I am wondering if it's actually worth it or not.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.