question

martin_mais@web.de avatar image
martin_mais@web.de asked

Cocos2D-X Can't connect

I try to connect to the server using this code snippet:

    PlayFab::ClientModels::LoginWithCustomIDRequest request;

    request.CustomId = "67AB-5397-CC54-EA31";

    request.TitleId = "My title ID"; // I set the correct title ID here

    request.CreateAccount = true;

    PlayFab::PlayFabClientAPI::LoginWithCustomIDCallback callback = [] (PlayFab::ClientModels::LoginResult& result, void* userData)

    {

        log("Awesome!");

    };

    PlayFab::ErrorCallback errorCallback = [] (PlayFab::PlayFabError& error, void* userData)

    {

        log("Error!");

    };

    PlayFab::PlayFabClientAPI::LoginWithCustomID(request, callback, errorCallback);

 

But I can't connect, the error message is "Request Timeout or null response" because the response is empty.

Is there anything else I need to do ? I currently try it using a Mac and besides the Code snippet I just call Update() of the client. I use the newest SDK.

 

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 answered

Can you try making this call via Postman, so that we can confirm whether there are any base issues with your connection being able to communicate successfully with Web API services in AWS? If that also fails, could you get a Wireshark or Netmon log of the connection attempt?

[Update] To be clear, if this is on Android, please be sure to review the readme for Cocos2d-x. We are aware that there are issues with Cocos2d-x for Android, and are working with the team at Chukong to get this resolved.

10 |1200

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

martin_mais@web.de avatar image
martin_mais@web.de answered

Thanks for the quick reply!

Using postman it works, so it seems to be a local issue.

10 |1200

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

martin_mais@web.de avatar image
martin_mais@web.de answered

I currently test on OSX(El Capitan)

I just saw that there are some recent changes on Github, I'll check if that helps.

10 |1200

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

martin_mais@web.de avatar image
martin_mais@web.de answered

Thanks for your help! Turns out I didn't initialize the developerSecretKey correctly, now it works for OSX and iOS.

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 answered

Great, glad you're unblocked!

10 |1200

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

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.