question

nicolasbeaudette avatar image
nicolasbeaudette asked

Kongregate Login Service unavailable

When I try to login in Unity using the call to “PlayFabClientAPI.LoginWithKongregate” from a webgl game in development on Kongregate, I always receive this error :

blob:https://game278179.konggames.com/9785d10e-6fda-404b-9d51-175e4ea7633f:1[24/4/2017 17:18:01] PlayFabLogin:OnLoginFailure HttpCode:200 HttpStatus:OK Error:ServiceUnavailable ErrorMessage:{"code":200,"status":"OK","data":{"SessionTicket":"AA94A88247313AD4---741A-8D48B5764A84367-F625C50D9A589103.5B67BC4B24B10C00","PlayFabId":"AA94A88247313AD4","NewlyCreated":false,"SettingsForUser":{"NeedsAttribution":false},"LastLoginTime":"2017-04-24T21:07:35.354Z"}} ErrorDetails:(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/WebGL/runtime/DebugBindings.gen.cpp Line: 51)

When I check in the GameManager, my user is correctly created and reported as logged in.

My plugin is also added for kongregate and setupped with the API key in the gamemanager.

My game is unpublished yet in Kongregate (in development mode).

Note that in the error feedback, I correctly received the good PlayFabID.

“Compress API data” is left unchecked in the editor extention for playfab.

I’m probably doing something wrong but I have not enough information with the error message reported to take the good action. Any Idea?

Kongregate AuthTicket used : 2d695d5d035075f6fedc9075ba9062d9b45aaf510aaf51ac3d666746af45ba9d

Kongregate user ID : 207597

PlayFabTitle ID : 741A

Chrome : 58.0.3029.81

Unity : 5.5.3p1

Playfab SDK : 2.20.170411

Code sample for login in (Called after the kongregate API is successfully loggedin).



public void KongregateLogin(string authTicket, string kongregateId)

{

DebugLog.Log("PlayFabLogin:KongregateLogin {0} {1} {2}", authTicket, kongregateId, TitleID);

var request = new LoginWithKongregateRequest { AuthTicket = authTicket, KongregateId = kongregateId, TitleId = TitleID, CreateAccount = true };

PlayFabClientAPI.LoginWithKongregate(request, OnLoginSuccess, OnLoginFailure);

}

private void OnLoginSuccess(LoginResult result)

{

DebugLog.Log("PlayFabLogin:OnLoginSuccess playFabId:{0}", result.PlayFabId);

PlayFabID = result.PlayFabId;

IsNewlyCreated = result.NewlyCreated;

OnLogin(this, true);

}

private void OnLoginFailure(PlayFabError error)

{

DebugLog.Error("PlayFabLogin:OnLoginFailure HttpCode:{0} HttpStatus:{1} Error:{2} ErrorMessage:{3} ErrorDetails:{4}", error.HttpCode, error.HttpStatus, error.Error, error.ErrorMessage, error.ErrorDetails);

OnLogin(this, false);

}



10 |1200

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

nicolasbeaudette avatar image
nicolasbeaudette answered

Find the problem! In Unity we are using a code obfuscator (Beebyte) to prevent hacking tentatives. Some of the methods from Playfab were not unobufscated correctly at run time. I simply added the playfab namespace to the ignore list of the obsfucator and now Playfab is login in correctly. Thanks to @Brendan for the support.

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.

brendan avatar image brendan commented ·

Aha - good catch! I'll swap this in as the accepted answer so that if anyone else runs into this, the info will be at the top.

0 Likes 0 ·
brendan avatar image
brendan answered

So, that output shows that the response coming back from PlayFab is a success (200), with all the info from the login operation. In our base SDK code, that should mean we then call the success callback for the LoginWithKongregate call - not the error callback. To be honest, I've never seen the results you're seeing. Can you possibly wrap up your project as a repro project and send that to us so that can test locally?

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

nicolasbeaudette avatar image nicolasbeaudette commented ·

I will try to prepare something up tomorrow (It might be a little ugly but it should work). Thanks for follow up.

0 Likes 0 ·
nicolasbeaudette avatar image nicolasbeaudette nicolasbeaudette commented ·

I removed all the code not related to PlayFab and Kongregate in the game and it is correctly login in now... I suspect that something is interfering the playfab return process. I'm disabling all services in the game one by one in hope to catch what is going wrong but it is a very long process.

0 Likes 0 ·
brendan avatar image brendan nicolasbeaudette commented ·

Interesting - please do let us know what you find out!

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.