Skip to content

Crash when editing remote file using psedit #1091

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

Closed
mbsj opened this issue Nov 6, 2017 · 9 comments
Closed

Crash when editing remote file using psedit #1091

mbsj opened this issue Nov 6, 2017 · 9 comments
Labels
Issue-Bug A bug to squash.

Comments

@mbsj
Copy link

mbsj commented Nov 6, 2017

System Details

  • Operating system name and version: Windows 10 Pro
  • VS Code version: 1.17.2
  • PowerShell extension version: 1.5.0
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.1.14393.1770
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1770
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

code -v
1.17.2
b813d12980308015bcd2b3a2f6efa5c810c33ba5

$pseditor.EditorServicesVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
1      5      0      0

code --list-extensions --show-versions
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14393.1770
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1770
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Every time i try to edit a file in a remote session the integrated console crashes.
I simple create and enter a new session (Enter-PSSession) then i use psedit to edit the file. After a few seconds, maybe as much as a minute or two, the process crashes.
I have disabled all extensions and the issue persists.

Attached Logs

1509974465-82c81cab-97f9-4af7-a119-16c6ff0a97661509974457601.zip

@rkeithhill
Copy link
Contributor

What version of PowerShell is on the other end? This seems to be crashing with a PSNotSupportedException when PSES is asking for all the commands of type alias on the remote side. Is it a constrained endpoint?

@rkeithhill
Copy link
Contributor

@mbsj
Copy link
Author

mbsj commented Nov 7, 2017

Unfortunately it's not PowerShell core. I'm connecting to a Server 2008 R2 with version 4. Not constrained.

@mbsj
Copy link
Author

mbsj commented Nov 8, 2017

I just made another test, remoting to a server running PowerShell 5.1. It behaves the same way with the same error.

@rkeithhill
Copy link
Contributor

If you look at the EditorServices.log file for that session, do you see the same PSNotSupportedException? I can only see the source code for PS Core (since it's OSS). But peeking into the SMA.dll v3 with dotPeek, I see that the same method throws PSNotSupportedException as well. Hmm, I wonder if we're using the right type for remote sessions...

@mbsj
Copy link
Author

mbsj commented Nov 8, 2017

Yes, the exact same error with GetAliases. I'm away from my PC right now but I can attach logs for a session to the 5.1 instance later, if you'd like?

@mbsj
Copy link
Author

mbsj commented Nov 9, 2017

For the sake of being thorough, i have a attached the logs for the 5.1 session as well.
1510215916-ede6715c-2016-46b6-a6d4-0085661f6d1e1510215883874.zip

@rkeithhill
Copy link
Contributor

Thanks. Yup, same exception. Have a fix for that particular exception.

@rkeithhill
Copy link
Contributor

This should fixed in the upcoming 1.5.1 release. If it isn't, please re-open this issue.

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