Skip to content
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

Language server fails to start when workspace has ephemeral directories #3490

Closed
4 tasks done
dualmoon opened this issue Jul 30, 2021 · 1 comment
Closed
4 tasks done
Labels
Issue-Bug A bug to squash. Resolution-Answered Will close automatically.

Comments

@dualmoon
Copy link

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 have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

I believe this may be similar to #2491. I was connected to a samba share and working on some various files. I closed my Macbook and a couple days later came back to do some other work. The samba share was no longer available at this time. The Powershell extension failed to load and gave the message "timed out waiting for session file to appear". Per #2417 I tried to run:

pwsh -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "$PSES_BUNDLE_PATH/PowerShellEditorServices/Start-EditorServices.ps1 -BundledModulesPath $PSES_BUNDLE_PATH -LogPath $SESSION_TEMP_PATH/logs.log -SessionDetailsPath $SESSION_TEMP_PATH/session.json -FeatureFlags @() -AdditionalModules @() -HostName 'My Client' -HostProfileId 'myclient' -HostVersion 1.0.0 -LogLevel Diagnostic"

It got partway through but then hung at "Starting server, deregistering host logger and registering shutdown listener"

I couldn't Ctrl+C the process or anything, had to use another term tab to killall -9 pwsh. More searching led me to #2491. Someone there mentioned something about maybe number of files in the workspace, which reminded me that I had also gotten an error about the samba mount being unavailable. I closed the workspace entirely, then closed and reopened Code again and Powershell's lang server loaded without issue.

Obviously this is a super minor edge case but I wanted to mention it just in case there was some error checking that could be added. I'm not entirely sure why this fixed it but it did! I wouldn't think the lang server would care about workspaces or files generally when initializing the lang server but apparently it does!

Please let me know if I can provide any additional info. Obviously I'm fine now but I just want to help where I can :)

PowerShell Version

PS /Users/luna> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Darwin 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS /Users/luna>

Visual Studio Code Version

PS /Users/luna> code --version
1.58.2
c3f126316369cd610563c75b1b1725e0679adfb3
x64
PS /Users/luna>

Extension Version

ms-vscode.powershell@2021.5.1
PS /Users/luna> code --list-extensions --show-versions | Select-String powershell

ironmansoftware.powershellprotools@5.29.4
ms-vscode.powershell@2021.6.2

PS /Users/luna>

Steps to Reproduce

  1. Open an ephemeral folder in the workspace
  2. Close Code
  3. Disconnect ephemeral folder (in my case a SMB mount)
  4. Open Code

Visuals

No response

Logs

No response

@dualmoon dualmoon added the Issue-Bug A bug to squash. label Jul 30, 2021
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jul 30, 2021
@andyleejordan
Copy link
Member

Hey, thanks for the info, but unfortunately this seems like it'll be nigh-impossible to reproduce adequately enough to fix, and as you said, it's quite the edge case. I'm going to mark this as resolved (won't fix) if you don't mind. The "numerous files in workspace" issue #3307 is still open and pending investigation, which if solved would potentially solve this issue too.

@andyleejordan andyleejordan added Resolution-Answered Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Aug 3, 2021
@ghost ghost closed this as completed Aug 5, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Resolution-Answered Will close automatically.
Projects
None yet
Development

No branches or pull requests

2 participants