Skip to content

Language server fails to start in macOS #3898

@dlnash18

Description

@dlnash18

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When starting the extension, the language server does not start. VS Code gives up after four minutes and logs an error. This is the same symptom as described in #3782 and #3894, but I have an Intel Mac and I'm not using brew, starship, or fig as mentioned in those other two. I installed .NET via the macOS installer, and then installed PowerShell as a global tool. I am using macOS 12.3, which I know is untested as per PowerShell Support Lifecycle.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Darwin 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:49.188Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.4.0

Extension Version

ms-vscode.powershell-2021.12.0

Steps to Reproduce

  1. Start with a fresh install of VS Code on macOS.
  2. Install the PowerShell extension and no others.
  3. Start the PowerShell extension.

Expected result

Extension and language server successfully start up.

Observed behavior

VS Code gives up and logs an error after four minutes waiting for the language server:

The language service could not be started:
Error: Timed out waiting for session file to appear.

Despite pwsh started appearing in the log, no pwsh process ever appears as observed by ps -ef | grep pwsh. However, one could have appeared and exited before I could see it.

If I dig the command line out of vscode-powershell.log and run it manually while VS Code is waiting for the language server, then VS Code successfully connects to it. However, I can't get to VS Code's built-in terminal to run the command, so I must do so in Terminal.app.

Visuals

No response

Logs

This is with diagnostic level logging turned on:

3/29/2022 6:54:02 PM [NORMAL] - Language server starting --
3/29/2022 6:54:02 PM [NORMAL] -     PowerShell Editor Services args: Import-Module '/Users/dlnash/.vscode/extensions/ms-vscode.powershell-2021.12.0/modules/PowerShellEditorServices/PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2021.12.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath '/Users/dlnash/.vscode/extensions/ms-vscode.powershell-2021.12.0/modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.12.0 <=====
' -LogLevel 'Diagnostic' -LogPath '/Users/dlnash/.vscode/extensions/ms-vscode.powershell-2021.12.0/logs/1648598042-915970d2-5399-44fa-9bc9-b9d90285a4351648597854493/EditorServices.log' -SessionDetailsPath '/Users/dlnash/.vscode/extensions/ms-vscode.powershell-2021.12.0/sessions/PSES-VSCode-37185-897582' -FeatureFlags @() 
3/29/2022 6:54:02 PM [NORMAL] - pwsh started.
3/29/2022 6:54:02 PM [NORMAL] - Waiting for session file
3/29/2022 6:54:02 PM [NORMAL] -     PowerShell executable: /Users/dlnash/.dotnet/tools/pwsh
3/29/2022 6:54:02 PM [NORMAL] -     PowerShell args: -NoProfile -NonInteractive -EncodedCommand SQBtAHAAbwByAHQALQBNAG8AZAB1AGwAZQAgACcALwBVAHMAZQByAHMALwBkAGwAbgBhAHMAaAAvAC4AdgBzAGMAbwBkAGUALwBlAHgAdABlAG4AcwBpAG8AbgBzAC8AbQBzAC0AdgBzAGMAbwBkAGUALgBwAG8AdwBlAHIAcwBoAGUAbABsAC0AMgAwADIAMQAuADEAMgAuADAALwBtAG8AZAB1AGwAZQBzAC8AUABvAHcAZQByAFMAaABlAGwAbABFAGQAaQB0AG8AcgBTAGUAcgB2AGkAYwBlAHMALwBQAG8AdwBlAHIAUwBoAGUAbABsAEUAZABpAHQAbwByAFMAZQByAHYAaQBjAGUAcwAuAHAA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BoAC8ALgB2AHMAYwBvAGQAZQAvAGUAeAB0AGUAbgBzAGkAbwBuAHMALwBtAHMALQB2AHMAYwBvAGQAZQAuAHAAbwB3AGUAcgBzAGgAZQBsAGwALQAyADAAMgAxAC4AMQAyAC4AMAAvAGwAbwBnAHMALwAxADYANAA4ADUAOQA4ADAANAAyAC0AOQAxADUAOQA3ADAAZAAyAC0ANQAzADkAOQAtADQANABmAGEALQA5AGIAYwA5AC0AYgA5AGQAOQAwADIAOAA1AGEANAAzADUAMQA2ADQAOAA1ADkANwA4ADUANAA0ADkAMwAvAEUAZABpAHQAbwByAFMAZQByAHYAaQBjAGUAcwAuAGwAbwBnACcAIAAtAFMAZQBzAHMAaQBvAG4ARABlAHQAYQBpAGwAcwBQAGEAdABoACAAJwAvAFUAcwBlAHIAcwAvAGQAbABuAGEAcwBoAC8ALgB2AHMAYwBvAGQAZQAvAGUAeAB0AGUAbgBzAGkAbwBuAHMALwBtAHMALQB2AHMAYwBvAGQAZQAuAHAAbwB3AGUAcgBzAGgAZQBsAGwALQAyADAAMgAxAC4AMQAyAC4AMAAvAHMAZQBzAHMAaQBvAG4AcwAvAFAAUwBFAFMALQBWAFMAQwBvAGQAZQAtADMANwAxADgANQAtADgAOQA3ADUAOAAyACcAIAAtAEYAZQBhAHQAdQByAGUARgBsAGEAZwBzACAAQAAoACkAIAA=
3/29/2022 6:54:02 PM [VERBOSE] - <qo>: Unable to send getCommand request
3/29/2022 6:58:02 PM [NORMAL] - Timed out waiting for session file to appear.
3/29/2022 6:58:02 PM [NORMAL] - Language server startup failed.
3/29/2022 6:58:02 PM [ERROR] - The language service could not be started: 
3/29/2022 6:58:02 PM [ERROR] - Error: Timed out waiting for session file to appear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions