Skip to content

The language service could not be started: #2119

@ghost

Description

Issue: pwsh extension doesn't work because error "The language service could not be started", read all issues related (#1360, #1957, #1423, #340) and cannot solve the issue.

Log ("powershell.developer.editorServicesLogLevel": "Diagnostic"):

8/4/2019 8:59:11 PM [NORMAL] - Language server starting --
8/4/2019 8:59:11 PM [NORMAL] -     exe: /opt/powershell-6.2.2-linux-x64/pwsh
8/4/2019 8:59:11 PM [NORMAL] -     args: $HOME/.vscode/extensions/ms-vscode.powershell-2019.5.0/modules/PowerShellEditorServices/Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2019.5.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath '$HOME/.vscode/extensions/ms-vscode.powershell-2019.5.0/modules' -EnableConsoleRepl -LogLevel 'Diagnostic' -LogPath '$HOME/.vscode/extensions/ms-vscode.powershell-2019.5.0/logs/1564970351-698c045b-dcc0-4ef3-9b12-6d907b0819e31564969750767/EditorServices.log' -SessionDetailsPath '$HOME/.vscode/extensions/ms-vscode.powershell-2019.5.0/sessions/PSES-VSCode-11353-672612' -FeatureFlags @()
8/4/2019 8:59:11 PM [NORMAL] - powershell.exe terminated or terminal UI was closed
8/4/2019 8:59:11 PM [NORMAL] - powershell.exe started, pid: 11821
8/4/2019 9:01:11 PM [NORMAL] - Language server startup failed.
8/4/2019 9:01:11 PM [ERROR] - The language service could not be started: 
8/4/2019 9:01:11 PM [ERROR] - Timed out waiting for session file to appear.

VSCode Version: 1.36.1
OS Version: Linux x64 4.19.62-1-MANJARO
PowerShell Extension Version: v2019.5.0
PowerShell Version: Core 6.2.2 Linux x64
$PSVersionTable:

Name                           Value
----                           -----
PSVersion                      6.2.2
PSEdition                      Core
GitCommitId                    6.2.2
OS                             Linux 4.19.62-1-MANJARO #1 SMP PREEMPT Sun Jul 28 09:14:58 UTC 2019
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Notes:
1. VSCode Terminal shows error chdir(2) failed: No such file or Directory.
2. Custom settings:

"powershell.powerShellExePath": "/opt/powershell-6.2.2-linux-x64/pwsh",
"terminal.integrated.shell.linux": "/opt/powershell-6.2.2-linux-x64/pwsh",
"powershell.scriptAnalysis.enable": true 

3. $HOME/.vscode/extensions/ms-vscode.powershell-2019.5.0/modules has PowerShellEditorServices.psd1.
4. Import-Module $HOME/.vscode/extensions/ms-vscode.powershell-2019.5.0/modules/PowerShellEditorServices.psd1 and restart VSCode does't work.
5. pswh from terminal works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions