Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by fiveampsoftware · Apr 29, 2018 at 02:09 AM · sdksAuthentication

Unable to call Send Account Recovery from Unity SDK

When trying to send account recovery email from the site using "try it" https://api.playfab.com/documentation/client/method/SendAccountRecoveryEmail works

BUT using the Unity SDK PlayFab call SendAccountRecoveryEmail from the client with a SendAccountRecoveryEmailRequest fails with a Internal Server 500

Is there a way to workaround this issue? Or am I not using the proper parameters in code, the code looks like this:

SendAccountRecoveryEmailRequestrequest=newSendAccountRecoveryEmailRequest()
{
Email =ForgotEmail.text,
TitleId =PlayFabSettings.TitleId,
};

PlayFabClientAPI.SendAccountRecoveryEmail(
request,
(SendAccountRecoveryEmailResultresult)=>
{
//Success here
},
(PlayFabErrore)=>
{
//Error here
}
);

something stranger as well but if I call RegisterPlayFabUser with an email from the client and then go to the "try it" site of the SendAccountRecoveryEmail, it says account not found

-Kevin

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by fiveampsoftware · Apr 30, 2018 at 12:29 AM

Okay! Looks like I solved it - not a playfab issue but would be nice if it could handle the error more gracefully.

TextMeshPro can include a hidden character on some components, I had to use EmailInput.text.Trim() to fix it.

More info: https://forum.unity.com/threads/textmesh-pro-ugui-hidden-characters.505493/

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Brendan · Apr 29, 2018 at 11:14 PM

Can you send us the full details of the response containing the 500 error? In particular, we need the Request ID, so that we can find this in the logs.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by fiveampsoftware · Apr 29, 2018 at 11:33 PM

@Brendan

Would this be in ErrorDetails? It's null when it comes back. When I do e.GenerateErrorReport(), I get the following:

Error Report: /Client/SendAccountRecoveryEmail: 500 Internal Server Error

This is the code I use for the error logging:

PlayFabClientAPI.SendAccountRecoveryEmail(
	request,
	(SendAccountRecoveryEmailResult result) =>
	{
		Debug.Log("SUCCESS");
		OnForgotPasswordSuccess.Invoke();
	},
	(PlayFabError e) =>
	{
		Debug.Log("Error: " + e.ErrorMessage) ;
		Debug.Log("Error Report: " + e.GenerateErrorReport());
		if (e.ErrorDetails != null)
		{
			foreach (KeyValuePair<string, List<string>> s in e.ErrorDetails)
			{
				Debug.Log("Error Key: "+ s.Key);
				foreach (string stringConten in s.Value)
				{
				Debug.Log("Error Content: " + stringConten);
				}
			}
		}
		OnForgotPasswordError.Invoke();
	}
);

I created a player (using one of my email addresses): 50A4768573C9138F, of title ID 5D5E, that was created using the Unity SDK - RegisterPlayFabUser.

When I go to that player account and click send account recovery email from Game Manager, I get the following at the top of the page: Unable to reset password: Domain contains control or whitespace - not sure if that has anything to do with the error.

Comment

People who like this

0 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fiveampsoftware · Apr 29, 2018 at 11:49 PM 0
Share

Okay used a packet sniffer and was able to get it:

"code": 500,
"status": "InternalServerError",
"error": "InternalServerError",
"errorCode": 1110,
"errorMessage": "An unexpected error occured while processing the request.",
"errorHash": "d7acf222bdaeef059ad91938d9666d37",
"errorDetails": {
"RequestID": ["29586380d8ce467cb3d934a68367a354"]
}
avatar image Brendan ♦♦ · Apr 29, 2018 at 11:51 PM 0
Share

(Edit: Not sure why your post didn't show up 'till after mine, but thanks for providing the info!)

No, what I was looking for was the actual body of the response package - if you log the full PlayFabError that comes back, it's there.

In this case though, I was able to find the error in the logs. We got an unexpected error back from AWS - AmazonSimpleEmailServiceException, with the detail "Domain contains control or whitespace". I won't post the email address you had in your call here, but I made the same call (I didn't copy/paste the email address, but re-typed it, to be safe), and it worked fine. I didn't see any spaces in your call, so I suspect it was a control character in the string, somewhere.

avatar image fiveampsoftware Brendan ♦♦ · Apr 30, 2018 at 12:24 AM 0
Share

Trying to see if there's a hidden character being inserted from TextMeshPro or something. It looks like I got rate limited too :/

Error: The client has exceeded the maximum API request rate and is being throttled

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    "Authentication - Login With Google Account" docs and Unity SDK are missing the "AccessToken" variable 3 Answers

    No callbacks from LoginWithAndroidDeviceID? 5 Answers

    LoginWithApple returning NotAuthorized 1 Answer

    Getting ServiceUnavailable unknown error randomly while calling ExecuteCloudScript (1 out of 10 calls) 3 Answers

    400 Error - ServiceUnavailable, but only on Xbox 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges