question

Nisan Bahar avatar image
Nisan Bahar asked

Multiplayer 2.0 Issues

Hi.

I have gone through all of the tutorials more than once, read almost any thread here trying to figure out my issues.

With that being said, I am really struggling with the first set-up and having my system work with Multiplayer 2.0

Issue #1 - MockVmAgent

When running MockVmAgent, I have the following output:

PS C:\MockAgent> ./MockVmAgent.exe
Warning: SessionCookie is not specified.
TitleId: D6029
BuildId: 35f7f22d-9af3-4999-9e5b-d83c7e6a8d55
VmId: xcloudwusu4uyz5daouzl:WestUs:58fcc889-3160-463c-ae0c-e8db38ccb6c3:tvmps_8d6c784bd17b47a59fc25e879919560e7d22092977bb42b68e7018bcb6511afc_d
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using 'C:\Users\Nisan\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
Mock Agent is listening on port 56001
Player1, Player2
info: MockPlayFabVmAgent[0]
      Starting process for session host with instance number 0 and process info: FileName - c:\output\PlayFabVmAgentOutput\2019-10-20T00-10-07\ExtAssets\SH0\A0\\GSDK_Custom_Server.exe, Args - .
info: MockPlayFabVmAgent[0]
      Creating the configuration file at c:\output\PlayFabVmAgentOutput\2019-10-20T00-10-07\Config\SH0\gsdkConfig.json
info: MockPlayFabVmAgent[0]
      Started process for session host. Instance Number: 0, UniqueId: 2f3f7f47-5600-41b9-9f65-1c6936b9c020, ProcessId: 82244
info: MockPlayFabVmAgent[0]
      Waiting for heartbeats from the game server.....
PS C:\MockAgent>

After "Waiting for heartbeats from the game server...." it instantly quits (I think?) the application, thus not having the VmAgent active anymore..

Issue #2 - GameServer SDK Running

Well, basically, I figured out how to add the GSDK to Unity (using Assets/Plugins DLL).

Right after that, I tried to run the server (through Unity) and I am receiving the following error:

GSDKInitializationException: GSDK file -  not found
Microsoft.Playfab.Gaming.GSDK.CSharp.InternalSdk.GetConfiguration () (at <57088a1809274f85bfac6388ff18bf34>:0)
Microsoft.Playfab.Gaming.GSDK.CSharp.InternalSdk.Start (System.Boolean debugLogs) (at <57088a1809274f85bfac6388ff18bf34>:0)
Microsoft.Playfab.Gaming.GSDK.CSharp.GameserverSDK.LogMessage (System.String message) (at <57088a1809274f85bfac6388ff18bf34>:0)
Microsoft.Playfab.Gaming.GSDK.CSharp.server_init.Start () (at Assets/Scripts/GSDK/server_init.cs:39)

By my understanding the GSDK file should be set as an env var when the VmAgent is running the Game Server itself? And if so, how would I achieve that? Is it not possible to run the server through Unity?

Do I need to start it using PowerShell, like one of the quick start tutorials ?

Game Server Source Code:

server-init.txt

game manager
server-init.txt (2.3 KiB)
4 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.

Nisan Bahar avatar image Nisan Bahar commented ·

PLEASE READ!

I can't seem to edit the post for some reason so I am adding information here:

Issue #2 was solved! It seems like I ran it through the PowerShell, which did not present and output any errors, instead, just quit the application.

When running the Agents' standalone MockVmAgent.exe I received an error information about my issue and was able to fix that (It seems like it needed UnityPlayer.dll to run).

Now I have another issue, let's call it #3.

Issue #3 - Game Server Error - Cannot read configuration file gsdkConfig.json

It seems like the game server receives the gsdkConfig.json file path from the VmAgent, but cannot read it for some odd reason.

Attached is the error log file.

TL;DR:

Got Exception: Microsoft.Playfab.Gaming.GSDK.CSharp.GSDKInitializationException: Cannot read configuration file c:\output\PlayFabVmAgentOutput\2019-10-20T00-31-03\Config\SH0\gsdkConfig.json ---> System.PlatformNotSupportedException: Operation is not supported on this platform.

0 Likes 0 ·
Nisan Bahar avatar image Nisan Bahar commented ·

Error log file: Click Me

0 Likes 0 ·
Nisan Bahar avatar image Nisan Bahar commented ·

By referring to Issue #2 was solved, I was actually meaning to say #1.

So current issues:

#2, #3

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Nisan Bahar commented ·

Hi @Nisan Bahar,

Looks like GSDK may have some incompatible issues with Unity, you might want to use the Unity-specific GSDK as Brandon suggested:

https://github.com/PlayFab/gsdk/tree/master/UnityGsdk

0 Likes 0 ·

1 Answer

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

You might want to consider trying it with the updated Unity-specific GSDK:

https://github.com/PlayFab/gsdk/tree/master/UnityGsdk

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.

01markbryant01 avatar image 01markbryant01 commented ·

This seams to be the only thread about the Unity-specific GSDK on all the internet, that is so sad :(. Anyway, I'm also trying to run my headless server made with unity3d using this Unity-specific GSDK but when I run it, it complains about the missing GSDK_CONFIG_FILE environment variable. What I m missing here guys?? because the configuration file is generated dynamically this GSDK_CONFIG_FILE shouldn't also be setup?

0 Likes 0 ·

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.