question

macrochipgames avatar image
macrochipgames asked

Facebook friends internal server error

I currently have my app in google play apha testing mode. On Facebook, it is also in development mode while I'm waiting for the game to be reviewed and approved. I'm using PlayFabClientApi.GetFriendsList() to get friends data after I've logged in with Facebook. I'm calling this method twice (the second call happens in the result callback method of the first call) because of the bug with setting the 'ProfileConstraints' that has existed forever and you still haven't fixed. This works normally on all phones I've tested it on, except one. On that one, belonging to a friend, I'm getting an exception in code after connecting to Facebook and trying to get the friends list. After this happens, I'm getting the internal server error whenever I open the friends section of his profile in the manager. Adding friends manually also does not work. It just reports an error with no explanation. Since this works on all other devices I've tested it on, belonging to different people, I was wondering if you could tell me what could be the cause of this? Could his Facebook account somehow be blocking PlayFab from getting the friend info?

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

Since the API calls in question are all Web API methods, there's no difference between devices, as far as we're concerned. If only one device is having an issue, I'd have to assume it has some problem with the JSON serialization/deserialization library, or else it has a more fundamental network communication issue. What is the Title ID, the PlayFab ID of the user being tested, and the body of the error returned on the call to GetFriendsList (if any)?

17 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 ·

Oh, but side note: It's possible for a player to set their Facebook privacy setting so that their friends cannot be accessed by our service. But all that would mean is that they don't show up in the results of the call to get the friends list - it doesn't cause any issues with our service.

0 Likes 0 ·
macrochipgames avatar image macrochipgames brendan commented ·

OK, I acquired my friend's access token and did a bit of digging and here's what I found:

As I said, I'm calling the GetFriendsList twice because of the said PlayFab bug with ProfileConstraints resulting in FacebookInfo being null. Here's my code:

https://www.pastiebin.com/5b827b79abf9b

Here's the weird part: in the result of the first call (with ProfileConstraints set in the request), I'm getting 2 friends. One of them really exists, but the other (5DDF6CF723D9532F) does not! I fill a list of friends with these two friends here. Then, in the result of the second call (WITHOUT ProfileConstraints set in the request) I'm getting only 1 friend (the one that really exists). Then I use my friend list to get their profile pictures from Facebook and I'm getting a "bad request" response from Facebook, most likely because I'm asking for the picture of that non-existent friend that appeared in the result of the first call, but not in the result of the second call.

I'm often creating and deleting users as a test. Maybe this phantom user is some residual data from those deletions?

0 Likes 0 ·
macrochipgames avatar image macrochipgames brendan commented ·

Continuing the last post...

There's another issue that I intend to open a separate thread for - the GetLeaderboard() method returns many users that I've already deleted a long time ago and are not present in the manager. Maybe this is somehow related to the issue of this topic?

0 Likes 0 ·
macrochipgames avatar image macrochipgames brendan commented ·

In the meantime, I have found out who the 'phantom user' was. It is a Facebook account that I used for testing and I've added my friend as a friend on Facebook on that account. Unfriending him on Facebook has fixed this problem, but it is still a fact that the GetFriendsList() has returned that test profile of mine as his friend, even though I have long deleted it from PlayFab, and it only returned it when the ProfileConstraints were set.

0 Likes 0 ·
brendan avatar image brendan macrochipgames commented ·

Thanks - do you happen to remember the sequence of steps that got you to the point where you were able to get that user account returned in your friends list, but only when ProfileConstraints was set? I'd like to see if we can reproduce that, so that we can have those details in the bug.

The stats still being there if you used DeleteUsers isn't surprising - that delete call isn't the GDPR-compliant version, so while it removes the account links, it will leave some extraneous data (it's really meant for quickly removing test accounts).

0 Likes 0 ·
Show more comments
macrochipgames avatar image macrochipgames commented ·

Title ID: 4A90

PlayFab ID: 20403821F1F13B63

I was visiting the said friend yesterday so I took the opportunity to test the game on his device. I didn't have the Unity project though so I only looked at adb output and now I can't remember what the exception was but I think it was related to my code that's handling a successful reply and was looking for some friend data that wasn't there. But I don't really remember as I said. I will try getting an access token from his facebook profile today and see if I can reproduce the bug through Unity. In the meantime, maybe you could check for the reason of the "internal server error" that is displayed when you click on the "Friends" section in his profile.

0 Likes 0 ·
brendan avatar image brendan macrochipgames commented ·

I do see an error at 10:30am UTC yesterday (8/25) showing that there was an issue getting friend data to show in the Game Manager for that player - that would likely be due to us being unable to retrieve data from Facebook, so it's possible he has his permissions set to not allow any information to be shared.

0 Likes 0 ·

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.