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

'WinIOError' thrown from 'Ctrl+L' was fixed in recent versions #1315

Closed
daxian-dbw opened this issue Jan 23, 2020 · 6 comments
Closed

'WinIOError' thrown from 'Ctrl+L' was fixed in recent versions #1315

daxian-dbw opened this issue Jan 23, 2020 · 6 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@daxian-dbw
Copy link
Member

The IOException thrown from Ctrl+l was fixed in recent versions.
If you run into this one (seeing a stack trace like the below one), please try out the latest version of PSReadLine from PowerShell Gallery.

Exception:
System.IO.IOException: The parameter is incorrect.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

This issue was fixed by #790. The fix was included in 2.0.0-beta4 and newer versions.
For more information, take a look at #922 (comment).

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jan 23, 2020
@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jan 23, 2020
@daxian-dbw daxian-dbw added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Jan 23, 2020
@daxian-dbw daxian-dbw pinned this issue Jan 23, 2020
@justPaulo
Copy link

justPaulo commented Feb 27, 2020

After update to most recent version of powershell core, error stills persists.

Last 8 Keys:

 Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l

Exception:

System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.ConsolePal.SetWindowPosition(Int32 left, Int32 top)
   at System.Console.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ClearScreen(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

@vexx32
Copy link

vexx32 commented Feb 27, 2020

@justPaulo did you update to the most recent version of PSReadLine?

@justPaulo
Copy link

No because of:
WARNING: Version '2.0.0-beta3' of module 'PSReadLine' is already installed at '/usr/local/microsoft/powershell/6/Modules/PSReadLine'. To install version '2.0.0', run Install-Module and add the -Force parameter, this command will install version '2.0.0' side-by-side with version '2.0.0-beta3'.

@daxian-dbw
Copy link
Member Author

daxian-dbw commented Feb 27, 2020

@justPaulo Please try this:

<path-to-pwsh-executable> -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -AllowPrerelease"

Be sure to exit all instances of powershell.exe, pwsh.exe or pwsh (including the integrated PowerShell console you might opened in VSCode), then run the suggested command from cmd.exe.
Checkout the Upgrading section of the README.md.

@justPaulo
Copy link

justPaulo commented Feb 27, 2020

Tried it:
pnascim@MacMinidoPaulo ~ $ /usr/local/bin/pwsh -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -AllowPrerelease"
WARNING: The version '2.0.0' of module 'PSReadLine' is currently in use. Retry the operation after closing the applications.

I completely closed and logout from pwsh, as well zsh on macOS Catalina.

PS /Users/pnascim> $PSVersionTable Name Value ---- -----
PSVersion 6.2.4
PSEdition Core
GitCommitId 6.2.4
OS Darwin 19.4.0 Darwin Kernel Version 19.4.0: Sun Feb 9 22:12:38 PST 2020; root:xnu-6153.100.196~21/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@daxian-dbw
Copy link
Member Author

@justPaulo There is a thread about this. It looks like something with Install-Module, checkout #1370

@github-actions github-actions bot mentioned this issue Nov 20, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants