microsoft / msstore-cli

Microsoft Store CLI
MIT License
82 stars 9 forks source link

Base is not a valid PriceId for base price #66

Closed sanjacob closed 1 week ago

sanjacob commented 2 months ago
msstore publish app.bbsync.BlackboardSync.msixupload --appId *** --noCommit -v

09:13:54 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C 
to shut down.
09:13:54 info: Microsoft.Hosting.Lifetime[0] Hosting environment: CLI
09:13:54 info: Microsoft.Hosting.Lifetime[0] Content root path: 
D:\a\BlackboardSync\BlackboardSync
09:13:54 info: MSStore.CLI.Services.EnvironmentInformationService[0] Running on 
CI. CI=true
09:13:54 info: MSStore.CLI.Program[0] Command is publish
09:13:54 info: MSStore.API.StoreAPI[0] Getting DevCenter authorization token
This seems to be a MSIX project.
09:13:55 info: System.Net.Http.HttpClient.Default.LogicalHandler[100] => HTTP 
GET https://manage.devcenter.microsoft.com/v1.0/my/applications/*** 
Start processing HTTP request GET 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***
09:13:55 info: System.Net.Http.HttpClient.Default.ClientHandler[100] => HTTP GET
https://manage.devcenter.microsoft.com/v1.0/my/applications/*** Sending
HTTP request GET 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***
Retrieving application...
09:14:05 info: System.Net.Http.HttpClient.Default.ClientHandler[101] => HTTP GET
https://manage.devcenter.microsoft.com/v1.0/my/applications/*** 
Received HTTP response headers after 9929.2989ms - 200
09:14:05 info: System.Net.Http.HttpClient.Default.LogicalHandler[101] => HTTP 
GET https://manage.devcenter.microsoft.com/v1.0/my/applications/*** End
processing HTTP request after 9939.2142ms - 200
✅ Ok! Found the app!
AppId: ***
09:14:05 info: MSStore.CLI.ProjectConfigurators.MSIXProjectPublisher[0] Trying 
to publish these 1 files: 
'D:\a\BlackboardSync\BlackboardSync\app.bbsync.BlackboardSync.msixupload'
09:14:05 info: System.Net.Http.HttpClient.Default.LogicalHandler[100] => HTTP 
POST 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions?isMinimalResponse=true Start processing HTTP request POST 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions?isMinimalResponse=true
09:14:05 info: System.Net.Http.HttpClient.Default.ClientHandler[100] => HTTP 
POST 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions?isMinimalResponse=true Sending HTTP request POST 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions?isMinimalResponse=true
Creating new Submission
09:14:14 info: System.Net.Http.HttpClient.Default.ClientHandler[101] => HTTP 
POST 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions?isMinimalResponse=true Received HTTP response headers after 8875.6576ms - 
201
09:14:14 info: System.Net.Http.HttpClient.Default.LogicalHandler[101] => HTTP 
POST 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions?isMinimalResponse=true End processing HTTP request after 8876.9413ms - 201
✅ Submission created.
09:14:14 info: MSStore.CLI.ProjectConfigurators.MSIXProjectPublisher[0] 
Submission created. Id=1152921505698217115
09:14:14 info: System.Net.Http.HttpClient.Default.LogicalHandler[100] => HTTP 
GET 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 Start processing HTTP request GET 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115
09:14:14 info: System.Net.Http.HttpClient.Default.ClientHandler[100] => HTTP GET
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 Sending HTTP request GET 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115
Retrieving existing Submission
09:14:40 info: System.Net.Http.HttpClient.Default.ClientHandler[101] => HTTP GET
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 Received HTTP response headers after 26058.1325ms - 200
09:14:40 info: System.Net.Http.HttpClient.Default.LogicalHandler[101] => HTTP 
GET 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 End processing HTTP request after 26059.5254ms - 200
✅ Submission retrieved
09:14:40 info: MSStore.CLI.ProjectConfigurators.MSIXProjectPublisher[0] 
Submission retrieved. Id = '1152921505698217115'
New Submission properly configured.
09:14:40 info: MSStore.CLI.ProjectConfigurators.MSIXProjectPublisher[0] New 
Submission properly configured. FileUploadUrl: 
https://ingestionpackagesprod1.blob.core.windows.net/ingestion/dc288724-ab7e-4ca
c-be14-8422cb7b6f9c?skoid=6a05eb41-c97a-4f14-a5ce-d392056c0e00&sktid=975f013f-7f
24-47e8-a7d3-abc4752bf346&skt=2024-09-02T09%3A10%3A52Z&ske=2024-09-09T09%3A10%3A
52Z&sks=b&skv=2024-05-04&sv=2024-05-04&se=2024-09-03T09%3A29%3A13Z&sr=b&sp=rwl&s
ig=AFQNhmaBziReuC3g2Lybn5Aa1wSmey9iXyd8Eu8GD04%3D
Prepating Bundle...
09:14:40 info: MSStore.CLI.ProjectConfigurators.MSIXProjectPublisher[0] Copying 
'D:\a\BlackboardSync\BlackboardSync\app.bbsync.BlackboardSync.msixupload' to zip
bundle folder.
✅ Zip Bundle is configured and ready to be uploaded!
09:14:45 info: System.Net.Http.HttpClient.Default.LogicalHandler[100] => HTTP 
PUT 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 Start processing HTTP request PUT 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115
09:14:45 info: System.Net.Http.HttpClient.Default.ClientHandler[100] => HTTP PUT
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 Sending HTTP request PUT 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115
09:14:47 info: System.Net.Http.HttpClient.Default.ClientHandler[101] => HTTP PUT
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 Received HTTP response headers after 2709.9749ms - 400
09:14:47 info: System.Net.Http.HttpClient.Default.LogicalHandler[101] => HTTP 
PUT 
https://manage.devcenter.microsoft.com/v1.0/my/applications/***/submiss
ions/1152921505698217115 End processing HTTP request after 2710.7907ms - 400
Unhandled exception: MSStore.API.MSStoreException: {"code":"InvalidParameterValue","data":[],"details":[],"message":"'Base' is not a valid PriceId for base price.","source":"Ingestion Api","target":"pricing"}
   at MSStore.API.SubmissionClient.InvokeAsync[T](HttpMethod httpMethod, String relativeUrl, Object requestContent, CancellationToken ct) in /_/MSStore.API/SubmissionClient.cs:line 290
   at MSStore.API.Packaged.StorePackagedAPI.UpdateSubmissionAsync(String productId, String submissionId, DevCenterSubmission updatedSubmission, CancellationToken ct) in /_/MSStore.API/Packaged/StorePackagedAPI.cs:line 295
   at MSStore.CLI.Helpers.IStorePackagedAPIExtensions.PublishAsync(IStorePackagedAPI storePackagedAPI, DevCenterApplication app, String flightId, FirstSubmissionDataCallback firstSubmissionDataCallback, AllowTargetFutureDeviceFamily[] allowTargetFutureDeviceFamilies, DirectoryInfo output, IEnumerable`1 input, Boolean noCommit, Nullable`1 packageRolloutPercentage, IBrowserLauncher browserLauncher, IConsoleReader consoleReader, IZipFileManager zipFileManager, IFileDownloader fileDownloader, IAzureBlobManager azureBlobManager, IEnvironmentInformationService environmentInformationService, ILogger logger, CancellationToken ct) in /_/MSStore.CLI/Helpers/IStorePackagedAPIExtensions.cs:line 522
   at MSStore.CLI.ProjectConfigurators.MSIXProjectPublisher.PublishAsync(String pathOrUrl, DevCenterApplication app, String flightId, DirectoryInfo inputDirectory, Boolean noCommit, Nullable`1 packageRolloutPercentage, IStorePackagedAPI storePackagedAPI, CancellationToken ct) in /_/MSStore.CLI/ProjectConfigurators/MSIXProjectPublisher.cs:line 145
   at MSStore.CLI.Commands.PublishCommand.Handler.InvokeAsync(InvocationContext context) in /_/MSStore.CLI/Commands/PublishCommand.cs:line 202
   at System.CommandLine.NamingConventionBinder.CommandHandler.GetExitCodeAsync(Object returnValue, InvocationContext context)
   at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at MSStore.CLI.Program.<>c.<<Main>b__0_2>d.MoveNext() in /_/MSStore.CLI/Program.cs:line 229
--- End of stack trace from previous location ---
   at System.CommandLine.Hosting.HostingExtensions.<>c__DisplayClass1_0.<<UseHost>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
sanjacob commented 2 months ago

Apparently, the issue is due to the API response having the priceId of 'Base' and the client merely sending that back:

⡿ Creating new Submission
>>> {"pricing":{"trialPeriod":"NoFreeTrial","marketSpecificPricings":{},"sales":[],"priceId":"Base","isAdvancedPricingModel":true}}

Prepating Bundle...
✅ Zip Bundle is configured and ready to be uploaded!
>>> {"code":"InvalidParameterValue","data":[],"details":[],"message":"'Base' is not a valid PriceId for base price.","source":"Ingestion Api","target":"pricing"}