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 Failure to upload release with API token #2479

Closed 0mpurdy closed 6 months ago

0mpurdy commented 6 months ago

Description

When running certain commands with a full access token (tried both App and User scope) in a pipeline the command fails

Commands:

appcenter login --token $(ANDROID_APPCENTER_TOKEN)
appcenter distribute release --token $(ANDROID_APPCENTER_TOKEN)

Error:

Error: AbortController is not defined

Repro Steps

Please list the steps used to reproduce your issue.

  1. Run appcenter distribute release --token $(APPCENTER_TOKEN)

Expected behavior

App should be uploaded to AppCenter without errors

Details

  1. Is there a particular beacon/command that you are having trouble with?
    • appcenter distribute release --token $(APPCENTER_TOKEN)
  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-13 Azure pipeline and windows-latest Azure pipeline
  4. What command line/shell are you using?
    • powershell pipeline task
  5. What version of Node.js and NPM/Yarn are you using?
    • node v14.21.3 x64
  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.
    • Will edit later to include, happening across multiple projects and multiple build environments so hopefully easy to reproduce without
steven-supersolid commented 6 months ago

This seems like the same issue I had so please see https://github.com/microsoft/appcenter-cli/issues/2476 Updating Node.js has been found to resolve the issue

0mpurdy commented 6 months ago

Thank you, saw that and been doing some experimentation with mixed results

Using

Node 20.11.1 x64 npm 10.2.4

With app scope token, I have seen it succeed but more often fails with the following error on both platforms (iOS and Android):

Error: Loading release id failed with error: failed to get release id for upload id: ********-****-****-****-************, error: {"succeeded":false,"errorCode":3,"errorMessage":"failed to get release id with HTTP status: 404 - Not Found"}

As it's part of a pipeline a failure like this prevents automatic tagging of releases etc.

I did check to see if this is a current AppCenter API issue, but "Distribute" is operational at the moment: https://status.appcenter.ms/

steven-supersolid commented 6 months ago

We're also experiencing the 404 error today with intermittent successes. The build is uploaded but the distribute step is failing.

A potential workaround is dropping back to 2.14.0. If you use npx to run then e.g. npx appcenter-cli@2.14.0 should achieve this. If the 404 errors continue with the earlier version and Node.js 14 then it would appear to be a service issue

UPDATE: I tried 2.14.0 once with Node.js v20 and once with v14 with the same 404 error

MikhailSuendukov commented 6 months ago

Hello and thank you for reaching out to us! I'll close this issue as a duplicate of this one. At the time of the connection error that you described, we were experiencing issues with the Distribute service, which have been fixed at this moment. But if you are still experiencing it, feel free to contact us.