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 /
  • API and SDK Questions /
avatar image
Question by Kytan · Jun 11 at 09:39 AM · multiplayerunreal

"Unable to contact server"

I'm trying to login to Playfab in my multiplayer server using this code in UE4.27.2:

I can successfully login when testing the server with the LocalMultiplayerAgent but its not working on the server build, its giving me these errors:

I think this error is caused by some port not being open but i'm not sure, can anyone help me?

(The server build is being successfully deployed on Playfab)

screenshot-3.png (140.7 kB)
screenshot-2.png (93.4 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Made Wang · Jun 13 at 09:51 AM

From the error message, the CA certificate is missing, you can try the solution in MpsSamples/amazon_root_ca.md at main PlayFab/MpsSamples (github.com).

Also, it is not recommended to call the client API on the server side. You could try to use LoginWithServerCustomId.

Comment
Kytan

People who like this

1 Show 6 · 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 Kytan · Jun 13 at 12:00 PM 0
Share

That worked, thank you so much!

I have changed that node to use the LoginWithServerCustomId, now I have one more issue, I'm trying to create a Group using the "CreateGroup" node from the Server but its giving me an error:

Do I need to change to Entity Global Title Policy with something to make it work?


[2022.06.13-11.43.43:283][181]LogPlayFab: Request: {
	"GroupName": "20.67.170.117"
}
[2022.06.13-11.43.43:485][187]LogPlayFab: Response : {"code":401,"status":"Unauthorized","error":"NotAuthenticated","errorCode":1074,"errorMessage":"This API method does not allow anonymous callers."}
[2022.06.13-11.43.43:485][187]LogBlueprintUserMessages: [Main_GI_C_2147482596] NotAuthenticated
[2022.06.13-11.43.43:485][187]LogBlueprintUserMessages: [Main_GI_C_2147482596] This API method does not allow anonymous callers.
avatar image Kytan Kytan · Jun 13 at 01:51 PM 0
Share

I am logged in tho, the CreateGroup happens after the "On Success" pin from the "LoginWithCustomServerID".

avatar image Kytan Kytan · Jun 13 at 02:12 PM 0
Share

Logs screenshot:

Show more comments
avatar image Made Wang Kytan · Jun 14 at 02:55 AM 1
Share

LoginWithServerCustomId does not automatically store the EnityToken, you need to get the EntityToken in the login callback and manually store it in request.AuthenticationContext when calling the Entity API, refer to the code below.

PlayFabGroupsAPI.CreateGroup(new CreateGroupRequest
{
    AuthenticationContext=new PlayFabAuthenticationContext
    {
        EntityToken=" "
    },
    GroupName = "serverTest"
},
(result) =>
{
    Debug.Log("Create Success");
},
(error) =>
{
    Debug.LogError(error.GenerateErrorReport());
});
avatar image Kytan Made Wang · Jun 14 at 06:31 AM 0
Share

That worked, thank you for the help!

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

    13 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    PlayFab Party - Unreal Engine - no state changes reported when launching a game for the first time after console startup 1 Answer

    Best Practices For PlayFab OSS Unreal Engine 1 Answer

    Problems implementing GSDK with Unreal Engine 4 0 Answers

    How to use "Update Connected Players" GSDK UE4 Blueprint 1 Answer

    I cant implement matchmaking or connect to server logic. 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