Connection Timeout EOS / Playfab

Hi,
I’m having issues connecting to my dedicated server hosted on azure playfab, it used to work but I removed the EOS Plugin by mistake (or I thought that was the error) I put it back but still get this error Client get disconnected for timeout :



[2024.05.29-15.07.53:807][834]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.11, Real: 60.00, Good: 60.00, DriverTime: 61.32, Threshold: 60.00, [UNetConnection] RemoteAddr: 52.178.158.8:30000, Name: IpConnection_2147482344, Driver: GameNetDriver NetDriverEOS_2147482345, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID

Here’s my .build.cs :

using System;
using System.IO;
using UnrealBuildTool;

public class GuessTheMurder : ModuleRules
{

  void CopyFolderContents(string sourceDir, string targetDir, string relativePath = "")
  {
    // If directory does not exist, create it
    if (!Directory.Exists(targetDir))
      Directory.CreateDirectory(targetDir);

    // Copy files
    foreach (string filePath in Directory.GetFiles(sourceDir))
    {
      string fileName = Path.GetFileName(filePath);
      string targetFilePath = Path.Combine(targetDir, relativePath, fileName);

      // Add the file as a runtime dependency
      RuntimeDependencies.Add(targetFilePath, filePath);
    }

    // Recursively copy subdirectories
    foreach (string subDirPath in Directory.GetDirectories(sourceDir))
    {
      string subDirName = Path.GetFileName(subDirPath);
      string subDirRelativePath = Path.Combine(relativePath, subDirName);
      string targetSubDirPath = Path.Combine(targetDir, subDirRelativePath);
      CopyFolderContents(subDirPath, targetDir, subDirRelativePath);
    }
  }

  public GuessTheMurder(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
    bEnableExceptions = true;
    PublicDependencyModuleNames.AddRange(new string[]
			{ 
				//default modules
				"Core",
				"CoreUObject",
				"Engine",
				"InputCore",
				"HeadMountedDisplay",

				//added modules
				"SignalProcessing",
				"AudioMixer",
				"XmlParser",
				"UMG",
				"Projects",
				"PlayFabGSDK",
        "UniversalVoiceChatPro",
        "OnlineSubsystem",
        "OnlineSubsystemUtils",
      }
		);;

    //add MyBlueprintFunctionLibrary as a include path
    PublicIncludePaths.AddRange(new string[] { 
      Path.Combine(ModuleDirectory, "Public")
    }
    );


    if (Target.bWithServerCode)
    {
      PublicIncludePaths.Add(@"C:\\Users\\PC\\Desktop\\StageSofiane\\GuessTheMurder\\Source\\ThirdParty\\GSDK\\include");
      PublicAdditionalLibraries.Add(@"C:\\Users\\PC\\Desktop\\StageSofiane\\GuessTheMurder\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\GSDK_CPP_Windows.lib");
      PublicAdditionalLibraries.Add(@"C:\\Users\\PC\\Desktop\\StageSofiane\\GuessTheMurder\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\libcurl.lib");

      //add runtime dependencies for gsdk
      RuntimeDependencies.Add("$(TargetOutputDir)\\GSDK_CPP_Windows.lib",
      "$(ProjectDir)\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\GSDK_CPP_Windows.lib", StagedFileType.SystemNonUFS);

      RuntimeDependencies.Add("$(TargetOutputDir)\\libcurl.lib",
      "$(ProjectDir)\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\libcurl.lib", StagedFileType.SystemNonUFS);

      RuntimeDependencies.Add("$(TargetOutputDir)\\libcurl.dll",
      "$(ProjectDir)\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\libcurl.dll", StagedFileType.SystemNonUFS);

      RuntimeDependencies.Add("$(TargetOutputDir)\\libssl-1_1-x64.dll",
      "$(ProjectDir)\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\libssl-1_1-x64.dll", StagedFileType.SystemNonUFS);

      RuntimeDependencies.Add("$(TargetOutputDir)\\libcrypto-1_1-x64.dll",
      "$(ProjectDir)\\Source\\ThirdParty\\GSDK\\lib\\Windows\\x64\\Release\\dynamic\\libcrypto-1_1-x64.dll", StagedFileType.SystemNonUFS);
    }



    //add the folder Content/Session/Texts/ as a dependency
    string sourceDir = Path.Combine(ModuleDirectory, "../../Content/Sessions/Texts/");
    string targetDir = "$(TargetOutputDir)\\..\\..\\Content\\Texts\\";
    CopyFolderContents(sourceDir, targetDir);


    //add the folder Content/Session/Sounds/ as a dependency
    sourceDir = Path.Combine(ModuleDirectory, "../../Content/Sessions/Sounds/");
    targetDir = "$(TargetOutputDir)\\..\\..\\Content\\Sounds\\";
    CopyFolderContents(sourceDir, targetDir);
  }
}

