PlayFab / gsdk

Game Server SDK for PlayFab Multiplayer Servers
https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/
Apache License 2.0
146 stars 115 forks source link

Unreal Engine Source 5.3.2 compiling server build problem #173

Closed D3valon closed 5 months ago

D3valon commented 5 months ago

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

tculotta commented 5 months ago

Hi, this looks like a duplicate of your previous issue, #164.

For connection issues once deployed, you should still reach out to PlayFab Support with the VM logs if their advice from the last instance of this issue doesn't fix this.

D3valon commented 5 months ago

Hi Yes, thanks for getting back so quick. That discussion went a bit sideways as someone else joined in with an issue which was not related to the one which i reported.

And yes, I got in contact with the Playfab team as well, but they could not help me with this.

I am able to build perfectly fine with 5.2 versions of unreal and i am using your plugin for almost 2 years now. The issue comes when I try it with 5.3... does not matter if it is C++ implementation or Blueprints based, the end result is always "pending heartbeat"

There is something changed with the libcurl.lib requirements with 5.3

The heartbeatThreadFunc below might be an indication on why i am getting the "Pending for heartbeat" on deployment stage.

Any advice would be much appreciated.

warning LNK4217: symbol 'curl_global_init' defined in 'libcurl.lib(easy.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"public: cdecl Microsoft::Azure::Gaming::GSDKInternal::GSDKInternal(void)" (??0GSDKInternal@Gaming@Azure@Microsoft@@QEAA@XZ)' 1>LINK : warning LNK4217: symbol 'curl_slist_append' defined in 'libcurl.lib(slist.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"public: cdecl Microsoft::Azure::Gaming::GSDKInternal::GSDKInternal(void)" (??0GSDKInternal@Gaming@Azure@Microsoft@@QEAA@XZ)' 1>LINK : warning LNK4217: symbol 'curl_easy_init' defined in 'libcurl.lib(easy.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"public: cdecl Microsoft::Azure::Gaming::GSDKInternal::GSDKInternal(void)" (??0GSDKInternal@Gaming@Azure@Microsoft@@QEAA@XZ)' 1>LINK : warning LNK4217: symbol 'curl_easy_setopt' defined in 'libcurl.lib(setopt.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"private: void cdecl Microsoft::Azure::Gaming::GSDKInternal::heartbeatThreadFunc(void)" (?heartbeatThreadFunc@GSDKInternal@Gaming@Azure@Microsoft@@AEAAXXZ)' 1>LINK : warning LNK4217: symbol 'curl_easy_perform' defined in 'libcurl.lib(easy.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"private: void cdecl Microsoft::Azure::Gaming::GSDKInternal::heartbeatThreadFunc(void)" (?heartbeatThreadFunc@GSDKInternal@Gaming@Azure@Microsoft@@AEAAXXZ)' 1>LINK : warning LNK4217: symbol 'curl_easy_getinfo' defined in 'libcurl.lib(easy.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"private: void cdecl Microsoft::Azure::Gaming::GSDKInternal::receiveHeartbeatResponse(void)" (?receiveHeartbeatResponse@GSDKInternal@Gaming@Azure@Microsoft@@AEAAXXZ)' 1>LINK : warning LNK4217: symbol 'curl_easy_reset' defined in 'libcurl.lib(easy.obj)' is imported by 'GSDK_CPP_Windows.lib(gsdk.obj)' in function '"private: void __cdecl Microsoft::Azure::Gaming::GSDKInternal::heartbeatThreadFunc(void)" (?heartbeatThreadFunc@GSDKInternal@Gaming@Azure@Microsoft@@AEAAXXZ)

tculotta commented 5 months ago

The C++ SDK (within gsdk/cpp) is not written to be an Unreal plugin and may introduce some unforseen behavior. We only support using the UnrealPlugin version (which is not blueprint only) of the sdk with Unreal. I know you mentioned this issue seems to appear in both versions, but can you provide more context using the UnrealPlugin flavor instead of the cpp sdk?

tculotta commented 5 months ago

In the meantime, can you provide the ticket id for that support conversation, so I can follow up with them?

D3valon commented 5 months ago

Hey,

Sure thing, So today only worked with the GSDK Unreal Plugin implementation and in both cases (C++ & Blueprint Implementation), the libcurl.lib did not showed up at all, both server compilation and packaging of the build with development and Shipping configuration worked just fine.

Sadly I have the same problem with both cases that the Server deployment on Playfab does not go beyond Pending for heartbeat.

I am even working with an empty project, so just using the GSDK plugin, with the Unreal 5.3.2

It would be easy to reproduce this issue, just use any of the implementation of the GSDK Plugin, package a server build and try to deploy it on Playfab. Not sure if any in the dev team could try to recreate this as at this point I do not know what else I could try.

I tried chasing after missing DLLs and look for some additional Project settings, but no luck. Literally went from a perfectly working project, to not being able to deploy, due to the engine update. Not sure, where can be the problem at this point.

What I meant by the playfab team is that I posted on the community forums, but you can have a look as well.

https://community.playfab.com/questions/143929/unreal-engine-53-unhealthy-for-server-after-updati.html?childToView=144006#answer-144006

Thanks a lot!

This is the log from PlayfabAgent----- [Information] Attempting to create user RF1Z3OWM5 with expiration set to 1/17/2024 10:07:12 AM 2024-01-16 10:07:13.356 +00:00 [Information] User RF1Z3OWM5 not found, proceeding to create the user.Name Enabled Description---- ------- -----------RF1Z3OWM5 True
2024-01-16 10:07:28.941 +00:00 [Information] Sending heartbeat with correlationId: a4010c4f-ff06-408c-98cf-147600cc5c6b, body: {"VmState":"Running","AssignmentId":"ffffffff-ffff-ffff-d9b9-070000000000:b3171010-e9ce-4671-942f-413587c6158a:NorthEurope","SessionHostHeartbeatMap":{"6cd60594f7a69c527d69f27bff5d8c4dc0049de836778f74f6dfe05a12c1c5d9":{"CurrentGameState":"PendingHeartbeat","LastStateTransitionTimeUtc":"2024-01-16T10:06:48.7709657Z","AssignmentId":"ffffffff-ffff-ffff-d9b9-070000000000:b3171010-e9ce-4671-942f-413587c6158a:NorthEurope"}},"SequenceNumber":6,"AgentProcessGuid":"7c484bc3-4ff7-4cca-bbb9-237db7d243fe","IsUnassignable":true,"NetworkConfiguration":{"VmName":"7B9D9_0fb49c57-bdc7-4bdb-9654-c0ab844f81f6_0","Endpoints":[{"FrontendIpAddress":"40.85.74.143","FrontEndPort":30000,"BackEndPort":30000,"Protocol":"Udp"},{"FrontendIpAddress":"40.85.74.143","FrontEndPort":56000,"BackEndPort":56002,"Protocol":"Tcp"},{"FrontendIpAddress":"40.85.74.143","FrontEndPort":50000,"BackEndPort":3389,"Protocol":"Tcp"}

tculotta commented 5 months ago

Given this information and some investigating on our side, we've determined this is still not an issue within the SDK. I noticed the last response to the linked forum question suggested another line of investigation for you. I would recommend continuing that conversation, or if you're able, creating a support ticket with PlayFab Support via game manager. In the meantime, the Microsoft Game Dev discord may have other staff or Unreal-focussed devs that could have more ideas of how to continue investigating your issue.

While GitHub is still great for reporting GSDK issues, it is rather more focussed on those issues alone, so I'll be closing out this issue here.