-
Notifications
You must be signed in to change notification settings - Fork 511
The Language Service Could not be started #2526
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
This is at least a reasonable sign that it's some we might be able to fix. We've seen other issues like this where an OS update causes issues. It looks like this is a session file issue but we don't log enough information to discern the problem. It might be available in VSCode's own logs (try the |
I'm glad it looks fixable. I've tried uninstalling/re-installing several times. Looks like it happened with the update for March. (I even tried installing an older version. Appreciate your help.
|
The application hangs as soon as I install the powershell ext so I have to keep it disabled. -FYI |
Hmmm, I don't see anything of use in there (unfortunately VSCode's own logs are quite opaque). Could you try installing the (zipped) VSIX I linked above? Can do it like this:
You'll then need to disable the PowerShell extension (because the VSIX is a "PowerShell Preview" extension) and restart VSCode. Hopefully that will log the reason for startup failure. The hang you're seeing may well be #2377, which is a VSCode bug we're still waiting on a fix for. |
I dont see the link. The hang is more when the extension is trying to be loaded, that's what happens. |
I've already tried the Powershell preview ext and get the same behavior. |
The link is in this comment: #2526 (comment) |
I started seeing the same issue today, possibly right after VSCode autoupdated. If I run the launch command from a regular command prompt here's the error I get;
|
@rjmholt Where do I place the psvsix.zip so code can unzip and install? |
After a little more investigation I think the issue might be the use of According to this source; By default, only the following variables are permitted in RestrictedLanguage mode: $PSCulture $PSScriptRoot I am not using PowerShell Core; Name Value PSVersion 4.0 That said, when I change line 12 of the psd1 from RootModule = if ($PSEdition -eq 'Core')
{
'bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll'
}
else
{
'bin/Desktop/Microsoft.PowerShell.EditorServices.Hosting.dll'
} to
I don't see the error but the terminal window displays the text below but never finishes loading.
|
@spidey323 You need to unzip it yourself and then install the VSIX in code or through PowerShell. Try running this in PowerShell: expand-archive ./psvsix.zip ./psext.vsix
code --install-extension ./psext.vsix |
@happywino you're using PowerShell 4, which the PowerShell extension no longer supports. Even changing the manifest, PSES won't load properly because PSReadLine does not support PowerShell 4. The |
Ouch, so what version of the extension should I install and use given I
have no control of the powershell version installed on my environment?
…On Fri, Mar 6, 2020, 4:52 PM Robert Holt ***@***.***> wrote:
PSVersion 4.0
@happywino <https://github.com/happywino> you're using PowerShell 4,
which the PowerShell extension no longer supports
<#1310>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2526?email_source=notifications&email_token=ADRA3LTFZKMO7VINL2R4V2DRGGLEBA5CNFSM4LDF2SYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEODJQYI#issuecomment-596023393>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADRA3LWRYSKTVFOY2JZPZITRGGLEBANCNFSM4LDF2SYA>
.
|
In the extensions pane click on the gear: and choose the one right before the last one. That said... I would highly recommend pushing on those that do have control to upgrade to Windows PowerShell 5.1 (in-place upgrade)... or better yet, go get PowerShell 7 which is a side-by-side install with Windows PowerShell and has the best experience with the vscode extension. |
Guys, I noticed that the PowerShell extension was giving an error when opening a .ps1 file, so I uninstalled it, closed vscode and tried to install again, I couldn't, now it's not possible to install, see the generated log. |
@rjmholt : This appears to be an issue. Do we wait for a fix or what's the next action plan? |
Can you also attach the logs for the PowerShell extension here so we can get a better idea of what's going on? Please make sure you enable Diagnostic logging:
|
1583783706-7a4eb4ff-6b52-4f10-809c-1f499e45a07d1583783704111.zip |
@lincolnzocateli those logs look like something Visual Studio might create, which is where the VSIX tries to install itself if you double click on it. How are you installing the PowerShell extension? The best way is to find it in the VSCode marketplace and install it directly by clicking on the install button |
@mmascolino that does match the OP's log issue. Can you try installing this VSIX (you will need to unzip it and then install it into VSCode, disable the PowerShell extension and make sure that one is picked up as |
We currently need more information to reproduce this issue. Without that information, we're unable to fix it, since we haven't been able to reproduce this issue in our environments. If you're able to install this VSIX and send the same logs to us again, that would help us resolve this issue. |
I think this is #2538. Going to use that issue, since there's good info in there |
Another Avecto DefendPoint victim here. Same issue. I'm going to make a bunch of noise here and see if I can get someone to rattle Avecto's cage and push for a fix. |
I've run some troubleshooting for Avecto and they remoted into my machine late last week to investigate. Hoping to have a resolution from them yet this week, or at least a plan. They think it's something in the rules, but I suspect the problem is deeper than that. Creating a rule that elevates code.exe and all subprocesses helps a lot, but does not fix the problem. However with that rule in place x64 powershell starts in under two minutes on my machine, without it powershell basically won't start at all. |
@EdCallahan would you happen to have a ticket number with the Avecto folks? I'm having a hard time getting traction here so I'd like to hand my people a ready-made support call -- they're giving me a hard time when I ask them to escalate to somebody who has Avecto's phone number. :-( |
@richardm1 Yes: CS0879827 I'm disappointed I haven't heard back from them yet. There were some lost communications at first, and a switch in who was handling the ticket. And I was away for a week. But the guy I finally worked with when he remoted into my machine seemed very competent, and was going to reproduce the problem on a test box. I haven't heard if he succeeded or not, or if there's been headway in finding a solution. I will report here when I hear something. |
Adding a link to a comment made in another issue in case it might be helpful for users here: |
@rjmholt @richardm1 @TylerLeonhardt @tastrsks Avecto/BeyondTrust got back to me yesterday. Creating a workstyle that allows code.exe and all subprocesses to execute, either passive or with added admin rights, typically gets my powershell server to start within two minutes. Avecto experimented with our policy set and found if we moved that workstyle farther up to be processed before some other workstyles, that delay was down to 20 seconds. This solution seems specific to our policy set, and to me does not resolve the problem. I've pushed back on Avecto for a better solution. Powershell 5.1 x86 and Powershell 7 seem unaffected. But in a corporate environment where developers are afflicted with BeyondTrust/Avecto Privilege Guard, I'm not sure VS Code is a viable platform for 5.1 x64 development. Getting the corporate security team to experiment with the Avecto policies to get things running, let alone get BeyondTrust to dig into them, is beyond most developers. |
Thanks @EdCallahan that is really helpful information, I think in order for us to move forward we likely need to better understand BeyondTrust/Avecto....we'd be happy to follow up with your support contacts there...if you are interested in following up with us send an email to [email protected] and we will figure out what the next steps are....thanks! |
BeyondTrust recommended I update to version 5.6.126, and similarly to what was reported at #2014 (comment)] I got dramatically better results. I did continue to have sporadic lockups starting PowerShell 5.1 x64 servers, and sometimes x86 as well. However, reordering my workstyles combined with upgrading seems to have fixed things. Although I haven't worked under this configuration for long. @SydneyhSmith, I passed on that email address to BeyondTrust. |
I've spoken with one of my company's Avecto SMEs and apparently there is a memory leak, that's been present in the client since November, so we can't upgrade at the moment. I've tried setting the extension to x86, with no luck. Is there anything from VSCode / extension side that we can do, whilst we wait for Avecto? Thanks. |
I have the same problem with Powershell language service on VSCode. |
I had a same issue (Avecto on business laptop) and last night found a solution. |
Visual Studio Code v1.54.1 64-bit 3/6/2021 4:47:38 PM [ERROR] - Could not start language service: Same thing has happened again. |
Same for me |
And for me For what it's worth and maybe it can help narrowing down the issue:
which I found here: I use Powershell 5.1 and 7.1.2 side by side and applied the above for both versions and both elevated and non elevated. |
I've got this same error message. It looks like it's not liking PowerShell 5.1 somehow. |
@JoeBrunsTR @kihtov23 @ZonderP @AkosBatorfi Thanks for your reports. Please note that "The Language Service Could not be started" is a generic message indicating the extension could not communicate with the language server. This particular GitHub issue was closed last year as it was a different bug report, and the issue with the Visual Studio Code 1.54 update is actually #3227. Please use caution in commenting on old, closed issues; most likely you need to find an existing open issue, or open a new issue. The good news is that the issue with VS Code has been resolved microsoft/vscode#117649 and will be in the next VS Code release. |
I have recently been experiencing the same thing. I am a daily, professional user of VS code and the PS extension, and since monday last week (10 days ago) it stopped working. I have tried reinstalling both VS code and the PS extension, and downdraded the extension to a previous version to no avail. However, whenright-klicking on the PS status in the bottom right corner and selecting "Restart current session", it starts up nicely in PS 5.1. |
@h4tt3n Please see the comment above yours, thanks! #2526 (comment) |
The extension wont even load so I can't get the PSVersion.
Everything was working fine until the update of the powershell extension.
Issue Description
The text was updated successfully, but these errors were encountered: