question

stephenwilson avatar image
stephenwilson asked

Avoid 'Player profile does not exist' error fetching profile of new player.

I have developed a server solution that authenticates a players session and gets basic information from their profile on sign in. The flow is as follows. The game signs in to playfab using the appropriate platform sign in API method. On success the game sign in to my service providing their new session token received from playfab. I call playfab to check the session is valid via 'AuthenticateSessionTicketAsync' then call 'GetPlayerProfileAsync' on the server API / SDK.

The issue is that when this is the first sign in for the player, it appears this profile has yet to be created resulting in the following error from playfab... "Player profile does not exist"

I thought adding retry logic with back off would solve this, so currently it retries after 1 second, then again after 3 seconds and finally one last time after 5 seconds but it seems the profile is still not available in this 9+ second window.

Do you know how long on average it takes before a players profile is available after they first sign in?

Can you suggest how success in this scenario could be improved?

Thanks,

Ste.

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

·
Rick Chen avatar image
Rick Chen answered

The player profile is not guaranteed to be up-to-date. For a new player, this profile will not exist. Please refer to: https://docs.microsoft.com/en-us/rest/api/playfab/client/authentication/loginwithandroiddeviceid?view=playfab-rest#getplayercombinedinforesultpayload

The time it takes to update player profile varies and is not guaranteed. You could increase the number of retries or prompt the client to retry login again.

If the issue still exist, please let me know.

1 comment
10 |1200

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

stephenwilson avatar image stephenwilson commented ·

Ok, thanks for this. I will adapt my implementation to accomodate this.

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.