Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Michael Schoell · Jun 24, 2021 at 09:18 AM · apissdkswindows

Errors Deploying builds using PowerShell

Hello! My team has been setting up for our build machines to automatically upload builds to the PlayFab server using the Powershell API (https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/deploy-using-powershell-api). We have successfully uploaded a build, via Powershell, but have run into an error that we're unsure how to solve.

We often get the following error:

New-PfAsset : Exception calling "GetResult" with "0" argument(s): "Error while copying content to a stream."

+ New-PfAsset -FilePath $filePath -AssetName $fileName

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	+ CategoryInfo          : NotSpecified: (:) [New-PfAsset], MethodInvocationException

	+ FullyQualifiedErrorId : HttpRequestException,New-PfAsset

First we discovered consistently getting the error when uploading full sized builds (~1GB in size) versus test uploads (~200mb and smaller for iteration speed). We discovered that the Windows firewall is at least partially at fault for this error, disabling it made the error go away and uploads to be successful. Later in the evening, with the firewall still disabled, this was tested again and it failed with the same error which has had one of our engineers float the idea whether there is a daily upload quota because we tried again the next morning and uploaded two builds successfully. I'm more dubious of a quota being in place and have found no documentation suggesting there is one.

Judging by Task Manager's reporting of upload data and how long it takes before this error message appears I would judge that it uploads most of the file before the error is produced. In the game manager on the PlayFab site I can confirm the build was attempted to be uploaded, it lists the file as an asset, but the file is corrupt and unusable: PlayFab won't allow it to be assigned to a build.

Disabling the firewall is not a longterm solution but shows that there is probably something we need to be letting through it but cannot find details specifying what to let through. And since disabling the Windows firewall does not appear to fully solve our issues there's something deeper potentially at play. Any thoughts on why we are getting this error and how we might be able to solve it? Right now uploading via PowerShell is looking far too unreliable.

Comment

People who like this

0 Show 3
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ivan Cai ♦ · Jun 25, 2021 at 09:01 AM 0
Share

I think this is not a firewall issue, but the size of the file you uploaded is too large. I will reproduce it and check for the source code. I will notify you as soon as the results are available.

avatar image Michael Schoell Ivan Cai ♦ · Jun 28, 2021 at 05:18 PM 0
Share

The size of the file being too large would seem like a major limitation here? ~1GB is a very small size and I expect the server to increase a lot further from here as its still early in development for this project. Uploading the files through the web portal sees no issue with the same file and Azure, which the documentation says the PowerShell uses under the hood, has no such file size (unrelated to PlayFab, I've uploaded a ~60GB file through AzCopy before).

I'd be interested in what your tests and inspection of the source turn up and what the expected workaround is here.

avatar image SethDu ♦ Michael Schoell · Jul 06, 2021 at 08:36 AM 0
Share

May I ask have you tried the new PowerShell tools on GitHub - PlayFab/MpsPowershell? If you have issues running the script, please try the latest PowerShell Core 6.0.

When using Game Manager to upload server build, it is preferred to open the developer panel and monitor the Network tab to confirm the upload progress. You may notice that the assert file is divided into several small-sized parts for uploading. (Some blob service version has 100MB block size limit via "put block" request). In the common scenario if the module doesn't support, you may need to write your own script and load the file into bytes then upload.

In terms of the upload quota, you may get confirmation from Azure team as the server build is uploaded to Azure blob storage.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Avoid hearing my own voice on PlayFab Party Voice Unity SDK with Photon - PUN 2 2 Answers

    Get PlayerID (title) from AdminAPI.GetPlayerProfile 1 Answer

    Getting a list of servers on 2.0 2 Answers

    Sending and reading "parameters" when calling RequestServer 1 Answer

    No CloudScript functions can be found,No CloudScript functions found 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges