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

VSCode failed to Azure sign in and cannot open Azure Bash after latest upgrade #801

Open
mz1245 opened this issue May 8, 2023 · 21 comments

Comments

@mz1245
Copy link

mz1245 commented May 8, 2023

Does this occur consistently? Yes
Repro steps:

  1. Network offline and cannot login on
  2. Cannot open Azure Bash shell

Action: azure-account.loginToCloud
Error type: AzureLoginError
Error Message: Offline

Version: 0.11.4
OS: win32
OS Release: 10.0.22000
Product: Visual Studio Code
Product Version: 1.78.0
Language: en

Call Stack

All works fine until last week VSCode upgrade automatically, (I just simple answered Yes ). I have uninstalled /re-install node.js, vscode et. al. But no luck! Does anyone encounter the same problem last week after upgrade?

extension.bundle.js:2:2468787extension.bundle.js:2:2468787
@mz1245
Copy link
Author

mz1245 commented May 8, 2023

image
image

@JackH11
Copy link

JackH11 commented May 8, 2023

My team and I are experiencing the same issue since about a week ago. We're working behind a company proxy and cannot connect to azure through the vscode extension. It seems it was cause by the latest update. I'm also getting this error:
MicrosoftTeams-image (2)

@varuns14
Copy link

varuns14 commented May 9, 2023

I am also getting the same error after s/w upgrade. Would appreciate a fix on this.

@alexweininger
Copy link
Member

I'm trying to find out if this was a result of the VS Code April 1.78 release or the recent 0.11.4 release of the Azure Account extension. Does downgrading the Azure Account extension to a previous version fix the issue? Does downgrading VS Code fix the issue?

@mz1245

@alexweininger
Copy link
Member

My team and I are experiencing the same issue since about a week ago. We're working behind a company proxy and cannot connect to azure through the vscode extension. It seems it was cause by the latest update. I'm also getting this error: MicrosoftTeams-image (2)

@JackH11 this looks like a different error than the original issue. Could you file a new issue and include specific details for your case? Thanks.

@mz1245
Copy link
Author

mz1245 commented May 10, 2023

I'm trying to find out if this was a result of the VS Code April 1.78 release or the recent 0.11.4 release of the Azure Account extension. Does downgrading the Azure Account extension to a previous version fix the issue? Does downgrading VS Code fix the issue?

@mz1245

@mz1245
Copy link
Author

mz1245 commented May 10, 2023

I'm trying to find out if this was a result of the VS Code April 1.78 release or the recent 0.11.4 release of the Azure Account extension. Does downgrading the Azure Account extension to a previous version fix the issue? Does downgrading VS Code fix the issue?

@mz1245

No, I just uninstalled and reinstalled latest version which is 1.78 /0.11.4 release (recommended). It appears that the upgrade caused the problem as others reporting the same problem.

@mz1245 mz1245 closed this as completed May 10, 2023
@mz1245 mz1245 reopened this May 10, 2023
@mz1245
Copy link
Author

mz1245 commented May 10, 2023

Click wrong button (Issue not resolved).

@mz1245
Copy link
Author

mz1245 commented May 10, 2023

Just try downgrade to VSCodeUserSetup-x64-1.77.3 . First uninstalled the current one (1.78.1) and then installed, but right after installation complete, it appears that VSCode will automatically upgrade to the latest version (1.78.1).

FYI. It is not me encountering this problem, but my teammates too with recent version upgrade.

@JackH11
Copy link

JackH11 commented May 10, 2023

It's the exact same issue coming after the new update. Running Azure Account v0.11.4. I start by getting the error "You appear to be offline". The issue certificate is an additional error I get after the appearing offline. Is there a way I can point the certificate to somewhere else?

@alexweininger
Copy link
Member

A change released in the VS Code 1.78 April release breaks loading OS certificates on Windows. Meaning self-signed certificates and CA certificates picked up from a network proxy are currently broken. See microsoft/vscode#181404 for more details.

It looks like VS Code is planning to include a fix in the 1.78.2 release (April recovery 2).

Until that is released, you can downgrade to VS Code 1.77. Also, other users have had success installing the win-ca extension, which makes Trusted Root Certificates on Windows available to VS Code extensions.

Another workaround if your CA certificate is provided by a network proxy is to configure the proxy related settings in VS Code.

@JackH11
Copy link

JackH11 commented May 11, 2023

A change released in the VS Code 1.78 April release breaks loading OS certificates on Windows. Meaning self-signed certificates and CA certificates picked up from a network proxy are currently broken. See microsoft/vscode#181404 for more details.

It looks like VS Code is planning to include a fix in the 1.78.2 release (April recovery 2).

Until that is released, you can downgrade to VS Code 1.77. Also, other users have had success installing the win-ca extension, which makes Trusted Root Certificates on Windows available to VS Code extensions.

Another workaround if your CA certificate is provided by a network proxy is to configure the proxy related settings in VS Code.

Downgrading to VS Code 1.77 Fixed the issue for me

@alexweininger
Copy link
Member

VS Code just released version 1.78.2 which should fix the certificates issue, could you please update VS Code and retry the operation?

@mz1245
Copy link
Author

mz1245 commented May 11, 2023

Tried on VS Code (Version 1.78.2) with Azure Account extension (v0.11.4), it still failed. However, when I downgraded Azure Account extension to previous version v0.11.3, the problem is fixed! Thanks!

My solution is that VS Code version 1.78.2 plus Azure Account extension v0.11.3.

Thanks!

image

@alexweininger
Copy link
Member

alexweininger commented May 11, 2023

@mz1245 weird, there should be no changes in v0.11.4 that impact cloud shell. Sorry to make you do this, but could you upgrade to v0.11.4 and try again? Thanks.

If that doesn't work, could you share the logs when it fails? See the Enable and View Logs section of the wiki for how to capture and share Azure Account extension logs.

@mz1245
Copy link
Author

mz1245 commented May 11, 2023 via email

@alexweininger
Copy link
Member

Could you share the logs when it fails? See the Enable and View Logs section of the wiki for how to capture and share Azure Account extension logs.

@mz1245
Copy link
Author

mz1245 commented May 11, 2023 via email

@mz1245
Copy link
Author

mz1245 commented May 11, 2023 via email

@alexweininger
Copy link
Member

Could you share the logs from the Azure Account output channel? Please enable trace logs for the Azure Account extension first.

image

See the Enable and View Logs section of the wiki for how to capture and share Azure Account extension logs.

@hc-Jessie-Robbins
Copy link

I am also seeing similar issues with 1.78.2 and Azure Account v0.11.5 when trying to connect via the Azure Automation extension. The logs I'm getting are:

2023-05-22 10:25:13.339 [info] MSAL: [Mon, 22 May 2023 15:25:13 GMT] : @azure/msal-node@1.14.6 : Info - getTokenCache called
2023-05-22 10:25:13.343 [info] Attempting to reach URL "https://login.microsoftonline.com/"...
2023-05-22 10:25:13.525 [error] self signed certificate in certificate chain
2023-05-22 10:25:13.527 [info] [Axios Request] POST https://login.microsoftonline.com/common/oauth2/devicecode?api-version=1.0
2023-05-22 10:25:13.753 [info] [Axios Response] 200 - POST https://login.microsoftonline.com/common/oauth2/devicecode?api-version=1.0
2023-05-22 10:25:13.762 [info] [Axios Request] POST https://login.microsoftonline.com/common/oauth2/token?api-version=1.0
2023-05-22 10:25:19.188 [info] [Axios Request] POST https://login.microsoftonline.com/common/oauth2/token?api-version=1.0
2023-05-22 10:25:24.517 [info] [Axios Request] POST https://login.microsoftonline.com/common/oauth2/token?api-version=1.0
2023-05-22 10:25:29.714 [info] [Axios Request] POST https://login.microsoftonline.com/common/oauth2/token?api-version=1.0
2023-05-22 10:25:30.162 [info] [Axios Response] 200 - POST https://login.microsoftonline.com/common/oauth2/token?api-version=1.0
2023-05-22 10:25:30.203 [info] [SubscriptionsClient Request] GET https://management.azure.com/tenants?api-version=2016-06-01
2023-05-22 10:25:30.268 [error] request to https://management.azure.com/tenants?api-version=2016-06-01 failed, reason: self signed certificate in certificate chain

I've also tried disabling everything but the Azure Account extension and it doesn't make a difference. Downgrading to 0.11.3 as noted above also doesn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants