question

roger.olier@gmail.com avatar image
roger.olier@gmail.com asked

Custom server error to upload

Hi!

I'm trying to upload a custom server (from https://github.com/PlayFab/PlayFabGameServer ), but it always show this error "The field Max instances per host must be between 1 and 1000."

I'm unable to find where or how I set that data, the only info I found is using a url to upload the build, but there is no info about how to set it using the developer web.

 

Thanks

10 |1200

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

brendan avatar image
brendan answered

What is the exact step you're on when you get this error? The normal process is to upload the zip containing the server build to S3 via the link you get back from GetServerBuildUploadUrl, then call AddServerBuild to make it available in your game, or else upload it in the Game Manager and set the values there. When using the API call, the value in question is MaxGamesPerHost, and it does need to be in that range.

10 |1200

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

roger.olier@gmail.com avatar image
roger.olier@gmail.com answered

The error happens in the middle of uploading the file, between 30-40%

Strangely, this only happens on my computer, on other computers works without problem

10 |1200

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

brendan avatar image
brendan answered

If it works fine from other machines, it sounds like there's something running on the problematic machine which is causing an issue. Can you check for any differences between that machine and the others? Any virus software or firewalls that it uses, perhaps?

10 |1200

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

marcos avatar image
marcos answered

We are struggling to upload your out of the box custom game server using the game manager. We were ultimately able to get it to upload successfully on a coworkers machine but the machines are nearly identical. This was after at least 5 tries on each machine.

We tried different names for the build id and the zip file containing gameserver.exe. We deactivated ad block and tried with firefox and it finally went through. We got a non descript error about "notifying playfab engineers" before it would even show progress on the upload. When it did start to upload it failed a couple times with the same error as the original thread starter, complaining about a value that we have no way of setting until after the build has already succeeded. I don't feel like the succesful upload had anything to do with us trying so many different combinations, I think uploading builds is currently unstable.

 

Update: We were able to get it to upload on the original machine. With Chrome. With Ad block enabled. There seems to be no rhyme or reason to why it is failing. Are numbers not allowed in the name of the server zip? If so that should be documented, because that was the only seemingly consistent failure we saw, it won't even attempt to upload if there are numbers in the zip file name. Regardless once it uploads it seems there is a random chance to get the "Max Instance" error message.

10 |1200

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

brendan avatar image
brendan answered

No, numbers are fine in the name of the build - most of my test builds have numbers in the name. I will say that Chrome is the only browser fully tested, so it's possible your issues stemmed from something having to do with the other browsers you were testing. Can you give me a link (feel free to send it to devrel@playfab.com) to the build you're using, exactly as you've been testing it, along with the specific steps you use in the cases where it failed? I've yet to see either of the issues you describe in my own testing, so I'd like to try reproducing your results.

10 |1200

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

contact@gentlymad.org avatar image
contact@gentlymad.org answered

We have the exact same problem.
( "The field Max instances per host must be between 1 and 1000." )

Happens in Chrome, Firefox and IE on 3 different machines in 3 different networks. We tried different builds.
Uploading builds via developer.playfab.com is broken for us.
We had uploading problems with the old backend in the past, but could still upload fine with IE (Chrome/Firefox were not working).
Since the new backend is live, uploading server builds no longer works.

Before pressing "Save Build": http://s32.postimg.org/a3cx8f3r9/build_Upload_Error_Pre_Save.jpg
After pressing "Save Build": http://s32.postimg.org/7smo9lsxx/build_Upload_Error.jpg

10 |1200

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

contact@gentlymad.org avatar image
contact@gentlymad.org answered

Forgot to mention: Builds that we could upload fine in the old backend can also no longer be uploaded in the new backend. Uploading always fails and gives that error about Max Instances.

[Update]
Trying to upload via GetServerBuildUploadUrl and curl always results in "InvalidToken".
This is how we try to upload it using curl:
curl -v --upload-file filename urlReturnedByGetServerBuildUploadUrl

Directly opening the url returned by GetServerBuildUploadUrl in a browser results in "SignatureDoesNotMatch" - "The request signature we calculated does not match the signature you provided. Check your key and signing method."

Any hints whats going on here?

[Update 2]
Spammed s3 with curl requests. One time it did "something" when we removed the super long &x-amz-security-token= part of the url. We could not reproduce it though. Trying to set the build via AddServerBuild after it did "something" did not work.
Still looking for a fix for the backend as curl is a pita to use and doesn't work anyways ;)

10 |1200

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

contact@gentlymad.org avatar image
contact@gentlymad.org answered

Last update as i have no more ideas:
Used Chrome's dev tools to add a new field to the backend's "New build" view which adds a binding to MaxGamesPerHost.
It will start uploading (like before), stop at 3-6% (like before) and will then return "BuildPackageDoesNotExist".error.
I have no insights of what is going on behind the scenes, so here is a guess:
It will start uploading the Server.zip. After the upload is finished OR has failed, it will try to call AddServerBuild, which will fail as there is no MaxGamesPerHost defined. Also, if the upload failed, it won't find the BuildID.

Do you have any offline tools we can use to upload custom server builds? Is there anything in your github repo we can use? Are there any examples on how to use the resulting url from GetServerBuildUploadUrl with curl?

All help will be greatly appreciated :)

10 |1200

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

brendan avatar image
brendan answered

Can you send me a link to the build in question along with the exact steps you take? So far, I've yet to find a reproducible case of this, so I'd be interested in testing yours - there clearly has to be a difference in what you're doing versus what I'm doing, and I suspect it's down to a subtlety that isn't apparent to me, due to being too accustomed to using the service.

For the cURL uploads, they should follow the same pattern, in terms of usage, as the content uploads, as shown in this blog post: https://playfab.com/how-use-playfabs-content-management-api/. Normally, when there are issues (and particularly token/signature problems), it's down to the Content-Type not matching the "ContentType" parameter specified in the call to get the URL. I recommend using either application/g-zip for server builds (as they should be zip files), but if that doesn't work, you may want to try application/octet-stream. I have noticed that some people have better luck with that.

10 |1200

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

Marty Burgess avatar image
Marty Burgess answered

@Brendan Vanous - was this issue resolved? i'm getting the exact same error when trying to upload a new build, tested on both chrome and edge. tried making a new title on my account, but same error there as well.

buildid.png

,

@Brendan Vanous - was this problem resolved? i'm having the exact same issue trying to upload a server build currently. i've tried creating a new title to see if it was possibly an issue there, but getting the same error when uploading a build. testing in both chrome and edge.


buildid.png (13.7 KiB)
buildid.png (13.7 KiB)
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.

brendan avatar image brendan commented ·

Can you share your build with us in an ftp or drop box?

0 Likes 0 ·
Marty Burgess avatar image Marty Burgess brendan commented ·

Hi @Brendan Vanous- i'll email you now :)

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.