vscode-azure-account icon indicating copy to clipboard operation
vscode-azure-account copied to clipboard

Not able to signin to Azure behind NTLM proxy

Open ejizba opened this issue 7 years ago • 26 comments

Copied from https://github.com/Microsoft/vscode-azurefunctions/issues/896 by @RitwikChatterjee

Hi,

I am using v0.13.1 of the extension on a Windows machine. I am able to create and test locally. However, in the step where I need to signin to Azure to deploy, I am not able to do so.

When I click on "Sign in to Azure" in the extension, it takes me to the browser with a code. The browser successfully signs me in and shows me the following message: "You have signed in to the Visual Studio Code application on your device. You may now close this window."

However, when I return to VSCode, it is not signed in. I believe the handshake is not happening properly.

ejizba avatar Jan 10 '19 19:01 ejizba

@RitwikChatterjee was initially on the following versions: Azure Account 0.6.2 VS Code 1.29.1

I had them update to 1.30.0 and 0.8.0 to see if the new sign-in experience fixed it for them, but they were still seeing the old experience with this dialog: image

Is the new sign-in experience supposed to work for everyone? Aka all subscriptions?

ejizba avatar Jan 10 '19 19:01 ejizba

@RitwikChatterjee Are you behind a network proxy? Are there any errors in the developer console (Help > Toggle Developer Tools)?

(@EricJizbaMSFT Device login is still used as a fallback depending on a network check.)

chrmarti avatar Jan 11 '19 09:01 chrmarti

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

vscodebot[bot] avatar Jan 21 '19 10:01 vscodebot[bot]

Can I reopen this issue? @chrmarti apologies for the delay - No I am not behind any proxy, working from home.

RitwikChatterjee avatar Feb 01 '19 20:02 RitwikChatterjee

@RitwikChatterjee Are there any errors in the developer console (Help > Toggle Developer Tools)?

chrmarti avatar Feb 04 '19 07:02 chrmarti

I am having the same issue but in Linux. What do you man Toggle Developer tools?

m2b avatar Feb 05 '19 01:02 m2b

Ok I got Developer Tools running and after clearing console this is what I got. Extension Host] Error: The name org.freedesktop.secrets was not provided by any .service files t.log @ console.ts:134 t._logExtensionHostMessage @ extensionHost.ts:453 (anonymous) @ extensionHost.ts:244 emitTwo @ events.js:126 emit @ events.js:214 emit @ internal/child_process.js:772 _combinedTickCallback @ internal/process/next_tick.js:141 _tickCallback @ internal/process/next_tick.js:180 extensionHost.ts:235 Extension Host extensionHost.ts:236 ** Message: 17:28:34.177: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files

m2b avatar Feb 05 '19 01:02 m2b

Hi. I fixed my issue and hope this helps. It was not working because the was no service to manage secrets (like credentials manager). I wonder if @chrmarti has a security issue himself (i.e. not able to save secrets in his Windows PC).

m2b avatar Feb 05 '19 01:02 m2b

I am getting the same issue with version 0.8.0.

Basically it just hangs on trying to signin. If I restart VSCode it says - 'you appear to be offline' and gives me a code, after the login, it just sits therespinning up.

I have had it come up and say 'select subscriptions' but after a while that vanishes. And it says 'Wating for Azure Sign-In', with the 'you appear to be offline' dialog showing.

AndyWDev avatar Feb 14 '19 03:02 AndyWDev

@AndyWDev Are you behind a network proxy? (Could be #121.)

chrmarti avatar Feb 14 '19 07:02 chrmarti

@ AndyWDev Do you ever get redirected to the browser to login to Azure?

m2b avatar Feb 14 '19 16:02 m2b

I get redirected to a login page, which logs in successfully and then gives me a 'it is now ok to close this page' message.

And yes, I am behind an NTLM proxy - I was interested to know why VSCode (extension) does not use the built in windows proxy (e.g. the one configured in IE settings) when it is running on the windows platform.

AndyWDev avatar Feb 14 '19 19:02 AndyWDev

I am not behin a proxy but I think it does take it from the environment if you configured it correctly. Attached is a screenshot from my Mac VS Code settings page. screen shot 2019-02-14 at 12 40 45 pm

m2b avatar Feb 14 '19 20:02 m2b

NTLM proxies are not yet supported. Keeping this issue to track this for Azure Account. A fix will be needed in VS Code. (Related: https://github.com/Microsoft/vscode/issues/60773)

chrmarti avatar Feb 15 '19 06:02 chrmarti

Hi thanks for that. NTLM proxies are commonly used in the windows world, so it would be great if there were seemless integration at some stage.

AndyWDev avatar Feb 17 '19 20:02 AndyWDev

hi, i want to piggyback on this issue, even though I don't think my issue is exactly the same. When I try to sign into Azure in VS Code, in the developer tools, it gives me an error Error: The user name or passphrase you entered is not correct. though I am clearly signed into my azure account in the browser. I'm in VS Code v.1.31.0 on osx.

mustermania avatar Mar 28 '19 21:03 mustermania

@mustermania Are you using a network proxy? Could you file a new issue, so we can keep the discussions of separate issues apart? Thanks.

chrmarti avatar Apr 01 '19 08:04 chrmarti

Hi, I'm having the same issue I think. It's saying that 'You appear to be offline. Please check your network connection. Any updates on this issue?

Thanks. image

NorthDragonRider avatar May 20 '19 03:05 NorthDragonRider

Hi, I'm having the same issue I think. It's saying that 'You appear to be offline. Please check your network connection. Any updates on this issue?

Thanks. image

Same issue as above, any ETA on this?

dilmerv avatar Jun 07 '19 21:06 dilmerv

There is no ETA for NTLM proxy support.

If you don't use an NTLM proxy, make sure you have the latest version of the extension installed.

chrmarti avatar Jun 11 '19 09:06 chrmarti

To hear that there is no support for NTLM proxies is sad. I need to use CNTLM to work from my company network and this currently seems to prevent me from using VS Code with vscode-azure-account.

With the VS Code setting HTTP Proxy: Support "on" (pointing to my CNTLM instance), I get the following error with vscode --verbose:

VSCode_ProxyOn

[main 2019-07-24T07:56:53.979Z] windowsService#openExternal
[16672:0724/095700.306:INFO:CONSOLE(240)] "%c[Extension Host] %cError: tunneling socket could not be established, statusCode=400
        at ClientRequest.a (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:221:234974)
        at Object.onceWrapper (events.js:273:13)
        at ClientRequest.emit (events.js:182:13)
        at Socket.socketOnData (_http_client.js:474:11)
        at Socket.emit (events.js:182:13)
        at addChunk (_stream_readable.js:283:12)
        at readableAddChunk (_stream_readable.js:264:11)
        at Socket.Readable.push (_stream_readable.js:219:10)
        at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)", source: file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (240)

The error looks different thoug with HTTP Proxy: Support "override". Then the callback seems to work, but the login never succeeds in vscode-azure-account. I then get:

[4140:0724/113001.141:INFO:CONSOLE(240)] "%c[Extension Host] %cTypeError: Cannot read property 'toLowerCase' of null
        at Object.module.exports.t.urlIsHTTPS (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:1:173072)
        at a.S [as _setDefaultProxy] (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:236:1620)
        at new module.exports.e.exports (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:236:2307)
        at new module.exports.e.exports (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:229:80723)
        at new a (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:236:140547)
        at C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:229:23900
        at Generator.next (<anonymous>)
        at s (C:\Users\TOILLIK\.vscode\extensions\ms-vscode.azure-account-0.8.4\dist\extension.js:229:21464)
        at process._tickCallback (internal/process/next_tick.js:68:7) %c(at process._tickCallback (internal/process/next_tick.js:68:7))", source: file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (240)

tillik avatar Jul 24 '19 09:07 tillik

I managed to resolve a similar issue on Windows by installing the add-on win-ca. You may want to give that a go.

kajwanr avatar Aug 08 '19 10:08 kajwanr

https://github.com/microsoft/vscode-azure-account/issues/419 should help mitigate this.

wwlorey avatar Mar 16 '22 22:03 wwlorey

Still a problem in v0.11.1!

Downgrading the VSCode Extension "Azure Account" to version v0.9.9 solved the problem.

Proposed in https://stackoverflow.com/questions/52468396/azure-sign-in-not-working-using-azure-tools-option-in-vscode/69902136#69902136

mickare avatar Aug 19 '22 11:08 mickare

@mickare this solution worked for me. thx

toneyu avatar Sep 12 '22 16:09 toneyu

Still a problem in v0.11.1!

Downgrading the VSCode Extension "Azure Account" to version v0.9.9 solved the problem.

Proposed in https://stackoverflow.com/questions/52468396/azure-sign-in-not-working-using-azure-tools-option-in-vscode/69902136#69902136

Downgrading to extension version 0.9.9 also solved the problem for me. This took a lot of time to figure out.

What kind of regression happened here?

dvasdekis avatar Nov 30 '22 02:11 dvasdekis