Skip to content

PowerShell extension (and Integrated Console) never starts #1673

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
dtbiedrzycki opened this issue Dec 26, 2018 · 41 comments
Closed

PowerShell extension (and Integrated Console) never starts #1673

dtbiedrzycki opened this issue Dec 26, 2018 · 41 comments
Labels

Comments

@dtbiedrzycki
Copy link

System Details

System Details Output

### VSCode version: 1.30.1 dea8705087adb1b5e5ae1d9123278e178656186a x64

### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version:

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      5.1.16299.666
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.666
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

All right click console options fail (i.e. Run Selection).

Expected Behaviour

If I highlight code and press F8 (or right click and Run Selection), I expect the command(s) to be run in the terminal window.

Actual Behaviour

A pop-up appears stating <ConsoleFeature>: Unable to instantiate; language client undefined.

Attached Logs

There are no logs in the extension logs folder (even with logs set to Diagnostic) and the lines below are the only output in the PowerShell Extension console:

12/26/2018 10:34:57 AM [NORMAL] - Visual Studio Code v1.30.1 64-bit
12/26/2018 10:34:57 AM [NORMAL] - PowerShell Extension v1.10.2
12/26/2018 10:34:57 AM [NORMAL] - Operating System: Windows 64-bit
12/26/2018 10:35:10 AM [ERROR] - <ConsoleFeature>: Unable to instantiate; language client undefined.
@TylerLeonhardt
Copy link
Member

Can you confirm that the PowerShell Integrated Console is open?

@dtbiedrzycki
Copy link
Author

I don't believe it is. When I try to open it via the command palette, nothing happens either.

@SydneyhSmith
Copy link
Collaborator

@dtbiedrzycki it would be helpful to know what command you were trying to run when you reached this error, a screenshot of your VSCode environment when this occurred would be even better, thanks!

@SydneyhSmith
Copy link
Collaborator

@dtbiedrzycki this should be fixed by a recent PR in #1690

@eduardcloud
Copy link

eduardcloud commented Jan 16, 2019

Here an approaching issue trying to open new Terminal after default crashes:
1/16/2019 5:38:54 PM [ERROR] - The language service could not be started: 1/16/2019 5:38:54 PM [ERROR] - Timed out waiting for session file to appear. 1/16/2019 5:39:33 PM [ERROR] - <ConsoleFeature>: Unable to instantiate; language client undefined.

@eduardcloud
Copy link

Here an approaching issue trying to open new Terminal after default crashes:
1/16/2019 5:38:54 PM [ERROR] - The language service could not be started: 1/16/2019 5:38:54 PM [ERROR] - Timed out waiting for session file to appear. 1/16/2019 5:39:33 PM [ERROR] - <ConsoleFeature>: Unable to instantiate; language client undefined.

Ok, I solved this changing the loglevel on VSCode settings from Warning to Normal. Maybe a Powershell modules update broke it?
Thanks

@rjmholt rjmholt changed the title All right click console options fail (i.e. Run Selection) PowerShellEditorServices won't start when log level is set to Warning (vs Normal) Jan 19, 2019
@SydneyhSmith
Copy link
Collaborator

@dtbiedrzycki Closing as the update to the extension that should fix this is out, will re-open if this issue is still happening!

@dtbiedrzycki
Copy link
Author

dtbiedrzycki commented Jan 25, 2019

Hey @SydneyhSmith, my apologies for the extremely long delay. I've updated the PowerShell extension to version 1.11.0 and my problem remains. See the attached gif showing the issue:
1673-error

@SydneyhSmith SydneyhSmith reopened this Jan 25, 2019
@IzzyRise
Copy link

I had this exactly same issue. Disabling, enabling then reload solved it for me.

@SydneyhSmith
Copy link
Collaborator

Thanks for reporting this, it could be from being on a restricted system, is your environment restricted in any way (group policy etc.), if so this could be the cause--try this https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode?view=powershell-6#installing-the-powershell-extension-on-restricted-systems and let us know if that helps at all.

@dtbiedrzycki
Copy link
Author

I had this exactly same issue. Disabling, enabling then reload solved it for me.

This did not work for me :(.

@dtbiedrzycki
Copy link
Author

Thanks for reporting this, it could be from being on a restricted system, is your environment restricted in any way (group policy etc.), if so this could be the cause--try this https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode?view=powershell-6#installing-the-powershell-extension-on-restricted-systems and let us know if that helps at all.

I ran the command provided in the link, was not prompted, and the command executed successfully. I also tried running VS Code as an administrator and still get the same behavior.

@dtbiedrzycki
Copy link
Author

I've also tried uninstalling and re-installing VS Code and get the same result as well.

@SydneyhSmith
Copy link
Collaborator

@dtbiedrzycki we are trying to diagnose this issue, would you mind looking in the logs file, they should be at ~/.VSCode/extensions/ms-vscode.powershell-1.11.0/logs ? Thanks!

@SydneyhSmith SydneyhSmith added Issue-Bug A bug to squash. Area-Logging and removed Triage Needs: Fix Verification Please verify the fix for us! Area-Command Explorer labels Feb 7, 2019
@dtbiedrzycki
Copy link
Author

The directory is empty :(
I also double checked and I have the "powershell.developer.editorServicesLogLevel" set to "Diagnostic".

@SydneyhSmith
Copy link
Collaborator

Assuming this is resolved for everyone since there has been no activity since my last check-in, please let us know if this is not the case, thanks!

@pgemme
Copy link

pgemme commented Oct 4, 2019

I was having this issue and reverting to 2019.5.0 fixed it for me.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Oct 4, 2019
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Oct 7, 2019
@ActionExpress50
Copy link

ActionExpress50 commented Nov 25, 2019

I was having this issue and reverting to 2019.5.0 fixed it for me.

Even running VS Code under SYSTEM account does not help.

+1. Need a fix.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 25, 2019
@SydneyhSmith
Copy link
Collaborator

@ActionExpress50 thanks for commenting on this issue, it would be great if you could open a new issue in our repo with logs/detailed explanation of the issue you are hitting so we can diagnose what is going on since the issue described that the root of the thread seems to have been resolved--thanks!

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Nov 26, 2019
@mabead
Copy link

mabead commented Mar 10, 2020

I installed PowerShell 7 from here and it fixed the problem for me.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Mar 10, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Mar 10, 2020

I installed PowerShell 7 from here and it fixed the problem for me.

Yeah, this likely means that the issue is what I think it is in #2538. Resolving the right dependency in .NET Core is much much easier, so we have a well-defined solution that works for PS 6 and 7.

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Mar 17, 2020
@js82jumper
Copy link

I also ran into this on a completely clean install and can confirm that installing PowerShell 7 fixed mine as well.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 4, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Apr 7, 2020
@steveaf
Copy link

steveaf commented Apr 22, 2020

I had the same "language service could not be started" issue in VS Code. I have both PowerShell and PowerShell Core 7 on Windows. In both with elevated PowerShell commands I set-executionpolicy unrestrected and no longer have an issue.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 22, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Apr 23, 2020
@clouditgirl
Copy link

I had this exactly same issue. Disabling, enabling then reload solved it for me.

This did not work for me :(.

didn't work for me either.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label May 18, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label May 28, 2020
@Meron-cloud
Copy link

Hello
I have the same issue
ps

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 2, 2020
@SydneyhSmith
Copy link
Collaborator

@Meron-cloud thanks--looks like you may be hitting a new issue could you please open a new issue with the information requested in the template it would be really helpful if you could also attach the logs--instructions for how to do that are here

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests