question

victorelselam avatar image
victorelselam asked

New created users can't login, but they are registered

Hello, I'm having some problems with Playfab, I started building a game in december 2016, and all was going fine, until now. For some reason that I dont have any idea, my game refuses to connect newly created accounts, for old account it just work fine. I already checked in my Playfab account and the users are registered, but they just cant login. Someone have a solution for this?

Account Management
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

Can you let us know the specifics of the API calls you're making and the details of the responses you're getting back? Also, what Title ID is this for?

10 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.

victorelselam avatar image victorelselam commented ·

Sure,

this is my Login Method:

and here is my Register Method:

also, my TitleID is: "5B4D"

0 Likes 0 ·
login.png (7.1 KiB)
register.png (9.1 KiB)
brendan avatar image brendan victorelselam commented ·

Thanks, but that doesn't actually provide me with any of the specifics of the parameters you're passing into the call, or the details of the response you get back. Can you please send us those details, so that we can look into this?

0 Likes 0 ·
victorelselam avatar image victorelselam brendan commented ·

Sure, I'm sorry. When I call the Register method, I pass the values by an input field (Unity). In this case, i'm requiring Username, DisplayName, Email and Password from the player, all of them as string. When he clicks Register, the call gives this response on the Sucess callback:

Then when the player tries to Login with the same parameters he passed in the Register method (username and password), the call gives this response on the Error callback:

if you need any more informations, feel free to ask me, I literally don't have any ideia how to solve this.

0 Likes 0 ·
registersucess.png (17.1 KiB)
loginerror.png (13.5 KiB)
Show more comments
victorelselam avatar image victorelselam commented ·

@Brendan, okay, I didn´t get it... The Error responses is what I sent to you, this is everything that the class PlayFabError brings to me. I just Debug.Log(error.ErrorMessage), Debug.Log(error.ErrorDetails) and Debug.Log(error.Error), and "Invalid username or password" is everything that appears in the console when the login fail. The details of the calls I presume that you need to know the parameters and the API method I'm using , that are described in my function screenshot. To be more specific, the only thing that I can imagine is to give you the Usernames and Passwords that are having this error. I really appreciate your patience in helping me, but if you need something more specific, please, explain me exactly how to do it and I'll give you the infos, especially because this work is for my University, and if it dont works properly, probably I'm not going to get Graduated.

0 Likes 0 ·
brendan avatar image brendan victorelselam commented ·

Just so you know, the errorCode would be 1003, with the error being "InvalidUsernameOrPassword", for an errorMessage of "Invalid username or password". It's a reasonably safe bet that this is the error you're seeing, but I don't like to make assumptions, so it would be good to see the full error response, rather than just the errorMessage.

If that's the error you're getting, the possibilities are:

1. The username/password you used in the RegisterPlayFabUser call don't match the ones you're using in the LoginWithPlayFab call,

2. The calls are being made to different Title IDs, which have different Publisher IDs (the publisher layer is where the core of the player account lives, with all the linked accounts/logins),

3. At some point between the two calls, the player account password was changed, or

4. At some point between the two calls, the player account was deleted.

Here's what I'd recommend - try using our Postman collection to test the calls. If they're not working there, just send me the calls you used in that tool, and I can have a look. Otherwise, you'll want to add more debugging to see why your values don't match.

0 Likes 0 ·
victorelselam avatar image victorelselam brendan commented ·

I just found how to get the error code. It's called HttpCode, that's why i didn't found it, sorry. The error is 401, InvalidUsernameOrPassword.

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

@Brendan. Hey, just comming here to give you the feedback that I found what was wrong, and maybe it'll help you solving other problems like this. I Updated my project to Unity 2017, and while trying to debug, I found that Unity password field is bugged! When you call the request, the Unity sends the ***** instead the real text that should be there. I'm sorry that I bothered you with this, and thank you for the help

0 Likes 0 ·
brendan avatar image brendan victorelselam commented ·

Thanks - that good to know! Hopefully this will help others who run into the same issue.

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.