question

stoptoplay avatar image
stoptoplay asked

Error 400 on UWP app, but it works fine in Unity Editor!

Hi,

I'm trying to get playfab auth and login working and I tested it out in the unity3d editor and it works great. I can create accounts, login, log out, etc.

However, as soon as I build the UWP app from the Unity3d editor and try to do the same operations in the UWP app - they all fail instantaneously and I get error code 400.

Any tips on how I can debug this?

Thank you!

unity3d
2 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.

stoptoplay avatar image stoptoplay commented ·

Hi @Brendan

I've seen you help with these issues on the forums. My game title id is A77B, and everything works fine in the unity editor, but as soon as I build my UWP and try that I get instantly get a 400 back.

I'd appreciate any help you can give me! Thanks!

0 Likes 0 ·
stoptoplay avatar image stoptoplay stoptoplay commented ·

Some details on the 400 error - this is the complete message:

400 - Unhandled error in playfabwww: systemindexoutofrangeexception arg indexoutofrangeexception at playfabinternalplatfabwww postplayfabapicall

I don't understand how or why it gets out of range when I build the app but works fine in the editor..

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Well, an index out of range exception in the Post call would indicate a problem with the data passed into the call. Can you provide the code snippet showing how you're making the login call, along with the details of the values of the parameters you're passing in?

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.

stoptoplay avatar image stoptoplay commented ·

Sure. I can go ahead and go that. I found a solution for now though. Everything started working as soon as I changed the Request type in the PlayFabSharingSettings asset to Unity Web Request.

To summarize, everything works perfectly in the editor. Registration, login, etc. However when we build the UWP, if we are using Unity Www, we get instant 400 errors with the index out of range exception. Changing to Unity Web Request makes everything work. No other changes were made.

So my problem is resolved, I have been able to find a workaround. I think this might be a bug though, so I'll check it out more on my end and file a bug report.

Thank you!

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.