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

Error when passing in certain object types to Out-ConsoleGridView, but not others #257

Open
3 tasks done
pcgeek86 opened this issue Nov 5, 2024 · 1 comment
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@pcgeek86
Copy link

pcgeek86 commented Nov 5, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

I'm getting an error when passing certain objects into the Out-ConsoleGridView, while others work perfectly fine. I first noticed this with the AWS PowerShell modules.

I'm assuming this issue is related to one of the child properties of the EC2 instance objects. I can limit the returned properties by using Select-Object, and the command works alright.

NOTE: You'll need an AWS account and AWS IAM credentials in order to reproduce this.

Expected behavior

# This command should display a list of EC2 instance types
Get-EC2InstanceType | Out-ConsoleGridView

# This command works fine:
Get-S3Bucket | Out-ConsoleGridView

# This command also works fine:
Get-EC2InstanceType | Select-Object -Property InstanceType | Out-ConsoleGridView

Actual behavior

Command fails to run with an error.

Error details

Out-ConsoleGridView: Object reference not set to an instance of an object.

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     4.1.691               AWS.Tools.Common                    {Add-AWSLoggingListener, Clear-AWSCredential, Cle…
Binary     4.1.691               AWS.Tools.EC2                       {Add-EC2CapacityReservation, Add-EC2ClassicLinkVp…
Binary     4.1.691               AWS.Tools.S3                        {Add-S3PublicAccessBlock, Copy-S3Object, Get-S3AC…
Script     0.0                   ImportGuard
Binary     0.7.7                 Microsoft.PowerShell.ConsoleGuiToo… {Out-ConsoleGridView, Show-ObjectTree, ocgv, shot}
Manifest   7.0.0.0               Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-Item, Clear-It…
Manifest   7.0.0.0               Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Ob…
Script     2.3.5                 PSReadLine                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption,

Version

0.7.7

Visuals

image

image

@tig tig added the bug Something isn't working label Nov 7, 2024
@tig tig self-assigned this Nov 7, 2024
@tig
Copy link
Collaborator

tig commented Nov 7, 2024

When I get a chance I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants