Skip to content

The language service could not be started: Exception encountered starting EditorServices #2965

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
H1-N1 opened this issue Sep 21, 2020 · 5 comments · Fixed by PowerShell/PowerShellEditorServices#1363
Labels

Comments

@H1-N1
Copy link

H1-N1 commented Sep 21, 2020

System Details
Operating system name and version: Windows 7 (x32)
VS Code version: 1.49.1
PowerShell extension version: 2020.6.0
Output from $PSVersionTable:

PS C:\Users\W> $PSVersionTable

Name Value


PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.17929
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Issue Description
Terminal does not work. outputing ERROR Exception
Exception encountered starting EditorServices. Exception logged in D:\a\1\s\src\PowerShellEditorServices.Hosting\Commands\StartEditorServicesCommand.cs on line 248 in EndProcessing:
System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.GetPSVersion()
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LogPowerShellDetails()
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LogHostInformation()
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LoadAndRunEditorServicesAsync()
at Microsoft.PowerShell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()

== Press any key to close terminal ==

Attached Logs

21/09/2020 20:08:55 [NORMAL] - Visual Studio Code v1.49.1 32-bit
21/09/2020 20:08:55 [NORMAL] - PowerShell Extension v2020.6.0
21/09/2020 20:08:55 [NORMAL] - Operating System: Windows 32-bit
21/09/2020 20:08:55 [NORMAL] - Language server starting --
21/09/2020 20:08:55 [NORMAL] - PowerShell executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
21/09/2020 20:08:55 [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1600711735-dcb2017c-f366-4915-b1e2-402c1ba6dd991600711712286\EditorServices.log' -SessionDetailsPath 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-3096-381252' -FeatureFlags @()
21/09/2020 20:08:55 [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1600711735-dcb2017c-f366-4915-b1e2-402c1ba6dd991600711712286\EditorServices.log' -SessionDetailsPath 'c:\Users\Wuser.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-3096-381252' -FeatureFlags @()
21/09/2020 20:08:55 [NORMAL] - powershell.exe started.
21/09/2020 20:08:55 [NORMAL] - Waiting for session file
21/09/2020 20:12:56 [NORMAL] - Timed out waiting for session file to appear.
21/09/2020 20:12:56 [NORMAL] - Language server startup failed.
21/09/2020 20:12:56 [ERROR] - The language service could not be started:
21/09/2020 20:12:56 [ERROR] - Error: Timed out waiting for session file to appear.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Sep 21, 2020
@TylerLeonhardt
Copy link
Member

@H1-N1 what version of the .NET Framework do you have installed? I think this will be fixed if you install v4.6 or higher.

@rjmholt
Copy link
Contributor

rjmholt commented Sep 21, 2020

Can you let us know the output of this:

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\'

@rjmholt
Copy link
Contributor

rjmholt commented Sep 21, 2020

For reference, we throw here and need to ensure net452 can run until here to get a clean message.

@H1-N1
Copy link
Author

H1-N1 commented Sep 30, 2020

install .NET Framework v4.6 or higher

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 30, 2020
@H1-N1 H1-N1 closed this as completed Sep 30, 2020
@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 30, 2020
@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jan 22, 2021
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label May 18, 2021
@sunilram-net
Copy link

Can you let us know the output of this:

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\'

CBS : 1
Install : 1
InstallPath : C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Release : 528372
Servicing : 0
TargetVersion : 4.0.0
Version : 4.8.04084
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework
Setup\NDP\v4\Full
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4
PSChildName : Full
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Aug 10, 2021
@StevenBucher98 StevenBucher98 removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants