Appcenter-cli: Cli-Login Gets Stuck

Created on 27 Aug 2018  路  25Comments  路  Source: microsoft/appcenter-cli

Hi Team MS,

Executing appcenter login opens up my browser and I can paste in the token.

Then, it hangs at | Getting user info ...

I've tried, using cmd since the former was PowerShell, I've restarted my machine just incase (since I had just installed it). Tried both cmd and powershell. Still stuck.

Win 7 Home Premium
Node v10.9.0

Regards,

Don.

bug

Most helpful comment

Hi @The-Don-Himself
As a workaround you can try to generate token in App Center portal https://appcenter.ms/settings/apitokens
and use --token YOUR_TOKEN parameter for commands or you can define APPCENTER_ACCESS_TOKEN=YOUR_TOKEN environment variable.
We will investigate this issue.

All 25 comments

C:Windowssystem32>appcenter help

Visual Studio App Center helps you build, test, distribute, and monitor mobile apps.
Version 1.1.2

+1

Hi @The-Don-Himself
As a workaround you can try to generate token in App Center portal https://appcenter.ms/settings/apitokens
and use --token YOUR_TOKEN parameter for commands or you can define APPCENTER_ACCESS_TOKEN=YOUR_TOKEN environment variable.
We will investigate this issue.

@AndreyMitsyk I've just tested this now, it works thanks. I'll leave the issue open though, you can close it once the bug is found and squashed.

Cheers.

@The-Don-Himself could you please execute login command with --debug flag and send logs?
appcenter login --debug
I can't repro this on my windows machine with same nodejs version, so I need some logs to understand what happened here.

Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:Windowssystem32> appcenter login --debug
Using appcenter-cli version: 1.1.2
Opening your browser...
? Visit https://appcenter.ms/cli-login?hostname=The-Don and enter the code:
? Access code from browser: 509.....148
| Getting user info ...logFilter, request: {
"rawResponse": false,
"queryString": {},
"url": "https://api.appcenter.ms/v0.1/user",
"method": "GET",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"user-agent": "appcenterCli/1.1.2 NodeJS/v10.10.0 win32/6.1.7601",
"x-api-token": "509....148",
"internal-request-source": "cli",
"diagnostic-context": "2f9930a9-496b-4e67-8fc9-c7041dc35ce0",
"cli-command-name": "login"
},
"body": null
}

And it just stays there, its been about 3 minutes now. It just stays there.

About 8 minutes now, no change, I have noticed on my Wireless Network Connection Status, that some bytes are sent out every 5 seconds, consistently. I believe its from this command. Nothing else is open.

Any news on this? Can I close it? The new GitHub layout always draws my attention to opened issues so I'd love to close it :)

My apologies @The-Don-Himself for the late reply. We'll get again.
@AndreyMitsyk are you looking at this issue?

@The-Don-Himself @amchew I see that this bug can be reproduced with node js 10, but it's working as expected with node js 9.
@owenniblock can we track this issue internally?

One more workaround which will work without env variables and token parameter for each command:
1) Execute appcenter login
2) Copy token from browser
3) Exit from logic command (e.g. ctrl+c)
4) Execute login command with token: appcenter login --token your_token_from_browser
5) Use CLI as usual.

@AndreyMitsyk - let's close this (if that's what @The-Don-Himself would like) and create an internal bug (we can post back here after it's resolved).

Please put a link to this issue to the Azure DevOps ticket.

Thanks all, yes, let's close this issue now that you can even reproduce it so I'm sure it will be solved. Thanks for the awesome product.

Hi @The-Don-Himself ! Thanks again for bringing this to our attention. We're planning on proposing this bug fix. As an additional information, could you let us know which CLI command you were planning on using post logging in?

@amchew you're welcome :)
I was planning to execute appcenter codepush

@The-Don-Himself - cool, thanks for letting us know! Right now the bug was approved to be fix, and I'll update again when it is rolled out in the new version. The workaround for now is to rollback to Node.JS 9 -- and appcenter login will work.

Great work guys!
Since rolling back is not an option for me right now, I don't mind using the aforementioned hack of getting the token from the browser, then using it to login. FYI, appcenter codepush works just fine on Node 10+ so it seems this issue it just around logging in, although, it must be said I haven't tested all the other awesome products integrated under appcenter, just codepush.

Ndiyo @The-Don-Himself - please use that workaround for now as we're working on the bug fix. Asante sana for your support! :)

Nice one @amchew! Karibu Tena!

PR with fixes/improvement is ready: https://github.com/Microsoft/appcenter-cli/pull/498

We just released this: appcenter-cli released with node 10 support: https://github.com/Microsoft/appcenter-cli/releases/tag/v1.1.7 - once npm cache has refreshed - give it a whirl and let us know if it's not working.

I've just updated now to v1.1.7, then performed an appcenter logout which completed successfully then an appcenter login which also did the same. I'm on Node 11.1 and everything seems to be working well. Great work guys! Thanks.

Awesome to hear that it's working @The-Don-Himself ! Thank you to @AndreyMitsyk and @owenniblock for the quick fix.

Estimados, a mi me sucede que cuando ejecuto el comando appcenter login me redirige a la url pero la misma se queda en blanco y no me muestra nada. Alguien tiene idea de porque puede estar sucediendo eso?

Was this page helpful?
0 / 5 - 0 ratings