Skip to content

Fix for FormatTable remote deserialization regression#9116

Merged
adityapatwardhan merged 11 commits intoPowerShell:masterfrom
PaulHigin:fix-runspacepool-restriction
Mar 18, 2019
Merged

Fix for FormatTable remote deserialization regression#9116
adityapatwardhan merged 11 commits intoPowerShell:masterfrom
PaulHigin:fix-runspacepool-restriction

Conversation

@PaulHigin
Copy link
Copy Markdown
Contributor

A recent accessibility change has caused a regression in PowerShell remoting between machines with and without the change. The change is a new RepeatHeader property added to the TableHeaderInfo class. When formatting objects are returned through the remoting channel, the client expects to see RepeatHeader property in the serialized TableHeaderInfo object and throws when it is missing.

Fix is to allow this serialized property to be null and use 'false' as the default value for the property.

Repro:

$s = New-PSSession -cn <oldVersionMachine>    # Create remote connection to machine running older version of PowerShell 5 or 6
Invoke-Command -Session $s - Script { Get-Process pwsh | Format-Table }

# Expected
# Formatted process information

# Result
# TerminatingError(out-lineoutput): "The value of the repeatHeader data member cannot be null."

PR Context

This breaks down level system remoting compatibility, and throws a terminating error whenever formatting objects are returned through the remoting layer.

PR Checklist

Copy link
Copy Markdown
Collaborator

@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one minor comment.

@adityapatwardhan adityapatwardhan changed the title [Feature] Add fix for FormatTable remote deserialization regression Fix for FormatTable remote deserialization regression Mar 12, 2019
@iSazonov iSazonov added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Mar 13, 2019
@PaulHigin
Copy link
Copy Markdown
Contributor Author

@adityapatwardhan Can this PR be merged?

@SteveL-MSFT SteveL-MSFT added this to the 6.2.0-GA-Consider milestone Mar 18, 2019
@adityapatwardhan adityapatwardhan merged commit 66ab6e7 into PowerShell:master Mar 18, 2019
@TravisEz13 TravisEz13 modified the milestones: 6.2.0-GA-Consider, 6.2.0 Mar 21, 2019
@PaulHigin PaulHigin deleted the fix-runspacepool-restriction branch July 17, 2019 23:01
@Amir-Mir
Copy link
Copy Markdown

Hello, so is this fixed for the PS version 5.1? Or will this be something that we will have to the Core or PS 7 to get it working? How do I patch or update my desktop so that this issue is fixed and I can continue using my scripts on PS 5.1? Thanks

@SteveL-MSFT
Copy link
Copy Markdown
Member

This was also fixed in PS v5.1 in Win 10 1903. There's a separate issue with ISE that's being fixed.

@Amir-Mir
Copy link
Copy Markdown

Amir-Mir commented Oct 30, 2019

This was also fixed in PS v5.1 in Win 10 1903. There's a separate issue with ISE that's being fixed.

I am currently seeing the issue in PS v5.1 running Win 10 1903 and I still see this issue.
image

Providing you with some details of my PS version and OS version.

image
image

@Amir-Mir
Copy link
Copy Markdown

This was also fixed in PS v5.1 in Win 10 1903. There's a separate issue with ISE that's being fixed.

Hello @SteveL-MSFT , you mentioned that the fix was provided in PS v5.1 in Win 1903 and I provided you with a proof that I am experiencing the same issue running the version it should be fixed in. Can you please point me in a direction where I can look up what update I need to apply to either the PS or Win to get this issue resolved?

@SteveL-MSFT
Copy link
Copy Markdown
Member

@BadSqlPro looks like this is in build 18892 or newer. You can workaround the issue by explicitly using Format-List or Format-Wide, just not Format-Table (which is default for many things unfortunately)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants