Introduction
I've created a Windows Universal project that I want to be able to automatically release to the Microsoft store using VSTS tasks.
Since the application is only meant for internal company usage, I've set its price to free and have already released it manually. Next to that we've assigned it to a few internal company Microsoft accounts to ensure they are the only ones that can download it.
Steps I took
First of all I started with installing the VSTS extension to my VSTS account: https://marketplace.visualstudio.com/items?itemName=MS-RDX-MRO.windows-store-publish
After that I loosely followed the steps described on that URL. (The reason why I followed them loosely is because some of the steps don't seem to be up-to-date). For example, creating a new application from the Developer portal requires multiple redirect URL's. Since we don't need a redirect URL (this app will just be for remote connection by VSTS), I just started entering random URL's. Possibly due to my lack of knowledge I didn't manage to find anything that it would accept. Because this didn't work I created a new application in VSTS where I just entered www.google.nl as a redirect URL which did in fact work (after finding out that apprently you need to create a 'WebApp' in there instead of a 'Native' app because you can only create Key's for a WebApp. But I suppose that's a different topic :).
Anyway, after some fiddling around I managed to setup a new 'Windows Dev Center Connection'.
How VSTS looks
The problem
Whenever I now do a deployment of my release using the VSTS tasks I encounter the following log / error:
Steps I tried to re-mediate problem
As described in the VSTS task martketplace post you can also add some Metadata regarding the price of the product. I did play around with this and added the following metadata file: MetaDataFolder\MetaData\en-us\baseListing\metadata.json
{
"pricing": {
"priceId": "Free"
}
}
This did however not change anything, the error message when doing the release was still the same.
Doing a submission manually (with the package generated from the Automated Build) did work without problems.
Question
So basically my question is, if anyone has a solution to this problem?
Edit 1
As requested by 'Eddie Chen - MSFT' here's a screenshot of the Price Settings in the dev center:
In regards to your question on what number I entered for 'Mandatory Update', I entered: 0
When doing a release with debug: true I see the following output:
2018-01-31T13:07:30.9934874Z ##[section]Starting: Publish $(System.DefaultWorkingDirectory)/AvaNuccyApp/drop/*.appxupload
2018-01-31T13:07:30.9940374Z ==============================================================================
2018-01-31T13:07:30.9940708Z Task : Windows Store - Publish
2018-01-31T13:07:30.9941014Z Description : Publish your app to the Windows Store
2018-01-31T13:07:30.9941547Z Version : 0.10.16
2018-01-31T13:07:30.9941873Z Author : Microsoft Corporation
2018-01-31T13:07:30.9942144Z Help :
2018-01-31T13:07:30.9942471Z ==============================================================================
2018-01-31T13:07:31.3440628Z ##[debug]agent.workFolder=C:\agent\_work
2018-01-31T13:07:31.3501058Z ##[debug]loading inputs and endpoints
2018-01-31T13:07:31.3513203Z ##[debug]loading ENDPOINT_AUTH_************
2018-01-31T13:07:31.3522586Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_************_SERVICEPRINCIPALID
2018-01-31T13:07:31.3534454Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_************_SERVICEPRINCIPALKEY
2018-01-31T13:07:31.3535170Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_************_TENANTID
2018-01-31T13:07:31.3535710Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_************_URL
2018-01-31T13:07:31.3537240Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2018-01-31T13:07:31.3538902Z ##[debug]loading ENDPOINT_AUTH_SCHEME_************
2018-01-31T13:07:31.3540462Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2018-01-31T13:07:31.3541894Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2018-01-31T13:07:31.3544035Z ##[debug]loading INPUT_APPID
2018-01-31T13:07:31.3545829Z ##[debug]loading INPUT_DELETEPACKAGES
2018-01-31T13:07:31.3553866Z ##[debug]loading INPUT_FORCE
2018-01-31T13:07:31.3554403Z ##[debug]loading INPUT_ISMANDATORYUPDATE
2018-01-31T13:07:31.3559886Z ##[debug]loading INPUT_MANDATORYUPDATEDIFFERHOURS
2018-01-31T13:07:31.3560434Z ##[debug]loading INPUT_METADATAPATH
2018-01-31T13:07:31.3561625Z ##[debug]loading INPUT_METADATAUPDATEMETHOD
2018-01-31T13:07:31.3563494Z ##[debug]loading INPUT_NAMETYPE
2018-01-31T13:07:31.3565135Z ##[debug]loading INPUT_NUMBEROFPACKAGESTOKEEP
2018-01-31T13:07:31.3571193Z ##[debug]loading INPUT_PACKAGEPATH
2018-01-31T13:07:31.3571940Z ##[debug]loading INPUT_SERVICEENDPOINT
2018-01-31T13:07:31.3577592Z ##[debug]loading INPUT_SKIPPOLLING
2018-01-31T13:07:31.3578043Z ##[debug]loading INPUT_UPDATEIMAGES
2018-01-31T13:07:31.3582591Z ##[debug]loaded 22
2018-01-31T13:07:32.0285828Z ##[debug]serviceEndpoint=************
2018-01-31T13:07:32.0286391Z ************ exists true
2018-01-31T13:07:32.0286806Z ##[debug]************ exists true
2018-01-31T13:07:32.0287178Z ##[debug]force=true
2018-01-31T13:07:32.0287519Z ##[debug]metadataUpdateMethod=JsonMetadata
2018-01-31T13:07:32.0287877Z ##[debug]updateImages=false
2018-01-31T13:07:32.0288242Z ##[debug]Agent.WorkFolder=C:\agent\_work
2018-01-31T13:07:32.0288598Z ##[debug]skipPolling=false
2018-01-31T13:07:32.0288946Z ##[debug]deletePackages=false
2018-01-31T13:07:32.0289296Z ##[debug]isMandatoryUpdate=true
2018-01-31T13:07:32.0289637Z ##[debug]mandatoryUpdateDifferHours=0
2018-01-31T13:07:32.0290031Z ##[debug]packagePath=C:\agent\_work\r7\a\AvaNuccyApp\drop\*.appxupload
2018-01-31T13:07:32.0290454Z ##[debug]Agent.ReleaseDirectory=C:\agent\_work\r7\a
2018-01-31T13:07:32.0291761Z ##[debug]packagePath=C:\agent\_work\r7\a\AvaNuccyApp\drop\*.appxupload
2018-01-31T13:07:32.0292240Z ##[debug]additionalPackages=null
2018-01-31T13:07:32.0292799Z ##[debug]nameType=AppId
2018-01-31T13:07:32.0293150Z ##[debug]appId=***************
2018-01-31T13:07:32.0293517Z ##[debug]metadataPath=C:\agent\_work\r7\a\AvaNuccyApp\drop\MetaData
2018-01-31T13:07:32.0293935Z ##[debug]check path : C:\agent\_work\r7\a\AvaNuccyApp\drop\MetaData
2018-01-31T13:07:32.0294315Z ##[debug]App ID: ***************
2018-01-31T13:07:32.0294813Z ##[debug]Endpoint: ********
2018-01-31T13:07:32.0295167Z ##[debug]Force delete: true
2018-01-31T13:07:32.0295518Z ##[debug]Metadata update type: 1
2018-01-31T13:07:32.0295869Z ##[debug]Update images: false
2018-01-31T13:07:32.0296253Z ##[debug]Metadata root: C:\agent\_work\r7\a\AvaNuccyApp\drop\MetaData
2018-01-31T13:07:32.0296720Z ##[debug]Packages: C:/agent/_work/r7/a/AvaNuccyApp/drop/SurfaceHubApp_1.1.3.0_x86_x64_ARM_bundle.appxupload
2018-01-31T13:07:32.0297120Z ##[debug]skipPolling: false
2018-01-31T13:07:32.0297473Z ##[debug]deletePackages: false
2018-01-31T13:07:32.0297827Z ##[debug]numberOfPackagesToKeep: null
2018-01-31T13:07:32.0298186Z ##[debug]isMandatoryUpdate: false
2018-01-31T13:07:32.0298550Z ##[debug]mandatoryUpdateDifferHours: 0
2018-01-31T13:07:32.0298777Z Authenticating...
2018-01-31T13:07:32.0299014Z Authenticating with server...
2018-01-31T13:07:32.2053404Z Obtaining app information...
2018-01-31T13:07:32.2056609Z ##[debug]Getting app resource from ID ***************
2018-01-31T13:07:36.5211421Z Creating submission...
2018-01-31T13:07:36.5212061Z ##[debug]Creating new submission
2018-01-31T13:07:50.8720492Z ##[debug]Warnings occurred in request
2018-01-31T13:07:50.8727174Z ##[debug] [SalesUnsupportedWarning] The sales resource is no longer supported. To view or edit the sales data for this submission, use the Dev Center dashboard.
2018-01-31T13:07:50.8728740Z ##[debug]CorrelationId: *******-****-****-****-**********
2018-01-31T13:07:50.8732495Z Submission https://developer.microsoft.com/en-us/dashboard/apps/***************/submissions/************ was created successfully
2018-01-31T13:07:50.8733397Z Updating package delivery options...
2018-01-31T13:07:50.8733801Z ##[debug]Setting isMandatoryUpdate to false
2018-01-31T13:07:50.8734058Z Updating submission...
2018-01-31T13:07:50.8734436Z ##[debug]Adding metadata for new submission ************
2018-01-31T13:07:50.8734887Z ##[debug]Updating metadata of submission object from directory C:\agent\_work\r7\a\AvaNuccyApp\drop\MetaData
2018-01-31T13:07:50.8735313Z ##[debug]Obtaining metadata for language en-us
2018-01-31T13:07:50.8735766Z ##[debug]Obtaining base listing
2018-01-31T13:07:50.8736191Z ##[debug]Loading listing attributes from C:\agent\_work\r7\a\AvaNuccyApp\drop\MetaData\en-us\baseListing\metadata.json
2018-01-31T13:07:50.8736913Z ##[debug]Adding 1 package(s)
2018-01-31T13:07:50.8737252Z ##[debug]Updating submission
2018-01-31T13:07:53.5078726Z ##[debug]task result: Failed
2018-01-31T13:07:53.5143077Z ##[error]Status 400: {"code":"InvalidParameterValue","data":[],"details":[],"message":"'Base' is not a valid PriceId for base price.","source":"Ingestion Api","target":"pricing"} CorrelationId: *******-****-****-****-**********
2018-01-31T13:07:53.5143698Z ##[debug]Processed: ##vso[task.issue type=error;]Status 400: {"code":"InvalidParameterValue","data":[],"details":[],"message":"'Base' is not a valid PriceId for base price.","source":"Ingestion Api","target":"pricing"} CorrelationId: *******-****-****-****-**********
2018-01-31T13:07:53.5144965Z ##[debug]Processed: ##vso[task.complete result=Failed;]Status 400: {"code":"InvalidParameterValue","data":[],"details":[],"message":"'Base' is not a valid PriceId for base price.","source":"Ingestion Api","target":"pricing"} CorrelationId: *******-****-****-****-**********
2018-01-31T13:07:53.5203235Z ##[section]Finishing: Publish $(System.DefaultWorkingDirectory)/AvaNuccyApp/drop/*.appxupload
2018-01-31T13:07:53.5359048Z ##[section]Finishing: Release
Edit 2
After doing a lot more research into this issue I've now managed to reproduce it on my local computer (which means progress I suppose ;)).
Anyway, the steps I used might be usefull for anyone encountering a similar issue.
When changing the JSON file that was generated to PriceId: Free then the submission works, however, whenever I do a new submission using VSTS I receive the same failing message again.
There was a bug in the Store API when creating the submission (cloning from previous) for apps that were not purchasable. Pirce iD was not set, and thus mapped to Base (-1).
This has been fixed now.