Skip to content

Add-AzureRmAccount hangs PowerShell Editor Services #178

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

Closed
pcgeek86 opened this issue May 14, 2016 · 5 comments · May be fixed by Sarrac3873/vscode-powershell#4
Closed

Add-AzureRmAccount hangs PowerShell Editor Services #178

pcgeek86 opened this issue May 14, 2016 · 5 comments · May be fixed by Sarrac3873/vscode-powershell#4

Comments

@pcgeek86
Copy link
Contributor

Using version 0.6.0 of the PowerShell extension, Add-AzureRmAccount appears, but it hangs VS Code. I can't run any other commands with F8.

image

Cheers,
Trevor Sullivan
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86

@daviwil
Copy link
Contributor

daviwil commented May 14, 2016

Hmm, I can't repro this. I was able to add an account using that cmdlet and then use F8 to run something else afterward:

PS C:\Program Files (x86)\Microsoft VS Code
Add-AzureRmAccount



Environment           : AzureCloud
Account               : [email protected]
TenantId              : 1d5441f7-e6fa-40cb-a67f-ad29489c6f8e
SubscriptionId        : 932d132b-a8ba-490d-b10e-5a4bc5d404f4
CurrentStorageAccount : 




PS C:\Program Files (x86)\Microsoft VS Code
function Stop-LanguageServer($languageServer) {

}


PS C:\Program Files (x86)\Microsoft VS Code
Write-Output "INITIALIZED"

INITIALIZED

PS C:\Program Files (x86)\Microsoft VS Code

I'm also able to get IntelliSense etc after running it. Have you tried this in a fresh VS Code session? There may be some specific set of steps needed to make it happen.

@vikram-pendli
Copy link

Hi,
I am also running into similar issue. Below is the version information for Visual Studio Code that I am using.

Version 1.12.2
Commit 19222cdc84ce72202478ba1cec5cb557b71163de
Date 2017-05-10T13:20:36.315Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0

PowerShell extension version is 1.2.1

VSCode is unable to display the Microsoft login prompt when we execute the CmdLet
Add-AzureRmAccount
This happens in all the following cases

  1. Run the script (Ctrl + F5)
  2. Debug thescript (F5)
  3. Run the CmdLet from the integrated terminal shell.

Here is the prompt window when I run the command from regular PowerShell console or ISE
image

Please let me know if I can provide any other information to help out.

@jwikman
Copy link

jwikman commented Jan 17, 2018

I experience the same issue.

  • VSCode Version: Code 1.19.2 (490ef761b76b3f3b3832eff7a588aac891e5fe80, 2018-01-10T15:55:03.538Z)
  • OS Version: Windows_NT x64 10.0.14393
  • Extensions:
Extension Author (truncated) Version
better-comments aar 1.1.6
stuck-overflow dge 0.2.1
vscode-PSStackoverflow Dou 0.0.2
code-runner for 0.8.7
codeshell Kip 0.2.2
mssql ms- 1.3.0
PowerShell ms- 1.5.1
team ms- 1.122.0

Reproduces without extensions: Yes

Steps to Reproduce:

  1. Install latest AzureRM version from PowerShell ISE in elevated mod
Install-Module AzureRM -AllowClobber
  1. Open VS Code with PowerShell as the terminal.
  2. Run the command in any way of
  • Run the script (Ctrl + F5)
  • Debug thescript (F5)
  • Run the CmdLet from the integrated terminal shell.
Add-AzureRmAccount
  1. Now it just hangs...

The expected behavior is that a login prompt window should be opened (seen in the post above by @vikram-pendli )

@daviwil please just let me know if you need any more info.

I was first just so happy when I switched to VS Code for developing my Azure PowerShell Script, but now i can't test them inside VS Code :(

@jwikman
Copy link

jwikman commented Jan 17, 2018

Gaaah, I just found out what the issue is!

The login prompt window is opened behind all other open windows. And since it does not show up in task bar, you only see it if you minimize all other windows or if you use Alt+Tab...

So, this does is likely not a VS Code issue (or is it?), but an Azure PowerShell module issue.

I found answer here (after searching closed issues as well): microsoft/vscode#28470

@TylerLeonhardt
Copy link
Member

@jwikman yep. This is either a vscode or electron issue. I opened it on vscode since they closed the last one:

microsoft/vscode#42356

I'm going to close this issue since Add-AzureRmAccount isn't hanging. Let's watch the bug I created for the dialog showing behind vscode.

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

Successfully merging a pull request may close this issue.

5 participants