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

Session errors exist after integrated console opens #575

Closed
Jaykul opened this issue Mar 17, 2017 · 2 comments
Closed

Session errors exist after integrated console opens #575

Jaykul opened this issue Mar 17, 2017 · 2 comments
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@Jaykul
Copy link

Jaykul commented Mar 17, 2017

When I start with no profile, there are two errors already in my session:

S C:\Users\Joel\Projects\Modules> $Error | fl * -f

PSMessageDetails      :
Exception             : System.ArgumentException: Action must be specified for non-forwarded events.
                           at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
TargetObject          :
CategoryInfo          : InvalidArgument: (:) [Register-EngineEvent], ArgumentException
FullyQualifiedErrorId : ACTION_MANDATORY_FOR_LOCAL,Microsoft.PowerShell.Commands.RegisterEngineEventCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 6
PipelineIterationInfo : {}


PSMessageDetails      :
Exception             : System.IO.FileNotFoundException: The specified module 'C:\Program
                        Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded because
                        no valid module file was found in any module directory.
TargetObject          : C:\Program Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1
CategoryInfo          : ResourceUnavailable: (C:\Program File...figuration.psd1:String) [Import-Module], FileNotFoundException
FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      :
PipelineIterationInfo : {0, 1}

This is Windows 10
VS Code Insider 1.11.0-insider
Commit acfe8468e647f6a42c015c47c28610da9aecdce3
Date 2017-03-16T07:46:10.408Z
PowerShell extension 0.10.1

$PSVersiontable

Name                           Value
----                           -----
PSVersion                      5.1.15058.0
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15058.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@bgelens
Copy link

bgelens commented Mar 17, 2017

Repro with 1.10.2 stable and extension 0.10.1. The DSC error also occurs when loading with profile

@daviwil
Copy link
Contributor

daviwil commented Mar 17, 2017

The DSC error is for something that 99.9% of people would never have. I used the wrong ErrorAction on the Import-Module call, will fix it soon.

The other error about event registration is a bug in my psedit code, will fix that too.

@daviwil daviwil added the Issue-Bug A bug to squash. label Mar 17, 2017
@daviwil daviwil added this to the 0.10.2 milestone Mar 17, 2017
@daviwil daviwil changed the title Errors for clean startup of integrated host Session errors exist after integrated console opens Mar 18, 2017
daviwil added a commit to daviwil/PowerShellEditorServices that referenced this issue Mar 18, 2017
This change prevents RemoteFileManager from registering the psedit
function in any runspace that isn't an original remote runspace (not an
attached process or debugged runspace) since events will only propagate
back from an original session.

Fixes PowerShell/vscode-powershell#575.
@daviwil daviwil modified the milestones: 0.10.2, 0.11.0 Mar 21, 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

3 participants