Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowTargetFutureDeviceFamilies needs to be initialized #8

Open
yaakovschectman opened this issue Feb 23, 2023 · 12 comments
Open

allowTargetFutureDeviceFamilies needs to be initialized #8

yaakovschectman opened this issue Feb 23, 2023 · 12 comments

Comments

@yaakovschectman
Copy link

I've an app on the partner center with one completed submission that I am attempting to test updating using this action, which results in the following error response when attempting to upload the new submission:

  body: {
    code: 'InvalidParameterValue',
    data: [],
    details: [],
    message: 'AllowTargetFutureDeviceFamilies needs to be initialized for all supported platform, [Desktop, Mobile, Xbox, Holographic]',
    source: 'Ingestion Api',
    target: 'allowTargetFutureDeviceFamilies'
  }

Is there an argument for allowTargetFutureDeviceFamilies, or a setting that needs to be set on the partner center?

@azchohfi
Copy link

This argument exists:
https://learn.microsoft.com/en-us/windows/uwp/monetize/update-an-app-submission#request-body
We even initialize it in the Microsoft Store Dev CLI:
https://github.com/microsoft/msstore-cli/blob/2a6b8bfe91a25c04ded4c471a652b1a26dd05177/MSStore.CLI/Helpers/IStorePackagedAPIExtensions.cs#L635
The same would have to be done by this package.
It seems like this package is calling the POST method for the new submission, and then using the returned JSON object in an update call (PUT), only updating the ".applicationPackages" property. It should also consider updating the allowTargetFutureDeviceFamilies.

@yaakovschectman
Copy link
Author

@azchohfi Alright so I'm trying to fork this to test it out. Would you know how the index.js file is built from the source typescript files? I do not see signs of any particular packaging modules in the repository.

@azchohfi
Copy link

Yeah, not sure how it is done.
I'll try to update this project to use the default template: https://github.com/actions/typescript-action/

@azchohfi
Copy link

Maybe @isaacrlevin can help here.
@yaakovschectman I've created a fork and branch, so you can simply do an npm i followed by an npm run all.
The only thing I've tested was if it built, so I have no idea if this is going to fail for some reason (I've changed some dependencies).
Give it a try:
https://github.com/azchohfi/windows-store-action/tree/fixedBuild

@yaakovschectman
Copy link
Author

Thanks for your help. That builds it, though it looks like the action is unable to run:

(node:3052) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'setFailed' of undefined
    at D:\a\_actions\yaakovschectman\windows-store-action\main\webpack:\windows-store-action\dist\index.js:209:1
    at Generator.throw (<anonymous>)
    at rejected (D:\a\_actions\yaakovschectman\windows-store-action\main\webpack:\windows-store-action\dist\index.js:6:1)
(node:3052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

It does not appear that index.js:209 contains a promise block. or call to setFailed, so I am so far unsure what this indicates.

@isaacrlevin
Copy link
Owner

Hey folks, thanks for collaborating on this. Question for @yaakovschectman, how are you testing? Locally? I agree that rewriting this in ts is ideal. I don't have the bandwidth at the moment to do this. I would ensure that everything runs locally if you can.

@azchohfi
Copy link

I would recommend just using the Microsoft Store Developer CLI. Is there a scenario that you need that it doesn't support?
https://github.com/microsoft/msstore-cli

@yaakovschectman
Copy link
Author

Is it possible to install/run the MS store CLI from within a Github action? The end goal is to work toward continuous integration/deployment, which was the impetus behind looking for an appropriate Github action.

@azchohfi
Copy link

azchohfi commented Mar 17, 2023

On Windows devices it should be straightforward with winget, but at other platforms you can use the download-workflow-artifact.
Docs here:
https://learn.microsoft.com/windows/apps/publish/msstore-dev-cli/install

These particular steps are actually missing in our docs...
I'll work on adding these instructions to our CI/CD section:
https://learn.microsoft.com/windows/apps/publish/msstore-dev-cli/ci-cd-environments

@yaakovschectman
Copy link
Author

It does not appear that a windows environment running a github workflow has winget installed. Or if it is, the manner in which to invoke it is not obvious.

@azchohfi
Copy link

Yup, I've opened an issue to track this:
microsoft/msstore-cli#9

@azchohfi
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants