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

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

Closed D3valon closed 8 months ago

D3valon commented 9 months ago

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.

tculotta commented 9 months ago

Thanks for bringing this up! We'll be looking into this.

D3valon commented 9 months ago

Thanks for getting back to me, is there anything I could do in the time being? Or would you recommend any workaround? Should I try to update the engine to 5.3.2 perhaps?

Thanks!

tculotta commented 9 months ago

Unfortunately this looks to simply be a breaking change introduced with 5.3. You can certainly try 5.3.2, but I don't necessarily expect that to work. Support for 5.3 is part of our backlog, and we'll be able to take a look at this then. In the meantime I would recommend moving back to 5.2.1 if you can.

D3valon commented 9 months ago

Yes, I did check with 5.3.2 out of curiosity, but the problem is there. I will go back using 5.2.1 and will keep an eye out if there will be any update on this matter in the future.

Just a side note, when I was browsing on the unreal discord, someone had similar issue with the libcurl.lib (libcurl.dll) LNK 2005, but apparently with 5.2.1. So I am a bit hesitant to put a pin on this, that it is caused by the engine, but after a week of investigation sadly nothing helped to bridge this problem.

tculotta commented 9 months ago

If it can occur across versions, it could also be some conflict between multiple plugins of course, though I'm not sure what all attempts to pull in libcurl. That may require more investigation to tease out what could be conflicting there if that is the case.

shawnryanbruno commented 8 months ago

Yes, I did check with 5.3.2 out of curiosity, but the problem is there. I will go back using 5.2.1 and will keep an eye out if there will be any update on this matter in the future.

Just a side note, when I was browsing on the unreal discord, someone had similar issue with the libcurl.lib (libcurl.dll) LNK 2005, but apparently with 5.2.1. So I am a bit hesitant to put a pin on this, that it is caused by the engine, but after a week of investigation sadly nothing helped to bridge this problem.

Did 5.2.1 work out for you? I can't get it to work in 5.3 either. :/

shawnryanbruno commented 8 months ago

Unfortunately this looks to simply be a breaking change introduced with 5.3. You can certainly try 5.3.2, but I don't necessarily expect that to work. Support for 5.3 is part of our backlog, and we'll be able to take a look at this then. In the meantime I would recommend moving back to 5.2.1 if you can.

At least AWS gamelift is keeping up with the latest UE releases. Any ETA on this updated release?

D3valon commented 8 months ago

Did 5.2.1 work out for you? I can't get it to work in 5.3 either. :/

Hey, sorry about the late reply, yes I went back to 5.2.1 and that resolved it for now. I was investigating for over a week and tried the 5.3.2 build from Epic's branch, I had the same issue. Still not entirely sure what is causing it.

shawnryanbruno commented 8 months ago

Did 5.2.1 work out for you? I can't get it to work in 5.3 either. :/

Hey, sorry about the late reply, yes I went back to 5.2.1 and that resolved it for now. I was investigating for over a week and tried the 5.3.2 build from Epic's branch, I had the same issue. Still not entirely sure what is causing it.

Yah, I can't figure it out either. And the downside is my project is in 5.3, so it's impossible to downgrade it. This is infuriating. Can you recommend a similar product to playfab? I desperately need a dedicated server hosting that has blueprint support, like playfab.

tculotta commented 8 months ago

Confirming that we are indeed looking into this issue, though there's no answer to this just yet.

shawnryanbruno commented 8 months ago

Confirming that we are indeed looking into this issue, though there's no answer to this just yet.

I appreciate the hard work. Keep in mind - this is in fact breaking. If we have to wait too long, we may as well just move on to another backend.

tculotta commented 8 months ago

I got the 5.3 version of the engine and was able to successfully build a project using the plugin there. After taking another look at the second image provided in the initial post, I'd like to verify the sdk version you're using in this scenario. The namespace in that image is Microsoft::Azure::Gaming which is defined in the cpp sdk but not the UnrealPlugin version.

Are you pulling the GSDK source from the cpp folder or the UnrealPlugin folder of this repo?

D3valon commented 8 months ago

I got the 5.3 version of the engine and was able to successfully build a project using the plugin there. After taking another look at the second image provided in the initial post, I'd like to verify the sdk version you're using in this scenario. The namespace in that image is Microsoft::Azure::Gaming which is defined in the cpp sdk but not the UnrealPlugin version.

Are you pulling the GSDK source from the cpp folder or the UnrealPlugin folder of this repo?

Okay thanks for checking it. I'm using the cpp folder, for it, which is unchanged since 5.1 and was working fine until now. Should I try the blueprint implementation then?

That gives me hope that you got it working. Is it deployed successfully on playfab as well? Thanks!

tculotta commented 8 months ago

You don't have to use the blueprint implementation to be clear. You can still use C++ with the Unreal plugin sdk as shown here. The sdk from the cpp folder may have happened to work with some versions of Unreal, but that is not a supported scenario.

shawnryanbruno commented 8 months ago

You don't have to use the blueprint implementation to be clear. You can still use C++ with the Unreal plugin sdk as shown here. The sdk from the cpp folder may have happened to work with some versions of Unreal, but that is not a supported scenario.

I am personally using only the UE Plugin. I don't use the CPP version. I'll take another look at it.

shawnryanbruno commented 8 months ago

You don't have to use the blueprint implementation to be clear. You can still use C++ with the Unreal plugin sdk as shown here. The sdk from the cpp folder may have happened to work with some versions of Unreal, but that is not a supported scenario.

Also, the issue isn't building the project. The issue is when trying to run the server, it gives an error: Heartbeat endpoint and Server id are required configuration values.

D3valon commented 8 months ago

I will look into it again tomorrow then, luckily I kept thr 5.3 engine as well just in case.

Just as shawnryanbruno said too, I was able to compile and package my project, but deployment to the pf server failed with constantly pending heartbeat.

Did your project deployed all fine tculotta on pf as well?

D3valon commented 8 months ago

Using the Unreal Plugin folder results in the same issue, except that during the compilation of the Server build i do not have the libcurl related errors to show up. When I go onto deploying the build it is still pending on heartbeat. Wondering if you managed to deploy. image

shawnryanbruno commented 8 months ago

The entire community is so frustrated with GSDK right now, I can see alot of people leaving.

shawnryanbruno commented 8 months ago

{"log":"LogStreaming: Display: FlushAsyncLoading(1): 1 QueuedPackages, 0 AsyncPackages", "stream":"stdout", "time":"2024-02-07T18:01:24.8935086Z"} {"log":"LogDeviceProfileManager: Display: Deviceprofile LinuxArm64Editor not found.", "stream":"stdout", "time":"2024-02-07T18:01:24.8966693Z"} {"log":"LogDeviceProfileManager: Display: Deviceprofile LinuxArm64 not found.", "stream":"stdout", "time":"2024-02-07T18:01:24.8967056Z"} {"log":"LogCsvProfiler: Display: Metadata set : deviceprofile=\"WindowsServer\"", "stream":"stdout", "time":"2024-02-07T18:01:24.8985470Z"} {"log":"LogTextureEncodingSettings: Display: Texture Encode Speed: Final (cook).", "stream":"stdout", "time":"2024-02-07T18:01:24.9095124Z"} {"log":"LogTextureEncodingSettings: Display: Oodle Texture Encode Speed settings: Fast: RDO Off Lambda=0, Effort=Normal Final: RDO Off Lambda=0, Effort=Normal", "stream":"stdout", "time":"2024-02-07T18:01:24.9095498Z"} {"log":"LogTextureEncodingSettings: Display: Shared linear texture encoding: Disabled", "stream":"stdout", "time":"2024-02-07T18:01:24.9095652Z"} {"log":"LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.", "stream":"stdout", "time":"2024-02-07T18:01:25.0114528Z"} {"log":"LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.", "stream":"stdout", "time":"2024-02-07T18:01:25.0114966Z"} {"log":"LogAudio: Display: Registering Engine Module Parameter Interfaces...", "stream":"stdout", "time":"2024-02-07T18:01:25.0527878Z"} {"log":"LogSlateStyle: Warning: Missing Resource from 'CoreStyle' Style: 'Unable to find Brush 'Sequencer.Timeline.VanillaScrubHandleDown'.'", "stream":"stdout", "time":"2024-02-07T18:01:25.0545824Z"} {"log":"LogStreaming: Display: AsyncLoading2 - NotifyRegistrationComplete: Registered 25302 public script object entries (663.99 KB)", "stream":"stdout", "time":"2024-02-07T18:01:25.0622499Z"} {"log":"LogStreaming: Display: AsyncLoading2 - Thread Started: false, IsInitialLoad: false", "stream":"stdout", "time":"2024-02-07T18:01:25.0622897Z"} {"log":"LogCsvProfiler: Display: Metadata set : largeworldcoordinates=\"1\"", "stream":"stdout", "time":"2024-02-07T18:01:25.0679187Z"} {"log":"LogInit: Display: Game Engine Initialized.", "stream":"stdout", "time":"2024-02-07T18:01:25.0759080Z"} {"log":"LogInit: Display: Starting Game.", "stream":"stdout", "time":"2024-02-07T18:01:25.0763109Z"} {"log":"LogStreaming: Display: 0.001 ms for processing 30 objects in RemoveUnreachableObjects(Queued=1, Async=0). Removed 1 (66->65) packages and 1 (68->67) public exports.", "stream":"stdout", "time":"2024-02-07T18:01:25.0816811Z"} {"log":"LogOnline: Warning: EOS: Unable to AutoLogin user (0) due to missing auth command line args", "stream":"stdout", "time":"2024-02-07T18:01:25.1021946Z"} {"log":"LogInit: Display: Engine is initialized. Leaving FEngineLoop::Init()", "stream":"stdout", "time":"2024-02-07T18:01:25.1081885Z"} {"log":"LogPlayFabGSDK: Warning: Received Termination State", "stream":"stdout", "time":"2024-02-07T18:02:26.5091811Z"} {"log":"LogHttp: Warning: 000002EFDB5ACBB0: request was cancelled", "stream":"stdout", "time":"2024-02-07T18:02:26.5440782Z"}

shawnryanbruno commented 8 months ago

It just won't get past initialized. I give up.

shawnryanbruno commented 8 months ago

This is absolutely ridiculous. This has completely shut down our project. We are losing so much money everyday because of this broken bug. FIX YOUR GARBAGE.

tculotta commented 8 months ago

Using the Unreal Plugin folder results in the same issue, except that during the compilation of the Server build i do not have the libcurl related errors to show up. When I go onto deploying the build it is still pending on heartbeat. Wondering if you managed to deploy. image

I'm glad that fixed the linker issues. I'll be closing this issue out since that is resolved. For this pending heartbeat behavior, that would be something PlayFab Support can help more with. If you can reproduce this issue with the LocalMultiplayerAgent, providing those logs would be helpful when you create that ticket. Otherwise if the server runs successfully with the local agent but fails when run on the PlayFab infrastructure, the logs from the actual VM should be helpful enough for their investigation.