vscode-powershell: Powershell: Initialization Error
System Details
- Operating system name and version: Windows 10 - x64 - 10.0.14393
- VS Code version: 1.10.2
- PowerShell extension version: 0.10.1
- Output from
$PSVersionTable: Name Value
PSVersion 5.1.14393.953 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.14393.953 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Issue Description
When I open a file with a recognised ‘Powershell’ extension (.ps1,.psm1,*.psd1 etc) or having typed in some script I tell ‘Code’ that the language is ‘PowerShell’ instead of plain text, I get a notice that says ‘Initialization Error’ in the bottom right hand corner. When I click on it I get an error in the Error bar that says “Error: Could not start language service:” And if I click on the logs I see the following:
[0:2:23] Language server starting… powershell.exe started – pid: 928 exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe args: C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1\scripts\Start-EditorServices.ps1 -EditorServicesVersion ‘0.10.1’ -HostName ‘Visual Studio Code Host’ -HostProfileId ‘Microsoft.VSCode’ -HostVersion ‘0.10.1’ -BundledModulesPath ‘C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1\modules’ -EnableConsoleRepl -LogLevel ‘Verbose’ -LogPath ‘C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1\logs\1490227343-bdec66a5-f1e8-4d56-9ce5-5e057642a56f1490227309017\EditorServices.log’ -SessionDetailsPath ‘C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1\sessions\PSES-VSCode-10944’
powershell.exe terminated or terminal UI was closed
[0:3:23] Language server startup failed. Could not start language service: Timed out waiting for session file to appear.
Now… I’m in a Domain environment where our Security Policy forced down from ‘on high’ by Group Policy is that we’re in an allsigned environment. I have tried Code and the Powershell Extension on a number of machines now and I always get the same experience.
Incidentally, it appears that the module files: modules\Plaster\Templates\NewPowerShellManifestModule\Module.psm1 modules\Plaster\Templates\NewPowerShellManifestModule\test\Module.T.ps1 are not signed - I don’t know if this is related.
Attached Logs
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 43 (15 by maintainers)
Commits related to this issue
- Only check ipv4 addresses for port availlability during PSES startup Fix #603 where system has ipv6 addresses disabled. This is also more consistent with the PSES TCP listener which always [IPAddres... — committed to PowerShell/vscode-powershell by rkeithhill 6 years ago
- Only check ipv4 addresses for port availlability during PSES startup (#1281) Fix #603 where system has ipv6 addresses disabled. This is also more consistent with the PSES TCP listener which always... — committed to PowerShell/vscode-powershell by rkeithhill 6 years ago
@amitbha The fix will be included in the next release - going out next week.
Yup and this proves that one of the two primary address families may not be available on a machine. Now need to fix it to handle that case without failing. 😃
@tylerl0706
Thanks for your patience. This code exactly find where the problem is:
Line 6 throws the exception:
I remember that, I disabled ipv6 on all network interfaces in sysctl.conf like this:
net.ipv6.conf.all.disable_ipv6 = 1So, bug or not?
Oooop. No Keith, that’s my bad - I manually edited that output to obfuscate my username in this publicly visible post…