Closed QuyenLy73 closed 4 years ago
For what it's worth, I'm having similar issues on my Mac w/ the latest VS Code and PS Core 6.x.
@QuyenLy73 thanks that is a helpful piece of information...we will continue to investigate this issue and update as appropriate and ask any questions that come up...in the meantime you may want to investigate PSSA compatibility rules as a way to target 5.1 in your development while running core. More info on that here : https://devblogs.microsoft.com/powershell/using-psscriptanalyzer-to-check-powershell-version-compatibility/
Installing 6.2.3 x64 with the MSI fixed this for me
@doug4772 I don't think you're experiencing the same issue on macOS. Can you add the logs & screenshots here?
Ok, I've just managed to spin up a fresh RS3 VM with VSCode 1.14.1 and PS 5.1 to try this out. I wasn't able to reproduce a startup freeze with either the current stable extension or the current master build. That may mean that rather than being a Windows bug this is a policy or antivirus issue.
One last resort is to collect a procdump of the frozen process to see where it's stuck. We've tried that in the past and in cases like this it hasn't shown clear results, but might be worth a try anyway.
This issue is being closed as inactive, if this issue is still occurring it will be re-opened
I'm receiving the error mentioned above PLUS the fact I cannot open a terminal. I uninstalled VSCode completely, rebooted, reinstalled and before installing any PowerShell extensions, tried to open a terminal and it failed with the error:
The terminal process command 'C:\Program Files\PowerShell\7\pwsh.exe' failed to launch (exit code: {2})
Happening on all my PROD api servers now
Same issue. Started when Code was updated. Neither the last stable version nor the Preview work. Username obfuscated below.
4/22/2020 7:06:42 PM [NORMAL] - Visual Studio Code v1.44.2 64-bit 4/22/2020 7:06:42 PM [NORMAL] - PowerShell Extension v2020.4.0 4/22/2020 7:06:42 PM [NORMAL] - Operating System: Windows 64-bit 4/22/2020 7:06:42 PM [NORMAL] - Language server starting -- 4/22/2020 7:06:42 PM [NORMAL] - PowerShell executable: C:\Users\myself.dotnet\tools\pwsh.exe 4/22/2020 7:06:42 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.4.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\logs\1587596802-25479203-0f29-4890-bbd5-951e79fadd981587596783837\EditorServices.log' -SessionDetailsPath 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\sessions\PSES-VSCode-17948-194532' -FeatureFlags @() 4/22/2020 7:06:42 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.4.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\logs\1587596802-25479203-0f29-4890-bbd5-951e79fadd981587596783837\EditorServices.log' -SessionDetailsPath 'c:\Users\myself.vscode\extensions\ms-vscode.powershell-2020.4.0\sessions\PSES-VSCode-17948-194532' -FeatureFlags @() 4/22/2020 7:06:42 PM [NORMAL] - pwsh.exe started. 4/22/2020 7:06:42 PM [NORMAL] - Waiting for session file 4/22/2020 7:08:42 PM [NORMAL] - Error occurred retrieving session file: Timed out waiting for session file to appear. 4/22/2020 7:08:42 PM [NORMAL] - Language server startup failed. 4/22/2020 7:08:42 PM [ERROR] - The language service could not be started: 4/22/2020 7:08:42 PM [ERROR] - Timed out waiting for session file to appear.
Do you run any privilege management software like BeyondTrust?
I have the same problem that Posh 5.1 crashes with "The language service could not be started" in vscode. Posh7 works.
I have the same problem that Posh 5.1 crashes with "The language service could not be started" in vscode. Posh7 works.
Do you run any privilege management software like BeyondTrust?
So.. what's the solution to this issue? It just started happening today on my main PC. Surely with this many people having this issue, there has to be a way to fix it.
I'm using Windows 10 Version 2004 (OS Build 19041.630) using PowerShell 5.1. I've tried both the PowerShell Preview extension as well as the regular PowerShell Extension.
Also getting this issue in VS Code: 10/2/2021 12:15:52 [NORMAL] - Visual Studio Code v1.53.1 64-bit 10/2/2021 12:15:52 [NORMAL] - PowerShell Extension v2020.6.0 10/2/2021 12:15:52 [NORMAL] - Operating System: Windows 64-bit 10/2/2021 12:15:52 [NORMAL] - Language server starting -- 10/2/2021 12:15:52 [NORMAL] - PowerShell executable: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 10/2/2021 12:15:52 [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users*.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**.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <===== " -LogLevel 'Normal' -LogPath 'c:\Users**.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1612959352-1492f77d-a1fb-4083-82da-059fc7ae41d31612959230672\EditorServices.log' -SessionDetailsPath 'c:\Users*.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-19512-642239' -FeatureFlags @() 10/2/2021 12:15:52 [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users*.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*.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <===== " -LogLevel 'Normal' -LogPath 'c:\Users*.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1612959352-1492f77d-a1fb-4083-82da-059fc7ae41d31612959230672\EditorServices.log' -SessionDetailsPath 'c:\Users*.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-19512-642239' -FeatureFlags @() 10/2/2021 12:15:52 [NORMAL] - powershell.exe started. 10/2/2021 12:15:52 [NORMAL] - Waiting for session file 10/2/2021 12:19:52 [NORMAL] - Timed out waiting for session file to appear. 10/2/2021 12:19:52 [NORMAL] - Language server startup failed. 10/2/2021 12:19:52 [ERROR] - The language service could not be started: 10/2/2021 12:19:52 [ERROR] - Error: Timed out waiting for session file to appear.
Powershell version is 5.1.17763.1490
I'm getting this on a Window 2013R2 server. Anyone with a solution?
29.9.2021 21.08.33 [NORMAL] - Visual Studio Code v1.60.2 64-bit 29.9.2021 21.08.34 [NORMAL] - PowerShell Extension v2021.9.0 29.9.2021 21.08.34 [NORMAL] - Operating System: Windows 64-bit 29.9.2021 21.08.34 [NORMAL] - Language server starting -- 29.9.2021 21.08.34 [NORMAL] - PowerShell executable: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe 29.9.2021 21.08.34 [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.9.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.9.0 <===== ' -LogLevel 'Normal' -LogPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\logs\1632942514-d5eecef5-00e9-478c-8d45-2edb094747141632942501054\EditorServices.log' -SessionDetailsPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\sessions\PSES-VSCode-4128-329853' -FeatureFlags @() 29.9.2021 21.08.34 [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.9.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.9.0 <===== ' -LogLevel 'Normal' -LogPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\logs\1632942514-d5eecef5-00e9-478c-8d45-2edb094747141632942501054\EditorServices.log' -SessionDetailsPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2021.9.0\sessions\PSES-VSCode-4128-329853' -FeatureFlags @() 29.9.2021 21.08.34 [NORMAL] - powershell.exe started. 29.9.2021 21.08.34 [NORMAL] - Waiting for session file 29.9.2021 21.12.37 [NORMAL] - Timed out waiting for session file to appear. 29.9.2021 21.12.37 [NORMAL] - Language server startup failed. 29.9.2021 21.12.37 [ERROR] - The language service could not be started: 29.9.2021 21.12.37 [ERROR] - Error: Timed out waiting for session file to appear.
Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead.
Issue Description
PS session fails to start with these errors. I have taken the cert from Start-EditorServices.ps1 and imported into my local machine's Trusted Publisher's store. I confirmed it's there with an expiration date of 5/2/2020. I have also executed this command but nothing happens.
Import-Module $HOME.vscode\extensions\ms-vscode.powershell*\modules\PowerShellEditorServices\PowerShellEditorServices.psd1
1/14/2020 2:47:41 PM [NORMAL] - Language server startup failed. 1/14/2020 2:47:41 PM [ERROR] - The language service could not be started: 1/14/2020 2:47:41 PM [ERROR] - Timed out waiting for session file to appear.
Attached Logs
Follow the instructions in the README about capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
|Extension|Author|Version| |---|---|---| |All-Autocomplete|Atishay-Jain|0.0.23| |bracket-pair-colorizer-2|CoenraadS|0.0.29| |powershell|ms-vscode|2019.12.0| |python|ms-python|2020.1.58038| |todo-tree|Gruntfuggly|0.0.162|