Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
412 stars 201 forks source link

Failed to `azd auth login` on Windows #1994

Closed v-jiaodi closed 1 year ago

v-jiaodi commented 1 year ago

Describe the issue: Failed to azd auth login When using MSFTVPN network on Windows

The error message as follows: image

In addition, when not using VPN, it can work normally Repro steps:

  1. Run command azd auth login.

Environment: OS: Windows Template: all templates. Azd version: 0.8.0-beta.2-daily.2713284 (commit https://github.com/Azure/azure-dev/commit/cb28058af1e7139be4381532f6b1167d9cd948fb)

Expected behavior: azd auth login can pass on Windows.

@rajeshkamal5050 for notification.

weikanglim commented 1 year ago

Not a blocker. The DNS lookup for "localhost" failed when MSFTVPN was enabled. I have not seen this behavior.

@v-jiaodi

Does it reproduce consistently? If it reproduces consistently, what happens when you perform nslookup localhost in a cmd shell?

v-jiaodi commented 1 year ago

@weikanglim It can be reproduced consistently. When executing nslookup localhost in a cmd shell, get the message as follow: image

msiemon commented 1 year ago

I have the same issue on Windows 11. I was able to work around it with: auth login --use-device-code false