question

rob avatar image
rob asked

UpdateUserData fails with ServiceUnavailable - 'Unknown Error', 400 BadRequest

I'm getting this Unknown Error when calling UpdateUserData from a Unity build on Android. I'm able to make several successful calls before this happens (I'm calling it roughly once a minute). I never encounter this error in the Unity editor, only ever on Android (not tested on iOS), so it can't be a problem with the request. When I call it again the next time it works. So it's just failing for no apparent reason maybe 1 in 10 attempts.

HttpCode: 400

HttpStatus: BadRequest

Edit: Should probably also point out that this is on wifi and connected to the same network that I'm connected to in the editor with no problems.

10 |1200

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

brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

Try changing what request method PF uses (check in PF editor extensions in Unity), try setting it to UnityWebRequest or HTTPWebRequest

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.

rob avatar image rob commented ·

I was already using UnityWebRequest. I tried switching to HTTPWebRequest but it had the same problem.

0 Likes 0 ·
rob avatar image
rob answered

Anyone got any other suggestions? Is this just a PlayFab bug that I have to live with?

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.

brandon@uprootstudios.com avatar image brandon@uprootstudios.com commented ·

I've had similar scenarios with Unity games not being able to make any kind of web request, and reporting 'Unknown Error'. Here's what I did in each scenario to fix it:

Linux: Install cURL

Xbox: Go to any webpage in internet browser and reboot

Android: In Player Settings (in Unity), make sure 'Internet Access' is set to Required

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.