And here’s my defaultEngine.ini :

[Voice]
bEnabled=true

[OnlineSubSystem]
DefaultPlatformService=EOS

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[/Script/SocketSubsystemEOS.NetDriverEOS]
IsUsingP2PSockets=true

And the full log :
GuessTheMurder.log (103.1 KB)

Didn’t change the Playfab gsdk instegration :

include "GuessTheMurder.h"
#include "Modules/ModuleManager.h"
#if UE_SERVER
#include "gsdk.h"
#include "string.h"
#endif

IMPLEMENT_PRIMARY_GAME_MODULE( FGuessTheMurderGameModuleImpl, GuessTheMurder, "GuessTheMurder" );
 
void FGuessTheMurderGameModuleImpl::StartupModule()
{
#if UE_SERVER
  StartServer();
#endif
}
void FGuessTheMurderGameModuleImpl::ShutdownModule()
{
}

#if UE_SERVER
// Callback function for GSDK
void OnShutdown()
{
  /* Perform any necessary cleanup and end the program */
  // Ask UE4 server to shutdown with force
  FGenericPlatformMisc::RequestExit(true);
}

// Callback function for GSDK
bool HealthCheck()
{
  return true;
}

void FGuessTheMurderGameModuleImpl::StartServer()
{
  try {
    // Call this while your game is initializing, it will start heartbeating to our agent and put the game server in an Initializing state
    Microsoft::Azure::Gaming::GSDK::start();
    Microsoft::Azure::Gaming::GSDK::registerHealthCallback(&HealthCheck);
    Microsoft::Azure::Gaming::GSDK::registerShutdownCallback(&OnShutdown);
    // Call this when your game is done initializing and players can connect
    // Note: This is a blocking call, and will return when this game server is either allocated or terminated

      if (Microsoft::Azure::Gaming::GSDK::readyForPlayers())
      {
        // readyForPlayers returns true when an allocation call has been done, a player is about to connect!
          LogInfo("Server is ready for players.");
      }
      else
      {
        // readyForPlayers returns false  when the server is being terminated
        LogError("Server is getting terminated. Not ready for players.");
      }
  }
  catch (Microsoft::Azure::Gaming::GSDKInitializationException& e)
  {
    LogError("GSDK Initialization failed: " + FString(UTF8_TO_TCHAR(e.what())));
  }
}
#endif

#if UE_SERVER
void FGuessTheMurderGameModuleImpl::LogInfo(FString message)
{
  UE_LOG(LogTemp, Display, TEXT("%s"), *message);
  Microsoft::Azure::Gaming::GSDK::logMessage(std::string(TCHAR_TO_UTF8(*message)));
}
void FGuessTheMurderGameModuleImpl::LogError(FString message)
{
  UE_LOG(LogTemp, Error, TEXT("%s"), *message);
  Microsoft::Azure::Gaming::GSDK::logMessage(std::string(TCHAR_TO_UTF8(*message)));
}
#endif

My question is also do I need the eos as a netdriver to make my server communicate with my client or could I use the OnlineSubsytemNULL ?

It seems that my other client have an other set of errors :

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property ServerDetails
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:023B
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property CallFunc_GetField_ReturnValue
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:027A
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property CallFunc_Array_Get_Item
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:032F
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property CallFunc_GetField_ReturnValue_1
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:0366
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogBlueprintUserMessages: [BP_GameInstance_C_2147482563] open :
[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property ServerDetails
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:0411
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property CallFunc_GetField_ReturnValue
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:0450
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property CallFunc_Array_Get_Item
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:0505
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

[2024.05.29-15.06.51:682][358]LogScript: Warning: Accessed None trying to read property CallFunc_GetField_ReturnValue_1
	BP_GameInstance_C /Engine/Transient.GameEngine_2147482605:BP_GameInstance_C_2147482563
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance:053C
[2024.05.29-15.06.51:682][358]LogScript: Warning: Script call stack:
	Function /Game/Sessions/BluePrints/GameInstance/BP_GameInstance.BP_GameInstance_C:ExecuteUbergraph_BP_GameInstance

Here’s the part of my game instance it’s refering to I guess :

Also this is my full game instance but it worked fine before :