microsoft / appcenter-cli

Command-line Interface (CLI) for Visual Studio App Center
https://appcenter.ms/
MIT License
581 stars 234 forks source link

3.0.0 breaks adding a release to a distribution on some Node.js versions #2476

Closed steven-supersolid closed 6 months ago

steven-supersolid commented 6 months ago

Description

A distribution command that worked in 2.14 has stopped working since upgrading to 3.0.0

Repro Steps

Execute the following command to publish a release and add to a distribution group

npx appcenter-cli distribute release --app company/app --file file.ipa --group DistributionGroup --token [PersonalToken]

Results in the error message

Error: Could not add group DistrbutionGroup to release 1234

The release is published, but it is not added to the distribution group

Expected behavior

The release should be added to the distribution group.

Details

  1. Is there a particular beacon/command that you are having trouble with?
    • appcenter-cli distribute release
  2. Which version of the App Center CLI are you using?
    • 3.0.0
  3. Which OS version did you experience the issue on?
    • macOS Ventura 13.6.4
  4. What command line/shell are you using?
    • bash
  5. What version of Node.js and NPM/Yarn are you using?
    • node v14.18.1, npm 6.14.15
  6. Additionally, you can provide verbose logs of a CLI command by using DEBUG="appcenter-cli:*" before the command, for example, DEBUG="appcenter-cli:*" appcenter apps list. Include the logs here, don't forget to omit any personal/sensitive data.
steven-supersolid commented 6 months ago

Running the same command on different machine works

steven-supersolid commented 6 months ago

I updated the failing Mac machine to the following and the appcenter-cli command appeared to complete successfully

MikhailSuendukov commented 6 months ago

Thank you for reaching out to us and are glad that you found a solution.

edisonspencer commented 6 months ago

Indeed, the last comment from @steven-supersolid helped us solve the same issue. In our case we were running it on GitHub Actions and the solution was to make use of setup-node action.

Leaving it as reference for others if needed:

- name: Set Up Nodejs
   uses: actions/setup-node@v4
   with:
     node-version: '20'
steven-supersolid commented 6 months ago

Would it be worth updating the minimum Node.js in https://github.com/microsoft/appcenter-cli/blob/master/README.md @MikhailSuendukov as it mentions v14? v18 seems ok, not sure about v16

MikhailSuendukov commented 5 months ago

Update it there https://github.com/microsoft/appcenter-cli/pull/2489. Thank you @steven-supersolid.

steven-supersolid commented 5 months ago

Thank you!