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 console requested to submit bug report. #3831

Closed
3 tasks done
yotsuda opened this issue Oct 12, 2023 · 2 comments
Closed
3 tasks done

PowerShell console requested to submit bug report. #3831

yotsuda opened this issue Oct 12, 2023 · 2 comments

Comments

@yotsuda
Copy link

yotsuda commented Oct 12, 2023

Prerequisites

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

Exception report

PS O1:\総務部> Add-OrchFolderUser 'Automation Users',everyone
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!

### Environment
PSReadLine: 2.3.4
PowerShell: 7.3.8
OS: Microsoft Windows 10.0.22621
BufferWidth: 120
BufferHeight: 30

Last 65 Keys:

 c d Spacebar o 1 : RightArrow Enter
 g e t - o r c h u Tab Enter
 g e t - o r c h f Tab Tab Enter
 a d d - o r c h f o Tab Spacebar Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Tab Tab Spacebar Ctrl+Spacebar RightArrow RightArrow LeftArrow RightArrow RightArrow RightArrow RightArrow LeftArrow , Ctrl+Spacebar

### Exception

System.Management.Automation.PSInvalidOperationException: Cannot access properties on a null instance of the type CompletionResult.
   at System.Management.Automation.CompletionResult.get_ListItemText()
   at Microsoft.PowerShell.PSConsoleReadLine.<>c.<CreateCompletionMenu>b__54_0(CompletionResult c)
   at System.Linq.Enumerable.MaxInteger[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Microsoft.PowerShell.PSConsoleReadLine.CreateCompletionMenu(Collection`1 matches)
   at Microsoft.PowerShell.PSConsoleReadLine.PossibleCompletionsImpl(CommandCompletion completions, Boolean menuSelect)
   at Microsoft.PowerShell.PSConsoleReadLine.CompleteImpl(Boolean menuSelect)
   at Microsoft.PowerShell.PSConsoleReadLine.MenuComplete(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)

Screenshot

image

Environment data

PS Version: 7.3.8
PS HostName: ConsoleHost
PSReadLine Version: 2.3.4
PSReadLine EditMode: Windows
OS: 10.0.22621.1848 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 30

Steps to reproduce

I am developing my own cmdlet with c#.
This has arg completer. when pressing ctrl+space to show the candidates, PS console shows message to request file a bug report.

Expected behavior

Show the completion candidates.

Actual behavior

Show the error above.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Oct 12, 2023
@yotsuda
Copy link
Author

yotsuda commented Oct 12, 2023

sorry, the correct first line is followng.
PS O1:\総務部> Add-OrchFolderUser 'Automation Users',

I mistakenly pasted as
PS O1:\総務部> Add-OrchFolderUser 'Automation Users',everyone
but the last "everyone" is the predicted text and I didn't type it.

@yotsuda yotsuda closed this as completed Oct 12, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Oct 12, 2023
@yotsuda
Copy link
Author

yotsuda commented Oct 12, 2023

I found ParameterSetName attribute usage was incorrect in my code. I fixed it and the problem gone. I am sorry for bothering you. Thanks.

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

1 participant