Git Product home page Git Product logo

gsdk's People

Contributors

andhesky avatar brianpeek avatar briantre avatar chris-gong avatar darvell avatar dependabot[bot] avatar dgkanatsios avatar gufabre avatar haroniti avatar haydenstech avatar jochenheckl avatar jsaueressig88 avatar jseward avatar kedarhmsft avatar kencdk avatar lordoski avatar mills-entari avatar nassosterz-ms avatar pgilmorepf avatar playfabjenkinsbot avatar ravarnamsft avatar ryanvog avatar sk83rjosh avatar stkrwork avatar tculotta avatar toddbellmsft avatar toniasanzo avatar valexao avatar vitaliitrubchaninovubisoft avatar yzhao174 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gsdk's Issues

azure_007

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

UE5.0 Source Code build cannot find plugin

Describe the bug
When following the documentation to install the GSDK for Unreal Engine, the Unreal Editor (version 5.0 built from the release branch source code on GitHub) cannot "find" the plugin.

However, if the plugin is disabled, the editor launches and can find the plugin in the plugins window. The moment you enable it and restart the editor. It will say that it cannot find the plugin anymore again.

https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/server-sdks/unreal-gsdk/third-person-mp-example-gsdk-project-setup

To Reproduce
Steps to reproduce the behavior:

  1. Complete the prerequisites that the document asks for (Unreal Engine source code build, have a Dedicated Server version of the game, have the game work with networking.)
  2. Create the Plugins folder in the Game's Root directory, then create a folder in the Plugins folder called PlayFabGSDK, copy and paste all of the files found in the {depot}\GSDK\gsdk\UnrealPlugin folder and place it in the PlayFabGSDK folder.
  3. Add the plugin in the .uproject file via text editor.
  4. Add the plugin in the modules ([ProjectName].Build.cs)
  5. Right click on the .uproject file and click on Generate Visual Studio files.
  6. Build the project.
  7. Attempt to open the project with Unreal Editor.

Expected behavior
The Unreal Editor launches with the plugin enabled.

Screenshots
image

image

image

image

Desktop (please complete the following information):

  • OS: Windows 11 Pro
  • Version 22H2

Additional context
I have tried reversing the array entry in the .uproject file by having enabled: true first and then the name of the plugin. Didn't work.

Missing blueprint UE4.27.2 Source and problem with plugins build

I have done almost everything after the book, but i had a problem with adding the Plugins code.
It would not compile with that code in there.

Even so when i deleted the plugins code, the build was doing just fine.

When in editor i see the plugin in plugins folder, and it is enabled.
So if the plugin is in the editor and enabled, it should be fine?

When i start with the blueprints section, i find RegisterGSDKhealthcheck and many other register nodes, but it is missing Ready for Players node.

Registerplayers node is there.

Anyone have some thoughts?

Unity GSDK deprecated features of UnityWebRequest

Copying from https://community.playfab.com/content/idea/50608/calls-to-depricated-features-of-unitywebrequest.html

Assets\PlayFabSDK\MultiplayerAgent\PlayFabMultiplayerAgentAPI.cs(197,21): warning CS0618: 'UnityWebRequest.isNetworkError' is obsolete: 'UnityWebRequest.isNetworkError is deprecated. Use (UnityWebRequest.result == UnityWebRequest.Result.ConnectionError) instead.'

Unity has depricated the various isXXXXXError
You should use .result == then select the correct enum value

Unreachable Code during compilation for UE 5.4.1

Describe the bug
A new project built from source for Unreal Engine 5.4.1 will not build when trying to integrate the PlayFabGSDK plugin.
After adding it to the project:

"UnrealPlugin/Source/PlayFabGSDK/Private/PlayFabGSDK.cpp"
On line 136 and 146 Visual Studio 2022 return errors, "Unreachable Code."

To Reproduce
Steps to reproduce the behavior:
Follow the integration steps for an unreal project using UE 5.4.1 (Source).

Expected behavior
I expected the project to build as normal. Similarly to my project using UE 5.3.2

Screenshots
This is the Original Code.
Original

This is what I edited it too.
Edited

Desktop (please complete the following information):

  • OS: Windows11
  • Version: 23H2

Additional context
Added an, "#else", and moved the, "#endif". which at least let me build my project for the Editor, Client, & Server, targets.
Haven't tested any further than this.

USER

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Replace Flush call to support UE5.3

Describe the bug
As of UE5.3 the FHttpManager::Flush function takes an EHttpFlushReason instead of a boolean, causing a compilation failure for the GSDK Unreal Plugin.

To Reproduce
Steps to reproduce the behavior:

  1. Add the Unreal plugin to a UE5.3 project
  2. Compile
  3. See error

Expected behavior
The Unreal Plugin compiles and runs correctly on UE5.3

Desktop (please complete the following information):

  • OS: Windows 10 Enterprise
  • Version: 22H2 build number 19045.4291

Your device has been exposed to a micro bug and may be at risk

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The C++ SDK is writing its log file to the wrong folder

Describe the bug
The C++ SDK is writing its log file to the wrong folder. The log file is not in the folder specified, but next to the folder

To Reproduce
Steps to reproduce the behavior:

  1. Log a message with the log functionality of the C++ SDK
  2. Observe that the log file is not in the folder specified, but next to the folder

Expected behavior
the log file should be inside that folder not next to it.

Screenshots
Error

Desktop (please complete the following information):

  • C++ SDK

Fix idea
Either add a slash here or the config value LOG_FOLDER_KEY ("logFolder") needs to get a slash appended in the end

Issue with GSDK_CPP_Windows.lib (or libculr.dll not sure) on Unreal Engine 5.3 project compilation

Hey all,
I encountered an issue where my previously healthy server build is now now "Pending for Heartbeat" and after like 10 min it status is Unhealthy.

I only updated my source engine of unreal from 5.2.1 to 5.3 and pulled an update for visual studio 2022 (17.8.5)

Tried different approaches, but it looks like the issue is with the libraries. This is just a guess though.
Compiling shows...
image

If I comment PublicAdditionalLibraries.Add(GsdkLibs + "/libcurl.lib"); out. It will compile, but with warnings.
image

I can package my server build also, but when trying to deploy it comes back as "Pending Heartbeat".

I am puzzled by this for days, can it be because of Visual Studio? I am just failing to see how an engine update can cause this.

Any advice would be much appreciated.

Failed to parse heartbeat - Stuck in Active state

Describe the bug
Sometimes, seemingly randomly throughout a large amount of server deployments the game servers will keep receiving Failed to parse heartbeat from the GSDKInternal::decodeHeartbeatResponse method and get stuck in the Active state, unable to be joined and not being cleaned up.

Expected behavior
Not sure why the issue occurs but it should not cause the server to get permanently stuck in the Active state and maybe the JSON deserializer should provide some more information and debug output to help narrow down the issue. If an error occurs within the JSON deserializer it would make sense to log some information about the HTTP response that caused the failure.

Additional context
This issue has also been discussed in the PlayFab community here.

VMId not being updated from environmental variable

Describe the bug
The function UGSDKUtils::GetVMId() in the unreal plugin returns an empty string

To Reproduce
Steps to reproduce the behavior:
Call UGSDKUtils::GetVMId() on a deployed playfab server.

Expected behavior
We expect the actual unique VMId of the server to be returned.

Occurs on the latest version.

Additional context
The PF_VM_ID environmental variable seems to be never used in the code.

Playfab Admin Models contain an enum for Regions but no coversion to String Version

The PlayFabAdminModels.cs has a region enum (see below) but GameManager and the Client/Server Api all require strings instead of enum. To further confuse things the strings in those api(s) are listed differently "EastUs" instead of USEast. Please provide a conversion routine from enum to string and string to enum so the different APIs can be consistent.

public enum Region
{
    USCentral,
    USEast,
    EUWest,
    Singapore,
    Japan,
    Brazil,
    Australia
}

Possible player crash because of GSDK

I was testing my game's server when i was kicked from the server along with the other player, client logs dont show anything but server logs shows the following:

LogPlayFabGSDK: Error: Failed to parse heartbeat [2021.12.23-23.01.41:420][312]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.00, Real: 60.00, Good: 60.00, DriverTime: 151.07, Threshold: 60.00, [UNetConnection] RemoteAddr: 85.241.65.128:60080, Name: IpConnection_2147482523, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482474, Owner: GameplayPlayerControllerBP_C_2147482474, UniqueId: Steam:076561198006820266 [2021.12.23-23.01.41:421][312]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.00, Real: 60.00, Good: 60.00, DriverTime: 151.07, Threshold: 60.00, [UNetConnection] RemoteAddr: 85.241.65.128:60080, Name: IpConnection_2147482523, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482474, Owner: GameplayPlayerControllerBP_C_2147482474, UniqueId: Steam:076561198006820266, Driver = GameNetDriver IpNetDriver_2147482540 [2021.12.23-23.01.41:421][312]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.00, Real: 60.00, Good: 60.00, DriverTime: 151.07, Threshold: 60.00, [UNetConnection] RemoteAddr: 85.241.65.128:60080, Name: IpConnection_2147482523, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482474, Owner: GameplayPlayerControllerBP_C_2147482474, UniqueId: Steam:076561198006820266' [2021.12.23-23.01.41:421][312]LogBlueprintUserMessages: [ProjectArenaGameInstanceBP_C_2147482601] NET ERROR: Connection timeout [2021.12.23-23.01.41:421][312]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 85.241.65.128:60080, Name: IpConnection_2147482523, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482474, Owner: GameplayPlayerControllerBP_C_2147482474, UniqueId: Steam:076561198006820266, Channels: 11, Time: 2021.12.23-23.01.41 [2021.12.23-23.01.41:421][312]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 85.241.65.128:60080, Name: IpConnection_2147482523, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482474, Owner: GameplayPlayerControllerBP_C_2147482474, UniqueId: Steam:076561198006820266 [2021.12.23-23.01.41:453][313]LogTemp: Warning: LEAVING [2021.12.23-23.01.41:453][313]LogTemp: Warning: PLAYERSTATE STUFF UPPER LEVEL [2021.12.23-23.01.41:453][313]LogTemp: Warning: PLAYERSTATE STUFF LOWER LEVEL [2021.12.23-23.01.41:454][313]LogTemp: Warning: team 1 lost all players [2021.12.23-23.01.41:456][313]LogTemp: Warning: server shutdown time: 239.966797 [2021.12.23-23.01.41:484][314]LogTemp: Warning: empty server timer: 239.966797 [2021.12.23-23.01.41:484][314]LogTemp: Warning: server shutdown time: 239.933777 [2021.12.23-23.01.41:485][314]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.00, Real: 60.00, Good: 60.00, DriverTime: 151.14, Threshold: 60.00, [UNetConnection] RemoteAddr: 85.241.65.222:53644, Name: IpConnection_2147482526, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482424, Owner: GameplayPlayerControllerBP_C_2147482424, UniqueId: Steam:076561198061035232, Driver = GameNetDriver IpNetDriver_2147482540 [2021.12.23-23.01.41:485][314]LogBlueprintUserMessages: [ProjectArenaGameInstanceBP_C_2147482601] NET ERROR: Connection timeout [2021.12.23-23.01.41:485][314]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 85.241.65.222:53644, Name: IpConnection_2147482526, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482424, Owner: GameplayPlayerControllerBP_C_2147482424, UniqueId: Steam:076561198061035232, Channels: 11, Time: 2021.12.23-23.01.41 [2021.12.23-23.01.41:485][314]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 85.241.65.222:53644, Name: IpConnection_2147482526, Driver: GameNetDriver IpNetDriver_2147482540, IsServer: YES, PC: GameplayPlayerControllerBP_C_2147482424, Owner: GameplayPlayerControllerBP_C_2147482424, UniqueId: Steam:076561198061035232 [2021.12.23-23.01.41:519][315]LogTemp: Warning: LEAVING [2021.12.23-23.01.41:520][315]LogTemp: Warning: PLAYERSTATE STUFF UPPER LEVEL [2021.12.23-23.01.41:520][315]LogTemp: Warning: PLAYERSTATE STUFF LOWER LEVEL

GSDK fails to parse a heart beat and then both players get kicked out, i am NOT sure that those are related but it is the first time i've seen this, never had this issue with the previous implementation as far as i can remember, it might be worth investigating.

libc++ compatible version for Unreal

Is your feature request related to a problem? Please describe.
Linux servers in Unreal require the library to be compiled against libc++ to be statically linked.
I tried compiling dynamic versions of the library, but didn't have any luck with this when it came to actually packaging the project in Unreal

Describe the solution you'd like
library compiled against libc++

Describe alternatives you've considered
I tried for quite some time to compile this through VS, however I kept getting issues with jsoncpp trying to link against libstd.

Additional context
I solved this by using a modified version of the CMakeList from this PR: #70

project(GSDK_CPP_Linux)

set(CMAKE_CXX_COMPILER "clang++")

set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++")

add_library(GSDK_CPP_Linux
    cpp/cppsdk/gsdk.cpp
    cpp/cppsdk/gsdkConfig.cpp
    cpp/cppsdk/gsdkLog.cpp
    cpp/cppsdk/gsdkUtils.cpp
    cpp/cppsdk/jsoncpp.cpp
    cpp/cppsdk/ManualResetEvent.cpp
)

target_compile_options(GSDK_CPP_Linux PRIVATE -DGSDK_LINUX)
set_target_properties(GSDK_CPP_Linux PROPERTIES CXX_STANDARD 14)
target_include_directories(GSDK_CPP_Linux PRIVATE "cpp/cppsdk")

This is the CMakeLists.txt I used, with Ubuntu on WSL 2 in Windows. I was able to take the resulting .a file and link it in Unreal + deploy to PlayFab.

Note that I'm not sure the CMake version needs to be >= 3.2, so you could try setting this lower.

UE 5.1.1 "Heartbeat endpoint and Server id are required configuration values"

Hello, using a source build of the most recent Unreal Engine 5.1.1 build, I followed all tutorials and all github issues and forum posts to try and squash this fatal error message "Heartbeat endpoint and Server id are required configuration values" when running my server through LocalMultiplayerAgent. I've tried every combination of file structures, game port names, port numbers, including DLL's, and such with the same error causing the server to crash after mounting all plugins.

I was getting ready to call it quits on the integration entirely, when I decided to upload the server build to playfab directly as a final test. To my surprise, the server completely works on playfabs end and I was even able to connect with a friend which was a massive relief but still leads me to wonder what is causing so many issues with testing it locally.

This is what my MultiplayerSettings.json currently looks like (titleID and gamename redacted), however I have tried many configurations whether they were the defaults it came with, I tried the "Huli" configuration guide that shows up when you google, I've used the settings generator and I've tried every game port name I could find to no avail. I usually run it as a windows process as I have never set up anything in regards to Docker, and I do indeed see the process run in task manager before it instantly closes and logs to gamelogs.

{

"AssetDetails": [
    {
        "LocalFilePath": "C:\\Users\\alexw\\Videos\\GameBuilds\\GameServerTest.zip"
    }
],
"PortMappingsList": [
    [
        {
            "GamePort": {
                "Name": "gameport",
                "Number": 7777,
                "Protocol": "UDP"
            },
            "NodePort": 56100
        }
    ]
],
"GameCertificateDetails": [],
"SessionConfig": {
    "SessionCookie": null,
    "SessionId": "af240ab0-9c7f-43b8-9630-d79db3b5cc8e",
    "InitialPlayers": [
        "Player1",
        "Player2"
    ]
},
"DeploymentMetadata": {
    "Environment": "LOCAL",
    "FeaturesEnabled": "List,Of,Features,Enabled"
},
"TitleId": "0",
"Region": "EastUs",
"BuildId": "28fb75f8-cad1-4908-b5d4-0a2e37bcc71e",
"RunMode": 0,
"ProcessStartParameters": {
    "StartGameCommand": "GameServerTest\\Binaries\\Win64\\GameTestServer.exe -log"
},
"OutputFolder": "GameLogs",
"NumHeartBeatsForActivateResponse": 10,
"NumHeartBeatsForTerminateResponse": 172800,
"AgentListeningPort": 56001

}

Support for ue4 .24

I tried getting it to work on .24 but it doesnt compile, would be a nice addition support for older versions.

Assets\PlayFabSdk\MultiplayerAgent\PlayFabMultiplayerAgentView.cs(12,17): error CS0103: The name 'PlayFabMultiplayerAgentAPI' does not exist in the current context

Hello. Today I started a new project, imported Playfab SDK from Playfab website and Playfab GSDK from Unity GSDK folder and this error comes up:

Assets\PlayFabSdk\MultiplayerAgent\PlayFabMultiplayerAgentView.cs(12,17): error CS0103: The name 'PlayFabMultiplayerAgentAPI' does not exist in the current context

Unity version: 2019.3.13f1

I tried also with the old version of GSDK linked in the description.

Update to System.Text.Json

Is your feature request related to a problem? Please describe.
Increase performance and stay up-to-date by moving to the System.Text.Json package. Info here.

Describe the solution you'd like
Remove Newtonsoft.Json package and update to System.Text.Json.

Issues with Unreal GSDK plugin

copying from https://community.playfab.com/idea/55633/the-playfabgsdk-github-tutorial-should-be-updated.html

FYI @valexao @stkrwork

I am working with 4.26.2-Chaos unreal build and I downloaded the GDSK-master for it, the folder that the plugin is in is called UnrealPlugin. Either that folder name should be changed to PlayfabGSDK, or the portion of the tutorial that says

'First, open your File Explorer and create a folder called “Plugins” in your games' root directory. Then drag the Playfab GSDK plugin file into the Plugins folder.'

should be updated to warn that simply putting the file in there will not work when trying to build it. It will say it cannot find the plugin. It took me a while to figure out there needs to be another folder that the plugin resides in (example: Plugins>PlayfabGSDK>PlayfabGSDK.uplugin)

Additionally, I kept getting an error when attempting to generate the files for my project: "Couldn't set association for project. Please make sure the file is writeable". I found out when I was copying and pasting from this example in the tutorial (the portion where you edit your .uproject file) that the spacing needs to be exactly four spaces ahead of the previous line. I had attempted to copy and paste everything on and below line in VS2019:

"AdditionalDependencies": [
I guess it was adding in some additional space or had less, I do not know since I am not experienced with c++. I just deleted all space before "Engine" until it lined with the beginning of "AdditionalDependencies", then hit space four times. I put an example of the additional comment that might help. The reason I didn't copy and paste the entire thing was because my EngineAssociation was a long and difficult to remember value so I just wanted to add what wasn't present. Hope this helps, it took me two days and several re-installs due to this confusion.

{
    "FileVersion": 3,
    "EngineAssociation": "4.26",
    "Category": "",
    "Description": "",
    "Modules": [
        {
            "Name": "<projectname>",
            "Type": "Runtime",
            "LoadingPhase": "Default",
            "AdditionalDependencies": [
                "Engine"		//four spaces before engine
            ]
        }
    ],
    "Plugins": [                    // Add this if it doesn't exist
        {                           // Add this
            "Name": "PlayfabGSDK",  // Add this
            "Enabled": true         // Add this
        }                           // Add this
    ]                               // Add this if it doesn't exist
}

Request to disable heartbeats/plugin functionality with a variable.

It would be good for debugging and for portability to be able to simply disable the plugins functionality with a global variable some how.

If i want to send the server .exe to a friend so that he can run the server on his machine i have to disable the plugin and delete all related blueprints every time and this is very time consuming/annoying.

Also, if you want to have a server browser with players hosting sessions on their machines i believe that is not currently possible because the game will always be looking for the heartbeats and it will just crash if you don't run the server on the playfab agent? correct me if i am wrong but i found nothing on this in the docs.

So i would assume that disabling the plugin functionality somehow would allow for those sessions to be created normally and for the .exe to run like a regular ue4 server .exe .

Unreal Engine GSDK plugin memory leak in StandingBy

Describe the bug
Unreal engine dedicated server using GSDK plugin will slowly consume more and more RAM over time.

To Reproduce
Steps to reproduce the behavior:

  1. Add PlayFabGSDK to ThirdPersonMP project
  2. Build linux dedicated server using Docker
  3. Run LocalMultiplayerAgent on the server image with NumHeartBeatsForActivateResponse set to a large number to simulate StandingBy
  4. See Docker Container Stats Memory usage

Expected behavior
Memory Usage should not rise continuously

Screenshots
memoryleak

Desktop (please complete the following information):

  • OS: Linux
  • Latest GSDK for Unreal Engine Plugin

*Additional context
I am running two servers on a playfab VM, and in the first part (before 12:00) the servers are in standing by, and you can observe they take turns eating up memory, crashing, and reopening.
After 12 I requested both servers to become active, closed them to reset their memory usage, and then request them both again, which sets them in the Active State. As you can see from that point forward, memory availability is stable.
Until 15:00 when the servers were closed and new ones were back in StandingBy state.

Unreal Engine Source 5.3.2 compiling server build problem

Hey all,
any of you have experience building the Playfab GSDK with 5.3.2 (Meta Branch), I keep running into this issue when I try to compile the server build
I am using the C++ implementation of the plugin.

image

Compiling with 5.2 works just fine.

Thanks a lot. :)

UPDATE
Tried with an empty project also just using the GSDK Plugin, managed to compile and package server build, but when trying to deploy on Playfab it stuck on Pending Heartbeat.

image

GSDK - Session Cookie Updated Event

Is your feature request related to a problem? Please describe.
When a server is created with a session cookie, it is usually not until a couple heartbeats that the cookie is available.

Describe the solution you'd like
An event that fires when the session cookie has been updated.

Describe alternatives you've considered
I currently have my GSDK modified to do this but it's quite messy. Alternatively it'd be interesting to know why the session cookie isn't there from the start, could this maybe be better done as an environment variable so it's there from the start?

Additional context
Developers creating servers sometimes want to put certain game info in there and can easily fall in to the trap of expecting that the session cookie to be available from the start of initializing the GSDK.

Inconsistent names in UE plugin

To Reproduce
Steps to reproduce the behavior:

  1. Try to open project on MacOS with PlayFabGSDK plugin
  2. Get an error

Expected behavior
Project open without any error with PlayFabGSDK.

Desktop (please complete the following information):

  • OS: MacOS

Unity Multiplayer Server's heartbeat vanishes

From https://github.com/PlayFab/UnitySDK/issues/226

Been chasing an issue where our game server loses its heartbeat. Our server actually switches scenes during its startup.

Root cause is missing code in PlayFabMultiplayerAgentView

Adding the following to the class fixed the issue:

public class PlayFabMultiplayerAgentView : MonoBehaviour
{
private float _timer;
/// <summary>
/// Awake constructor
/// </summary>
private void Awake()
{
    Debug.Log($"{Time.fixedTime} PlayFabMultiplayerAgentView awake ");

    // Need to keep this game object alive through scene changes.
    DontDestroyOnLoad(this);
}

/// <summary>
/// Called when gameobject is destroyed
/// </summary>
private void OnDestroy()
{
    Debug.Log($"{Time.fixedTime} PlayFabMultiplayerAgentView destroyed ");
}

Unreal: FGSDKInternal::SendHeartbeat() may crash after the engine's shutdown phase because the HTTP module is unloaded

Hi,

Describe the bug

FGSDKInternal::SendHeartbeat() may crash after the engine's shutdown phase.
Because this happens in async code, this does not always occur, depending on timings.

The crash occurs due to a nullptr dereference at the line FHttpModule::Get().CreateRequest() in FGSDKInternal::SendHeartbeat(), after the engine's shutdown phase (when the game server requests exits and all modules are unloaded).
The only way this could happen would be because the HTTP module is unloaded, and because we're in the shutdown phase, the module is not allowed to be loaded again.

To prevent this, the following snippet could be inserted at the beginning of FGSDKInternal::SendHeartbeat():

	if (!FModuleManager::Get().IsModuleLoaded(TEXT("HTTP")))
		return;

However, it would still not be thread-safe: it's technically possible for the HTTP module to be unloaded on the GameThread at the exact same time it is accessed from the async thread.

To Reproduce

  1. Run any dedicated server built with Unreal Engine and the PlayFab GSDK; For this, use PlayFab's LocalMultiplayerAgent tool.
  2. Make the server exit normally (one way to do this is FGenericPlatformMisc::RequestExit(false))
  3. The aforementioned crash may occur because FHttpModule::Get() returns nullptr.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.