question

Jacot avatar image
Jacot asked

Probleme Playfab UE 5.3.2

Hello community, I'm currently trying to set up a server with PlayFab. I've managed to deploy a server on Microsoft Azure. However, when I try to open the menu directly in UE5, I encounter an error. I've been searching for a solution to my problem for 3 or 4 days now, but I haven't found one yet.

 bool UGSDKUtils::SetDefaultServerHostPort()
 {
     //If we're running a local test server then we don't want to check the host port as the MPS won't be present
     if (!FPlayFabGSDKModule::Get().GetIsUsingGsdk()) return true;
    
     auto ConnectionInfo = GetGameServerConnectionInfo();
     // Override the internal Unreal Game Server hosting port number, with one driven from Game Manager
     // A game server hosted in MPS won't be accessible by clients unless it uses the port that MPS has configured for it.
     int32 UnrealServerGsdkHostPort = -1;
     for (auto& GamePorts : ConnectionInfo.GamePortsConfiguration) {
         // "UnrealServerGsdkHostPort" is documented as the name of a required port when using the internal Unreal Game Server hosting mechanism
         if (GamePorts.Name == TEXT("gameport")) {
             UE_LOG(LogPlayFabGSDK, Warning, TEXT("GSDK Game server listening port: %d"), GamePorts.ServerListeningPort);
             UE_LOG(LogPlayFabGSDK, Warning, TEXT("GSDK Game client connection port: %d"), GamePorts.ClientConnectionPort);
             UnrealServerGsdkHostPort = GamePorts.ServerListeningPort;
             break;
         }
     }
     if (UnrealServerGsdkHostPort == -1)
     {
         UE_LOG(LogPlayFabGSDK, Fatal, TEXT("Unreal GSDK requires a named port: gameport. This was not provided by MPS build port-configuration."));
         return false;
     }
     UE_LOG(LogPlayFabGSDK, Warning, TEXT("Assigning Unreal Server Host Port to MPS port: %d"), UnrealServerGsdkHostPort);
     FURL::UrlConfig.DefaultPort = UnrealServerGsdkHostPort;
     return true;
 }
    
 void UGSDKUtils::ReadyForPlayers()
 {
     FPlayFabGSDKModule::Get().ReadyForPlayers();
 }

At launch, the game writes:

 Fatal error: [File:D:\Psykotik Panda\Projet\PlayfabMenu\Plugins\PlayFabGSDK\Source\PlayfabGSDK\Private\GSDKUtils.cpp] [Line: 183] 
 Unreal GSDK requires a named port: gameport. This was not provided by MPS build port-configuration.

I've looked into my 'GSDKUtils.cpp' file but I can't find where to fix my issue. I hope I'll find some help here. Best regards, Jacot!

multiplayer
2 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.

Jacot avatar image Jacot commented ·

Thank you very much for your help, and sorry for my late response; I was on vacation. I'll immediately take care of sending the corresponding photos to the previous message.

I'll look into the new link you provided today and provide feedback on the forum. In any case, thank you very much for your responsiveness and kindness. Jacot

0 Likes 0 ·
Ákos Meiszter avatar image Ákos Meiszter commented ·

Hey Jacot,

Sorry to jump on your post, but I can see you are working with UE 5.3.2 version with GSDK, and it looks like you managed to deploy a server as well on azure, can you please tell me tell me if you did any specific step for 5.3.2 to deploy successfully, like additional dlls, or some project setting changes? My server is stuck on "PendingHeartbeat", and testing with LocalMultiplayerAgent works just fine.

Thanks a lot.

0 Likes 0 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

What's the port name of your server build configuration? If it is not "gameport", you may try creating a new build with the port name setting to 'gameport' and try again. Also, you may refer to https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/locally-debugging-game-servers-and-integration-with-playfab to local debug your server build before deploying it. And please make sure to change “game_port” in local multiplayer agent file MultiplayerSettings.json to “gameport”.

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

Jacot avatar image Jacot commented ·

Hello, Thank you for your quick response. I followed this tutorial to create my game with PlayFab. watch

I took a screenshot of UE5 to show you the beginning of the nodes executed at the game's launch. 7030-1.png

The issue is that I can't figure out what this node 'set Default Server Host Port' refers to...I found this file 'GSDKUtils.cpp' in my 'private' folder that seems related, but I can't find what to modify.

7017-2.png

I will check the provided link to debug locally. Thanks again, and I will keep you updated on the progress of my project. Best regards, Jacot."

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Jacot commented ·

If you have any questions, please feel free to let me know.

0 Likes 0 ·
Jacot avatar image Jacot Xiao Zha commented ·

Greetings, I believe I've managed to put the correct code in my 'MultiplayerSettings.json'; I've succeeded in launching the LocalMultiplayerAgent.exe. However, I don't see any errors popping up. However, I still have my 'gameport' problem. Do you have any idea where this might be coming from?

Thank you @Xiao Zha in advance for the time spent and the help provided with my inquiries.

0 Likes 0 ·
Show more comments

Hey Jacot, Sorry to jump on your post, but I can see you are working with UE 5.3.2 version with GSDK, and it looks like you managed to deploy a server as well on azure, can you please tell me tell me if you did any specific step for 5.3.2 to deploy successfully, like additional dlls, or some project setting changes? My server is stuck on "PendingHeartbeat", and testing with LocalMultiplayerAgent works just fine. Thanks a lot.

0 Likes 0 ·
Jacot avatar image Jacot Ákos Meiszter commented ·

Hey, no problem. I didn't add any DLLs for version 5.3.2. I followed tutorials on YouTube. The thing to be very careful about is setting the 'gameport' to UDP 7777. Jacot.

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.