microsoft / appcenter-cli

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

appcenter distribute release command returns an error on Windows #2461

Closed adityai closed 11 months ago

adityai commented 11 months ago

Description

Unable to use the 'appcenter distribute release' command from windows

Repro Steps

Please list the steps used to reproduce your issue.

  1. Execute the command with or without parameters (appcenter distribute release) from the windows cmd.exe

Expected behavior

When executed without any other parameters, I expect the command to return an error message like this: Error: Command 'distribute release' failed with exception "Missing required option -f / --file"

When executed with the -f parameter and other parameters, I expect the command to upload the app to AppCenter.

But instead I get an error like this when no parameters are passed: Error: Command distribute release is invalid

Or I get an error like this when parameters are passed (The actual parameter values have been replaced with placeholders):

Error: Command distribute release -f <PATH_TO_THE_APK_FILE>\<APK_FILENAME>.apk --app <APP_CENTER_APP_NAME> --group <APP_CENTER_GROUP_NAME> --token <APP_CENTER_TOKEN> is invalid

Details

  1. Is there a particular beacon/command that you are having trouble with?
    • appcenter distribute release
  2. Which version of the App Center CLI are you using?
    • 2.14.0
  3. Which OS version did you experience the issue on?
    • Windows Server 2019
  4. What command line/shell are you using?
    • cmd.exe
  5. What version of Node.js and NPM/Yarn are you using?
    • 15.0.0
  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. Executed on cmd.exe:
    
    set DEBUG="appcenter-cli:*"

appcenter distribute release -f \.apk --app --group --token


Log:

Error: Command distribute release -f \.apk --app --group --token is invalid

DmitriyKirakosyan commented 11 months ago

@adityai, thank you for reaching out!

I recommend using the full option names and enclosing parameter values in quotes to avoid any issues with spaces or special characters:

appcenter distribute release --file "<file-path>" --group "<group-name>" --app "<owner-name>/<app-name>" --token "<token>"

Also, consider running the command with fewer parameters initially or try other simpler commands to ensure everything is functioning correctly. Please double-check all option names and values to ensure they are correct.

adityai commented 11 months ago

I tried it with quotes around all parameters. I tried executing with fewer parameters. I tried executing with no parameters. In all cases, the error message is the same: " is invalid".

Executing 'appcenter distribute release' without any parameters returns 'Error: Command distribute release is invalid'.

The same command works fine when executing from a linux server.

MikhailSuendukov commented 11 months ago

Hi @adityai in this case, I think that something is wrong with the integrity of the pocket on your Windows Server. Have you tried reinstalling it? Also, for more details, could you run this command with set DEBUG="appcenter-cli:*" appcenter distribute release and provide result logs?

MikhailSuendukov commented 11 months ago

I am closing this issue due to inactivity, but if you have any questions, you can freely reopen it.