question

Leigh Warren avatar image
Leigh Warren asked

Unreal Engine 4.23 PlayFab SDK integration with OnlineSubsystem

Does anyone have advice on how to integrate the Playfab SDK into the online subsystem? I saw forum user @Montana Tuska did something for this a year ago. We aren't able to successfully compile that into our project. Its important that we use the regular session functionality to enable other features we are already using with that API. Our first error being - expecting to find 'ICMP' in UE4Rules - Type must derive from type defined by Unreal Build Tool.

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

element808 avatar image element808 commented ·

Aloha Leigh, are you trying to integrate the SDK (UE4 marketplace plugin type stuff,i.e. login, registration, etc..) or GSDK (multiplayer and server stuff)?

0 Likes 0 ·
Leigh Warren avatar image Leigh Warren commented ·

For us there was a network upload issue via the browser. Worked fine when we used Powershell to upload the zip. Lower in this doc https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/deploying-playfab-multiplayer-server-builds

0 Likes 0 ·
Leigh Warren avatar image
Leigh Warren answered

@darkworth000 my post went right to the top (admin please edit) so repeating here for you - For us there was a network upload issue via the chrome browser. Using Fiddler we saw that zero bytes get uploaded and stops entirely when pressing save and leaving the build config page. This could be a specific regional / ISP issue. It worked fine when we used Powershell to upload the zip. Lower in this doc https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/deploying-playfab-multiplayer-server-builds

These are only 2 commands needed to it :

## Specify your PlayFab Title ID for the specific title and use a developer secret
key for authorization.

Set-PFTitle -TitleID "mytitleID" -secretkey "mysecretkey"

## Add an asset and get the list of assets

Add-PFMultiplayerAsset -FilePath "C:\example.zip"

Then go back to the web build config page and you will see your new zip there for selection. Deployment to Standby took only a few minutes after that.

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.

darkworth000 avatar image darkworth000 commented ·

I will try this, thank you

0 Likes 0 ·
brandon@uprootstudios.com avatar image brandon@uprootstudios.com darkworth000 commented ·

@Leigh Warren @darkworth000 Shameless plug but feel free to use my PlayFab admin tool to upload your assets to PF and configure Linux builds. The main functionality that you'll gain as of now is asset upload progress / asset management and deletion. If you want to use it for configuring Linux builds, you'll also need PowerShell and Docker installed.

https://github.com/bphillips09/PFAdmin/

0 Likes 0 ·
Leigh Warren avatar image
Leigh Warren answered

@Element808 super fast response - thank you! Both. We are already many of the PlayFab Marketplace Plugin API calls - registration, authorisation, friends, data etc. We are aiming for a dedicated server deployment for x-play. We are just about to implement the Playfab Matchmaking API calls for the lobby and so we can either use external servers or Playfab's Matchmaking server service (GDSK?) when out of preview. For example, we would want to also use AddVOIPTalker which depends on the UE onlinesubsystem sessions. We're at design stage for these pieces so would be great to know the best approach and implementation.

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

element808 avatar image element808 commented ·

Cool, just making sure I give you the right advice :)

My studio and I released one of our internal technical docs explaining how we integrated the GSDK into UE4 (4.22.3, but should work the same in 4.23) for our project, to work with their dedicated servers. PlayFab and Microsoft will eventually publish our guide on the Microsoft PlayFab docs website, but until then, here's the Google Drive link to it.

https://drive.google.com/file/d/1uumfZEa6nQyKBXJbezwUo5duxKjMYJ9p/view?usp=drivesdk

Hope it helps!

*Note* we didn't need to break away from UE4's built-in networking subsystem to use the GSDK to get our game up and running on the new PlayFab Thunderhead (2.0) dedicated servers.

1 Like 1 ·
Leigh Warren avatar image Leigh Warren element808 commented ·

Perfect. Thanks again.

2 Likes 2 ·
Leigh Warren avatar image Leigh Warren element808 commented ·

Awesome. Having a look now. Thanks for sharing will let you know how it goes.

1 Like 1 ·
element808 avatar image element808 element808 commented ·

You're welcome! Hope you get everything working.

1 Like 1 ·
Show more comments
Leigh Warren avatar image
Leigh Warren answered

First, thanks again for the documentation, it got us all the way through to deployment with Playfab Servers very quickly. Two things to report:

1) There was a minor edit we had to do the the GDSK which was concerning - it needed #include <stdexcept> in gsdk.h to compile std::runtime_error class

2) We have got the post-deployment error a few others have seen :

LogTemp: Error: GSDK Initialization failed: Heartbeat endpoint and Server id are required configuration values.

I read a similar post on the error so stepping through this - https://api.playfab.com/docs/tutorials/landing-tournaments/multiplayer-servers-2.0/debugging-playfab-multiplayer-platform-integration-locally

Will let you know how that goes.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brandon@uprootstudios.com avatar image brandon@uprootstudios.com commented ·

Are you getting that error after actually deploying to PF or just through the Mock VM container?

0 Likes 0 ·
Leigh Warren avatar image
Leigh Warren answered

We moved slightly forward. We put the heartbeat error down to not having the MockVM at the time so we setup the containers / MockVM test rig as per the above guide.

With that local test we get the entire flow of Standby, Active, and Terminate without errors. The GSDK log shows a similar result :

SDKMethodEntry: GSDKInternalVM Agent Endpoint: 172.19.0.11:56001Instance Id: b383d1cfa5cd71fdc9599fd1756b55c3eb896da86fed5c9b1a76f0015ef1464e
 - GSDKMethodEntry: GSDKInternalResult: 0
Server is ready for players.

However, now that we have deployed to Playfab Servers they still remain in an Unhealthy state never reaching Standby. Any ideas how to trouble shoot that scenario given successful local tests?

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

element808 avatar image element808 commented ·

Make sure you disable the WindowsMoviePlayer plugin. Was the only plugin that messed us up after we deployed. You can also get the logs by logging into the server or you can even manually run your dedicated server .exe once you're remoted in (make sure to create a shortcut of your .exe and append the -log to your shortcut properties to see what errors you're getting).

0 Likes 0 ·
Leigh Warren avatar image Leigh Warren element808 commented ·

OK. Will do that. We did disable WMP as we saw that post, but we do have plenty of other potential custom code and third party plugins that could be culprits...My guess is that the VM container supplied might not be matching their live windows core config and file system access policies.

0 Likes 0 ·
darkworth000 avatar image darkworth000 commented ·

Did you manage to get this working? I am having the exact same results as you have described here. Everything works in the local MockVM, I see all of the states getting called, upload to playfab and results in unhealthy status. I have disabled the windows media player plugin. Tried logging into the VM and like you could not find any way/where to view server logs, or start the server manually etc.

0 Likes 0 ·
Leigh Warren avatar image
Leigh Warren answered

The VM is in a propping but healthy state but not C:\Assets found where we chose to pick the default mounting point. Is that a problem?


directory.png (38.5 KiB)
5 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.

element808 avatar image element808 commented ·

Look in D:/. I think only in the individual containers will there be a C:/ deployment.

0 Likes 0 ·
Leigh Warren avatar image Leigh Warren commented ·

Zero directory / file search results for our server exec across both drives. I've opened a support call as it looks like its not getting copied over within their DC environment.

0 Likes 0 ·
Leigh Warren avatar image Leigh Warren Leigh Warren commented ·

That advice on how to blacklist a plugin for server targets in the .uplugin config would be really useful right now. Just can't seem to figure out on the UE forums how to do that.

0 Likes 0 ·
element808 avatar image element808 Leigh Warren commented ·

Look at Rama's victory plugin. He does a whitelist within it. A blacklist would be the same method.

https://wiki.unrealengine.com/How_To_Package_Plugins_For_UE4_Marketplace#.Uplugin_White_List

0 Likes 0 ·
Leigh Warren avatar image Leigh Warren Leigh Warren commented ·

Yes, got advice from Epic to clarify - here's what the keywords are to exclude from server targets (not platforms). You place the following into the offending .uplugin(s) :

"BlacklistTargets" :

[

"Server"

]
0 Likes 0 ·
darkworth000 avatar image
darkworth000 answered

Were you able to get this figured out? I am having the exact same issues, even down to not being able to find / interact with logs or the server exe when remoted in.

I've somehow used up all the testing hours and even been billed for several more and so far have not even managed to get the server uploaded with anything other than an "unhealthy" state, yet it all works just fine in the local MockVM where it successfully goes through all of the states.

And I did disable the windows media player plugin as well.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.