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

PowerShell extension 2.0.1. preview 2 fails to load #1841

Closed
TheUntouchable opened this issue Apr 3, 2019 · 5 comments
Closed

PowerShell extension 2.0.1. preview 2 fails to load #1841

TheUntouchable opened this issue Apr 3, 2019 · 5 comments

Comments

@TheUntouchable
Copy link

TheUntouchable commented Apr 3, 2019


### OS: WinSrv 2016 1607

### VSCode version: 1.32.3 a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4 x64

### VSCode extensions:

DotJoshJohnson.xml@2.4.0
ms-vscode.powershell-preview@2.0.1


### PSES version:

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      5.1.14393.2828
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.2828
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

After installing the latest preview, I got the following errors:

  1. PowerShell Intergrated Console:
    An error occurred while starting PowerShell Editor Services:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List`1 generatedTypes)
   at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()
  1. After some time I got that error message:
2019-4-3 10:27:21 [NORMAL] - Visual Studio Code v1.32.3 64-bit
2019-4-3 10:27:21 [NORMAL] - PowerShell Extension v2.0.1
2019-4-3 10:27:21 [NORMAL] - Operating System: Windows 64-bit
2019-4-3 10:27:21 [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
2019-4-3 10:27:21 [NORMAL] - Language server starting --
2019-4-3 10:27:21 [NORMAL] -     exe: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
2019-4-3 10:27:21 [NORMAL] -     args: C:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2.0.1' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'C:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\logs\1554280041-8377f28a-d51c-4b22-95f5-5430daa0a9df1554280038778\EditorServices.log' -SessionDetailsPath 'C:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\sessions\PSES-VSCode-13828-457692' -FeatureFlags @()
2019-4-3 10:27:21 [NORMAL] - powershell.exe started, pid: 1624
2019-4-3 10:29:21 [NORMAL] - Language server startup failed.
2019-4-3 10:29:21 [ERROR] - The language service could not be started: 
2019-4-3 10:29:21 [ERROR] - Timed out waiting for session file to appear.

1.X extension is not installed.

@TylerLeonhardt
Copy link
Member

Thanks for the info! Can you also attach the logs here so we can get a better idea of what's going on?

@TheUntouchable
Copy link
Author

Sadly I can only reproduce that error at work.. And the next time I am there is on monday.. :(

@TheUntouchable
Copy link
Author

TheUntouchable commented Apr 10, 2019

This is all I could get, hope it helps!

VERBOSE: 
#-- Console Encoding ---------------------------------------------------------
VERBOSE: System.Text.ASCIIEncoding
VERBOSE: 
#-- Updated PSModulePath to: -------------------------------------------------
VERBOSE: C:\Users\admbloechmi\Documents\WindowsPowerShell\Modules
VERBOSE: C:\Program Files\WindowsPowerShell\Modules
VERBOSE: C:\Windows\system32\WindowsPowerShell\v1.0\Modules
VERBOSE: C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules
VERBOSE: c:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules
VERBOSE: 
#-- Check required modules available -----------------------------------------
VERBOSE: Testing module availability PowerShellGet 
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1'.
VERBOSE: PowerShellGet  found
VERBOSE: 
#-- Start up PowerShellEditorServices ----------------------------------------
VERBOSE: Importing PowerShellEditorServices
VERBOSE: Loading module from path 'C:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'.
VERBOSE: Loading module from path 'C:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules\PowerShellEditorServices\PowerShellEditorServices.psm1'.
VERBOSE: ERRORS caught starting up EditorServicesHost
VERBOSE: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List`1 generatedTypes)
   at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()

An error occurred while starting PowerShell Editor Services:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List`1 generatedTypes)
   at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()
2019-4-10 10:18:57 [NORMAL] - Visual Studio Code v1.33.0 64-bit
2019-4-10 10:18:57 [NORMAL] - PowerShell Extension v2.0.1
2019-4-10 10:18:57 [NORMAL] - Operating System: Windows 64-bit
2019-4-10 10:18:57 [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
2019-4-10 10:18:57 [NORMAL] - Language server starting --
2019-4-10 10:18:57 [NORMAL] -     exe: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
2019-4-10 10:18:57 [NORMAL] -     args: c:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2.0.1' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\modules' -EnableConsoleRepl -LogLevel 'Diagnostic' -LogPath 'c:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\logs\1554884337-d7e6642a-cac6-4cd0-99a6-6c8c545b621a1554884274977\EditorServices.log' -SessionDetailsPath 'c:\Users\admbloechmi\.vscode\extensions\ms-vscode.powershell-preview-2.0.1\sessions\PSES-VSCode-4356-606738' -FeatureFlags @()
2019-4-10 10:18:57 [NORMAL] - powershell.exe started, pid: 13924
2019-4-10 10:20:57 [NORMAL] - Language server startup failed.
2019-4-10 10:20:57 [ERROR] - The language service could not be started: 
2019-4-10 10:20:57 [ERROR] - Timed out waiting for session file to appear.

@SydneyhSmith
Copy link
Collaborator

@TheUntouchable This might be caused by anti-virus, which we'll have a fix for in the coming release. See #1831

However, the specific assembly/type loading problem looks like it might not be caused by that. To get the reason why it's failing, you'll need to collect a fusion log using these instructions. That should give you a pretty good explanation of precisely why the assembly isn't loading. Please try that and let us know here.

@SydneyhSmith
Copy link
Collaborator

Closing this issue as inactive, will re-open if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants