-
Notifications
You must be signed in to change notification settings - Fork 513
Could not start language service #3227
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
Comments
Exact same thing happening for me with the latest powershell extension update. Here is my log:
|
Not sure if this will help anyone else. But I was able to solve this by doing the following:
After I did that, the errors went away. Not sure if it was the VS Code reinstall that fixed it or what. |
Correction, closed VS Code and re-opened another .ps1 file, and issue is back. |
I'm seeing this similar issue on MacBook (macOS Big Sur 11.2.2) since updating yesterday to VSCode 1.54.1 (not certain if extension also updated at the same time, but it is v2021.2.2). Narrowed my problem down to the setting "workbench.startupEditor": "newUntitledFile". By setting this to "none" or "welcomePage" I do not see the issue. I can open .PS1 etc and the Integrated Console works fine. I am not seeing this issue on any of my Windows machines. |
Me too. Windows 10, only a user installation of Visual Studio Code with previously open .ps1 files, problem also started after update to 1.5.4.1 and persisted through VS Code restarts. Uninstall and (user) reinstall seems to have cleared the issue. |
Issue Type: Bug Since the most recent VSCode update, PowerShell now fails to load at startup. VSCode version
PowerShell startup logs
VS Code version: Code 1.54.1 (f30a9b73e8ffc278e71575118b6bf568f04587c8, 2021-03-04T22:38:31.419Z) System Info
Extensions (2)
A/B Experiments
|
Hi There,
un- and reinstall Visual Studio Code solved the problem for me (W10).
Regards
Detlef Michler
Von: Jeff Bowman <[email protected]>
Gesendet: Sonntag, 7. März 2021 01:28
An: PowerShell/vscode-powershell <[email protected]>
Cc: IT <[email protected]>; Author <[email protected]>
Betreff: Re: [PowerShell/vscode-powershell] Could not start language service (#3227)
Issue Type: Bug
Since the most recent VSCode update, PowerShell now fails to load at startup.
VSCode version
Version: 1.54.1 (user setup)
Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8
Date: 2021-03-04T22:38:31.419Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19042
PowerShell startup logs
3/5/2021 6:09:39 PM [NORMAL] - Visual Studio Code v1.54.1 64-bit
3/5/2021 6:09:39 PM [NORMAL] - PowerShell Extension v2021.2.2
3/5/2021 6:09:39 PM [NORMAL] - Operating System: Windows 64-bit
3/5/2021 6:09:39 PM [NORMAL] - Language server starting --
3/5/2021 6:09:39 PM [NORMAL] - PowerShell executable: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
3/5/2021 6:09:39 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.2.2' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.2.2 <=====
' -LogLevel 'Normal' -LogPath 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\logs\1615000179-2421435c-f00a-4631-8137-216a2f9766e01615000169526\EditorServices.log' -SessionDetailsPath 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\sessions\PSES-VSCode-13416-430208' -FeatureFlags @()
3/5/2021 6:09:39 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.2.2' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.2.2 <=====
' -LogLevel 'Normal' -LogPath 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\logs\1615000179-2421435c-f00a-4631-8137-216a2f9766e01615000169526\EditorServices.log' -SessionDetailsPath 'c:\Users\Work\.vscode\extensions\ms-vscode.powershell-2021.2.2\sessions\PSES-VSCode-13416-430208' -FeatureFlags @()
3/5/2021 6:09:39 PM [NORMAL] - powershell.exe started.
3/5/2021 6:09:39 PM [NORMAL] - Waiting for session file
3/5/2021 6:09:41 PM [NORMAL] - Session file found
3/5/2021 6:09:41 PM [NORMAL] - Registering terminal close callback
3/5/2021 6:09:41 PM [NORMAL] - Registering terminal PID log callback
3/5/2021 6:09:41 PM [NORMAL] - powershell.exe PID: 21400
3/5/2021 6:09:41 PM [NORMAL] - Language server started.
3/5/2021 6:09:41 PM [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\\\.\\pipe\\PSES_zxrkrteq.iku","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_se3oujrs.ani"}
3/5/2021 6:09:41 PM [NORMAL] - Connecting to language service on pipe \\.\pipe\PSES_zxrkrteq.iku...
3/5/2021 6:09:41 PM [NORMAL] - Language service connected.
3/5/2021 6:09:42 PM [ERROR] - Could not start language service:
3/5/2021 6:09:42 PM [ERROR] - Error: Connection to server got closed. Server will not be restarted.
VS Code version: Code 1.54.1 (f30a9b73e8ffc278e71575118b6bf568f04587c8, 2021-03-04T22:38:31.419Z)
OS version: Windows_NT x64 10.0.19042
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz (4 x 1995)
GPU Status
2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg)
undefined
Memory (System)
15.90GB (4.32GB free)
Process Argv
--crash-reporter-id e69e24da-8cea-4231-bfc0-80f4f0d6711b
Screen Reader
no
VM
0%
Extensions (2)
Extension
Author (truncated)
Version
powershell
ms-
2021.2.2
code-settings-sync
Sha
3.4.3
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspyt653:30253241
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vstry914:30256638
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
dockersubsetcf:30265999
pythontb:30265425
vspre833:30267464
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPowerShell%2Fvscode-powershell%2Fissues%2F3227%23issuecomment-792129655&data=04%7C01%7Cdetlef.michler%40bayernheim.de%7C08c417e14b8640f5b69b08d8e0ffe5a9%7C79340ae4ba554d859ae0943d27f3d590%7C0%7C0%7C637506736979589488%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dYDTqBn9ZNgk20Yql6sy16WOp%2FPq4l4lFUHKNVgs9Uk%3D&reserved=0>, or unsubscribe<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAR7LZWVGXY5PXVQM3HL4XIDTCLCB3ANCNFSM4YVDE7BQ&data=04%7C01%7Cdetlef.michler%40bayernheim.de%7C08c417e14b8640f5b69b08d8e0ffe5a9%7C79340ae4ba554d859ae0943d27f3d590%7C0%7C0%7C637506736979599445%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2F5GANqrvJU7cl1ntWowEUAziUT8zHc7AbsBxunUw5vY%3D&reserved=0>.
|
I can confirm this happens with the zipped version of vscode 1.54.1 as well so it's not an uninstall/install issue. I am reverting back to 1.53 until this is resolved. |
This is likely an issue in VS Code which will be fixed in the next recovery release. As a workaround, you can set this:
That will give you language features (like intellisense and whatnot) but it won't show the PowerShell Integrated Console. |
Here's the issue I'm thinking that's causing this: microsoft/vscode#117649 I also expect restarting the server manually should fix the problem, if that's possible. |
Yeah it's worth trying... hit the trash can and then Yes on the dialog that says "Do you want to restart the server" |
Pardon me... "trash can?" |
If I could find that I'd feel a lot better 🙂 |
Funny... I looked everywhere but there. |
That seems to do the trick. I'll still roll back to 1.53 at your request, though. Tomorrow. |
At this point, you don't need to. You can if you want, but I think we know the issue. |
OK, thanks. Keep up the good work. |
Could you give us a hint on when to expect this to be deployed? So I could decide whether to roll back or wait for a patch. Thank you in advance. |
We're planning on releasing 1.54.2 today |
Just adding what I had to do for a fix on a new laptop where my entire user profile was migrated from old to new (un-desired btw). To add to confusion, vscode auto-upgrade on old laptop had failed a few weeks prior which left code.exe in a directory starting with an underscore; though still usable. note: just documenting chain of events, obviously some of these steps are likely unrelated and also i have more areas i need to cleanup. Problem steps from new windows(corporate) install:
Language Error encountered. Steps to resolve:
fixed! I spent a good few hours trying to validate my non-default terminal settings (even retyping most of them in setting json), perhaps I missed something or perhaps the extensions directory was all that needed to be cleared after the first few times i uninstalled/reinstalled powershell extension; which in those attempts I did not close vscode. |
For what its worth - the root cause I found for this occuring on my machine is that a version mismatch of the powershell version the VS Code extension required and the powershell version installed on the machine. The extension required powershell core 7, but installed on my machine was powershell core 6 The .net core runtime of powershell 6 vs. 7 was different and therefore the shell was unable to load the "System.Runtime" assemblies when executing import-module @ $HOME.vscode\extensions\ms-vscode.powershell-*/PowerShellEditorServices.psd1 The "could not load file or assembly" error was not having an issue locating the .psd1 module file, but could not load the .net core runtime it depends on because the shell environment was already running in an older .net core runtime. About the screenshot |
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. |
@bvandermeide nice catch! FYI that Powershell 6 is no longer supported or tested, so def get on that 7 train, however you can choose which version the PSIC works with via the green version toggle on the lower right (5.1, 7, 7-preview, etc.) |
I had thought about adding a check to warn users of PowerShell 6, but this confirms my suspicion that it wouldn't really work since it won't even start to begin with. Thanks for following up with us @bvandermeide! |
Issue Type: Bug
When starting Visual Studio Code the powershell extension try to start but abort with "Could not start language service". The log is as following:
5.3.2021 13:02:09 [NORMAL] - Visual Studio Code v1.54.1 64-bit
5.3.2021 13:02:09 [NORMAL] - PowerShell Extension v2021.2.2
5.3.2021 13:02:09 [NORMAL] - Operating System: Windows 64-bit
5.3.2021 13:02:09 [NORMAL] - Language server starting --
5.3.2021 13:02:09 [NORMAL] - PowerShell executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
5.3.2021 13:02:09 [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.2.2' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.2.2 <=====
' -LogLevel 'Normal' -LogPath 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\logs\1614945729-5a0d4503-6a39-4dec-aeb3-72c88f85c95e1614945727555\EditorServices.log' -SessionDetailsPath 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\sessions\PSES-VSCode-19924-563080' -FeatureFlags @()
5.3.2021 13:02:09 [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.2.2' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.2.2 <=====
' -LogLevel 'Normal' -LogPath 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\logs\1614945729-5a0d4503-6a39-4dec-aeb3-72c88f85c95e1614945727555\EditorServices.log' -SessionDetailsPath 'c:\Users\MichlerDetlef.vscode\extensions\ms-vscode.powershell-2021.2.2\sessions\PSES-VSCode-19924-563080' -FeatureFlags @()
5.3.2021 13:02:09 [NORMAL] - powershell.exe started.
5.3.2021 13:02:09 [NORMAL] - Waiting for session file
5.3.2021 13:02:11 [NORMAL] - Session file found
5.3.2021 13:02:11 [NORMAL] - Registering terminal close callback
5.3.2021 13:02:11 [NORMAL] - Registering terminal PID log callback
5.3.2021 13:02:11 [NORMAL] - powershell.exe PID: 16004
5.3.2021 13:02:11 [NORMAL] - Language server started.
5.3.2021 13:02:11 [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\.\pipe\PSES_jpn22lfr.er0","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\.\pipe\PSES_n4mtsiym.yhz"}
5.3.2021 13:02:11 [NORMAL] - Connecting to language service on pipe \.\pipe\PSES_jpn22lfr.er0...
5.3.2021 13:02:11 [NORMAL] - Language service connected.
5.3.2021 13:02:12 [ERROR] - Could not start language service:
5.3.2021 13:02:12 [ERROR] - Error: Connection to server got closed. Server will not be restarted.
Extension version: 2021.2.2
VS Code version: Code 1.54.1 (f30a9b73e8ffc278e71575118b6bf568f04587c8, 2021-03-04T22:38:31.419Z)
OS version: Windows_NT x64 10.0.19042
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: