Open ender-null opened 1 year ago
It seems like you have not executed the init
command for your project. Just run, locally and only once: msstore init
. This will list your apps and let you select which app from the store this app is related to. Select the right one, and commit the file changes in your pubspec.yaml
and whatever else is changed. This will let the CLI know which app you are trying to publish when the CI runs the publish
command.
Sorry for the delay in my response. I only receive this error:
💥 Could not retrieve your registered applications. Please try again.
Do you get any more details if you run it in verbose mode? Just add "-v" to the failing command.
Doesn't make any sense, everything looks good to me.
09:48:51 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down.
09:48:51 info: Microsoft.Hosting.Lifetime[0] Hosting environment: CLI
09:48:51 info: Microsoft.Hosting.Lifetime[0] Content root path: A:\Documents\Projects\lovelust
09:48:51 info: MSStore.CLI.Program[0] Command is init
09:48:51 info: MSStore.API.StoreAPI[0] Getting DevCenter authorization token
09:48:51 info: System.Net.Http.HttpClient.Default.LogicalHandler[100] => HTTP GET https://manage.devcenter.microsoft.com/v1.0/my/applications?skip=0&top=100 Start processing HTTP request GET https://manage.devcenter.microsoft.com/v1.0/my/applications?skip=0&top=100
09:48:51 info: System.Net.Http.HttpClient.Default.ClientHandler[100] => HTTP GET https://manage.devcenter.microsoft.com/v1.0/my/applications?skip=0&top=100 Sending HTTP request GET https://manage.devcenter.microsoft.com/v1.0/my/applications?skip=0&top=100
⣷ Retrieving all registered applications...
09:48:52 info: System.Net.Http.HttpClient.Default.ClientHandler[101] => HTTP GET https://manage.devcenter.microsoft.com/v1.0/my/applications?skip=0&top=100 Received HTTP response headers after 1092.1803ms - 400
⣯ Retrieving all registered applications...efault.LogicalHandler[101] => HTTP GET https://manage.devcenter.microsoft.com/v1.0/my/applications?skip=0&top=100 End processing HTTP request after 1097.6315ms - 400
09:48:52 fail: MSStore.CLI.Commands.InitCommand.Handler[0] Error while retrieving applications. MSStore.API.MSStoreException: Failed to get the applications - {"code":"Unauthorized","message":"A valid account could not be found with given authorization token. CorrelationId=f34b4528-d558-434e-86de-b6c721b25632"} ---> MSStore.API.MSStoreException: {"code":"Unauthorized","message":"A valid account could not be found with given authorization token. CorrelationId=f34b4528-d558-434e-86de-b6c721b25632"} at MSStore.API.SubmissionClient.InvokeAsync[T](HttpMethod httpMethod, String relativeUrl, Object requestContent, CancellationToken ct) in /_/MSStore.API/SubmissionClient.cs:line 255 at MSStore.API.Packaged.StorePackagedAPI.GetDevCenterApplicationsAsync(Int32 skip, Int32 top, Cancellation💥 Could not retrieve your registered applications. Please try again.at MSStore.API.Packaged.StorePackagedAPI.GetApplicationsAsync(CancellationToken ct) in /_/MSStore.API/Packaged/StorePackagedAPI.cs:line 120 --- End of inner exception stack trace --- at MSStore.API.Package
09:48:53 info: Microsoft.Hosting.Lifetime[0] Application is shutting down...
It seems like your credentials are invalid. I would try regenerating them and updating your secrets.
@ender-null you might have missed this step where you have to "Add Microsoft Entra application"
Account settings
-> User management
-> Microsoft Entra application
then Add Microsoft Entra application
From there, add the application you created (or the CLI) created from "App registrations" and give it Manager(Windows)
role
If you have the setup locally, try running msstore apps list
.
It should Retrieve Managed Applications
make sure to included the
--appId
flagmsstore publish --appId ${{ secrets.MY_APP_ID }} -v
Got this error, not sure what's the issue