Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az login hangs #9852

Closed
apsteger opened this issue Jul 3, 2019 · 8 comments
Closed

az login hangs #9852

apsteger opened this issue Jul 3, 2019 · 8 comments
Assignees
Labels
Account az login/account OKR3.4 Candidate For OKR3.4
Milestone

Comments

@apsteger
Copy link

apsteger commented Jul 3, 2019

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az login

Errors:
Running 'az login' hangs. It does not exit with a timeout or error code.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az login
  • browser opens
  • click on user name and log in
  • After selecting user, close browser or wait 10 seconds for redirect
  • az login command still has not returned

Expected Behavior

After clicking username in browser, it should perform a login and return control to the user in powershell environment

Environment Summary

Windows-10-10.0.17134-SP0
Python 3.6.6
Shell: powershell.exe

azure-cli 2.0.63 *

Additional Context

@marstr marstr added the Account az login/account label Jul 3, 2019
@marstr marstr self-assigned this Jul 3, 2019
@marstr
Copy link
Member

marstr commented Jul 3, 2019

Howdy @apsteger,

We've seen issues like this before when folks are using the CLI behind a VPN or proxy. Please checkout the following troubleshooting steps, and let me know if you're still encountering this issue: https://github.com/Azure/azure-cli/blob/dev/doc/use_cli_effectively.md#working-behind-a-proxy

@Nash-Vegas
Copy link

Nash-Vegas commented Jul 5, 2019

This was happening to us until we entered these at the CLI:

export HTTPS_PROXY="proxy.server.com"
export HTTP_PROXY="proxy.server.com"

@tommysundling
Copy link

I'm also encountering an issue where "az login" hangs in Visual Studio Code (v1.36.0) when running in a Powershell context.

When I run "az login" it starts my default browser (Edge), I then select my user account (@Hotmail) after which the browser just sits there with the loading animation. The VS Code window also never returns or timeouts from "running Powershell command".

If possible I would like to be able to use VS Code as my editor for my Azure CLI scripts but I'm not sure what is going wrong.

@apsteger
Copy link
Author

apsteger commented Jul 7, 2019

Thanks @marstr , I'll give it a try.

@marstr
Copy link
Member

marstr commented Jul 8, 2019

I'm going to close this for now, but I'll be happy to re-open if more information comes to light.

@tommysundling, I'd also try messing around with the troubleshooting guide.

@marstr marstr closed this as completed Jul 8, 2019
@barnstee
Copy link
Member

I'm also facing this issue and it hangs wither AFTER I do my 2-factor auth and the login windows in the browser stays at the progress bar screen or it says you are login in and moves on to the Azure CLI homepage. In either case, there is no further output on the Powershell Windows, even with --debug enabled. I've made sure that I am logged out before attempting another login, too. The last line of output, even with --debug enabled, is:
Note, we have launched a browser for you to login. For old experience with device code, use "az login --use-device-code"

@jiasli jiasli self-assigned this Aug 16, 2019
@jiasli jiasli reopened this Aug 16, 2019
@marstr marstr removed their assignment Aug 19, 2019
@haroldrandom haroldrandom added the Account az login/account label Oct 25, 2019
@yonzhan yonzhan added this to the S172 milestone Jun 1, 2020
@yonzhan yonzhan added the OKR3.4 Candidate For OKR3.4 label Jun 1, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 1, 2020

add to S172

@jiasli
Copy link
Member

jiasli commented Jun 30, 2020

This issue has been fixed in #10955. If it persists, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account OKR3.4 Candidate For OKR3.4
Projects
None yet
Development

No branches or pull requests

8 participants