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 should give a helpful error message when started in ConstrainedLanguage mode #421

Closed
sir-Higgins opened this issue Jan 6, 2017 · 2 comments
Assignees
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@sir-Higgins
Copy link

System Details

  • Operating system name and version: Windows 10 1607 (14293.576)
  • VS Code version: 1.8.1
  • PowerShell extension version: 0.8.0
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.1.14393.576
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.576
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

When I open a .ps1 Script
there is three messages on top of the windows

  • Could not start language service:
  • Couldn't start client PowerShell Editor Service
  • PowerShell could not be started, click 'Show Logs for more details.

Attached Logs

logs.zip

@daviwil
Copy link
Contributor

daviwil commented Jan 6, 2017

Judging from the logs, it appears that your computer is configured with the ConstrainedLanguage mode which makes it impossible to start the language server. I'll add an extra check for this in the startup process so that I can give a helpful error message in this case.

@daviwil daviwil added the Issue-Bug A bug to squash. label Jan 6, 2017
@daviwil daviwil changed the title could not start language service: vscode-powershell 0.8.0 and vscode 1.8.1 Language server should give a helpful error message when started in ConstrainedLanguage mode Jan 6, 2017
@daviwil daviwil added this to the 0.9.0 milestone Jan 6, 2017
@daviwil daviwil self-assigned this Jan 6, 2017
@sir-Higgins
Copy link
Author

sir-Higgins commented Jan 6, 2017

ConstrainedLanguage is set in powershell when you activate applocker rules in windows 10 and powershell v5
https://www.sysadmins.lv/blog-en/powershell-50-and-applocker-when-security-doesnt-mean-security.aspx

I had an applocker rule that was still applied after a GPO change
https://technet.microsoft.com/en-us/library/hh310286(v=ws.10).aspx

After removing the applocker rules the language service started correctly.

@daviwil daviwil modified the milestones: 0.9.0, 0.9.1 Jan 18, 2017
@daviwil daviwil modified the milestones: 0.9.1, 0.10.1 Mar 14, 2017
daviwil added a commit that referenced this issue Mar 16, 2017
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.
Projects
None yet
Development

No branches or pull requests

2 participants