microsoft / vscode-azure-account

Common Azure Login extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account
Other
138 stars 130 forks source link

request to https://management.azure.com/subscriptions?api-version=2016-06-01 failed, reason: getaddrinfo ENOTFOUND management.azure.com #896

Closed WB-FSE closed 11 months ago

WB-FSE commented 11 months ago

Does this occur consistently? Yes Repro steps:

  1. CTRL+SHIFT+P
  2. Azure: Sign In
  3. Sign In using the pop in you browser
  4. Get error in VS CODE

Action: updateSubscriptionsAndTenants Error type: REQUEST_SEND_ERROR Error Message: request to https://management.azure.com/subscriptions?api-version=2016-06-01 failed, reason: getaddrinfo ENOTFOUND management.azure.com

Using a corporate network, probably behind a proxy.

Version: 0.11.6 OS: win32 OS Release: 10.0.22621 Product: Visual Studio Code Product Version: 1.84.2 Language: en

Call Stack new RestError extension.bundle.js:2:65384 NodeFetchHttpClient. extension.bundle.js:2:46552 step extension.bundle.js:2:2390802 Object.throw extension.bundle.js:2:2390907 rejected extension.bundle.js:2:2389632
Proxy test https://management.azure.com VS Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e) Network Proxy Test 0.0.8 win32 10.0.22621 x64 Settings: - http.proxy: - http.proxyAuthorization: null - http.proxyStrictSSL: true - http.proxySupport: override - http.systemCertificates: true Environment variables: Sending HTTP2 GET request to https://management.azure.com... Received error: getaddrinfo ENOTFOUND management.azure.com (ENOTFOUND) Retrying while ignoring certificate issues to collect information on the certificate chain. Sending HTTP2 GET request to https://management.azure.com (allowing unauthorized)... Received error: getaddrinfo ENOTFOUND management.azure.com (ENOTFOUND)
alexweininger commented 11 months ago

Hi, we just released v0.8.0 of the Azure Resources extension which fixes a lot of issues related to proxies and sign in. Update and try it again and see if that works.

https://github.com/microsoft/vscode-azureresourcegroups/releases/tag/v0.8.0

WB-FSE commented 11 months ago

Thanks for the comment. I've updated the Azure Resources extension and now I only get a "fetch failed" error message. Possibly it is under the hood the same issue?

alexweininger commented 11 months ago

Make sure you're using the command with the id azureResourceGroups.logIn, and not any others. image

WB-FSE commented 11 months ago

I've tested with the other sign in method last week. This didn't work. And all of a sudden yesterday it started working. So I'll close this issue for now but I don't have a clue yet why this started working.