microsoft / appcenter-cli

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

appcenter login not working properly on macOS #2490

Closed nandowastaken closed 5 months ago

nandowastaken commented 5 months ago

Description

When I type appcenter login, I get redirect to the appcenter page generating the token, however, when I come back, the terminal process is no longer available for me to paste the token, see the image below to get my view after getting redirect to appcenter page.

Captura de Tela 2024-03-30 às 12 02 45

Repro Steps

Please list the steps used to reproduce your issue.

  1. npm i -g appcenter-cli
  2. appcenter login

Expected behavior

I expect to type appcenter login, get redirect to the page, and when I come back to the terminal, I would be able to paste the token in it.

Details

  1. Is there a particular beacon/command that you are having trouble with?
    • appcenter login
  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.
  4. What version of Node.js and NPM/Yarn are you using?
    • node 21.6.0, npm 10.2.4
mikepaszkiewicz commented 5 months ago

@nandowastaken can confirm same behavior for 3.0.0 with below versions on MacOS

however, installing appcenter-cli@2.14.0 and logging in allows the interactive terminal to persist and successfully login with token.

node: 18.19.0 npm: 10.2.3

mikepaszkiewicz commented 5 months ago

@nandowastaken Update! Found out the culprit here - I had an old app where the OrgOwner was a personal account, instead of the organization account. After deleting this app via CLI 2.14.0 (couldn't find how to delete via UI), I was able to log in successfully on 3.x.x

Error fragment when trying to run with token in environment (see here):

/usr/bin/security find-generic-password -a ${PERSONAL_APP_IDENTIFIER} -s mobile-center-cli -g

Via AppCenter UI or appcenter apps list (on 2.14.0)

$ appcenter apps list

OrgOwner/App-1
OrgOwner/App-2
${PERSONAL_APP_IDENTIFIER}/App-0 # <--delete this one

$ appcenter apps delete -a ${PERSONAL_APP_IDENTIFIER}/App-0
nandowastaken commented 5 months ago

@mikepaszkiewicz Thanks for the reply, downgrading appcenter to 2.14.0 worked for me!

I also have 2 apps at my machine from 2 different accounts, and it was right after adding the second app that the issue started, however, I need them both so it may be more interesting for me to keep using 2.14.0 for a while.

batuhanbag commented 1 month ago

@mikepaszkiewicz thanks downgrading worked me as well.