Closed asusralis closed 5 years ago
I tried it in a command prompt and got this:
Asset details must contain mount path and local file path for each asset. Warning: SessionCookie is not specified. The specified settings are invalid. Please correct them and re-run the agent.
If I understand correctly if RunContainer is false then you wouldn't need these settings, right? I don't see them mentioned in the webpage I'm following until later on.
Edit:
Keeping RunContainer to false, I did what it said and added the following to the settings:
"MountPath": "C:\Users\XXX\Desktop\playfab_server" "LocalFilePath": "C:\Users\XXX\Desktop\playfab_server\Release.rar" "StartGameCommand": "C:\Users\XXX\Desktop\playfab_server\XXX.exe"
I get this: PS C:\Users\XXX\Desktop\playfabmock> Start-Process MockVmAgent.exe Start-Process : This command cannot be run due to the error: The specified executable is not a valid application for this OS platform.. I'm on Windows 10 1903
@asusralis , for windows we only support ".zip" files. So, you will have to compress your asset as a Release.zip file. In Windows, you can do this by selecting all the files you want to compress and right click -> Send to archive-> Release.zip. Make sure that you select the files directly (rather than a folder) since otherwise it creates an additional directory when unzipped and can cause errors.
Also, in the folder where you have unzipped the MockAgent executable, in PowerShell (as Administrator), you can just do .\MockVmAgent.exe (instead of Start-Process) and that should have the same behavior as running on cmd.
But I shouldn't have to do this, right? I have RunContainer to false. This is what I'm confused about :D
Runcontainer only dictates whether the server is run as process or as a container. The assets would have to be a zip file in either case. If RunContainer is false, the agent extracts the zip file and runs the executable directly as a process. If RunContainer is true,the agent extracts the zip file, mounts the extracted folder as a volume inside a container and runs the executable within the container. In either case, the agent has to first extract the contents of the asset file (which has to be a zip file). Does that help?
But that's not what it says in the webpage I linked. It says you can just set the output folder and it will start listening - you don't have to touch any other setting. Is it just really out of date or something?
It would be great if it worked without needing the zip because then I don't have to do that every time I want to test.
All the new documentation is at https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/locally-debugging-game-servers-and-integration-with-playfab
I think searches sometimes still lead to the old documentation website. For multiplayer stuff, you can use aka.ms/playfabmultiplayer as a shorturl and then click on "Servers"
Oh, I see. Are most the pages on the PlayFab website out of date? They mentioned 2.0 servers a lot so I assumed they were up to date.
Thanks, I'll put in the other parameters and try it out.
I would say most of the content on the old site is out of date. We are slowly setting up redirections on a content by content basis to the new website. The new website was created after Servers 2.0 was released, so the old website still has content for it, but it is outdated.
After setting up all the settings it seems that it is still telling me:
Program 'MockVmAgent.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1
At line:1 char:1
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
When running from cmd a windows prompt says: This app can't run on your PC. Then "Access is denied." is printed in the cmd. I'm running both in admin.
"OutputFolder": "C:\Users\XXX\Desktop\playfab_output" "MountPath": "C:\Users\XXX\Desktop\playfab_server" "LocalFilePath": "C:\Users\XXX\Desktop\Release.zip" "StartGameCommand": "C:\Users\XXX\Desktop\playfab_server\XXX.exe"
Is there a chance that you need to unblock the .exe file? Here are some (old but still relevant) instructions on how to do that.
Wow, that was actually the problem. The folder did not have that button, but the zip file did. I clicked it, extracted it, and it worked. Thanks!
Great, let us know if you have any more questions!
Hello! I'm not sure what I'm doing wrong. I'm following this guide.
I've extracted the files to a folder, set up the output folder, and checked RunContainer is false. I start a powershell window in the folder and Start-Process MockVmAgent.exe, but it just opens and closes. In the settings I'm basically just setting the output folder, so I don't know what I could be doing wrong.