8000 PowerShell v6.0.0-alpha.14 is crashing in Container interactive terminals · Issue #492 · PowerShell/PSReadLine · GitHub
[go: up one dir, main page]

Skip to content

PowerShell v6.0.0-alpha.14 is crashing in Container interactive terminals #492

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
brycem opened this issue Jan 13, 2017 · 4 comments
Closed

Comments

@brycem
Copy link
brycem commented Jan 13, 2017

step1:
docker build https://raw.githubusercontent.com/PowerShell/PowerShell/master/docker/release/nanoserver/Dockerfile -t alpha.14

step2:
docker run -it --rm alpha.14 "c:\Program Files\PowerShell\Core\powershell.exe"

step3:
type something...

result:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\>dir
 Volume in drive C has no label.
 Volume Serial Number is 8AE0-9651

 Directory of C:\

01/12/2017  10:35 PM             3,557 Dockerfile.log
11/20/2016  03:32 AM             1,894 License.txt
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\>"c:\Program Files\PowerShell\Core\powershell.exe"
PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\>
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
ir
ir : The term 'ir' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ ir
+ ~~
    + CategoryInfo          : ObjectNotFound: (ir:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\>

notes
this wasn't happening in Alpha.12... Seems to happen independent of the TTY terminal used (I tied minty.exe, vscode.exe, cmd.exe, and desktop powershell.exe on Win10 client)

In a newer version of the dockerfile I'm working on, this same build shows it working in in non-interactive mode. Also repros in windowsservercore

@StefanScherer
Copy link

Same happens with Alpha.15, I just appended an ENTRYPOINT instruction at the end of this Dockerfile and built it.

diff --git a/docker/release/windowsservercore/Dockerfile b/docker/release/windowsservercore/Dockerfile
index b31d36b..1d0b4ce 100644
--- a/docker/release/windowsservercore/Dockerfile
+++ b/docker/release/windowsservercore/Dockerfile
@@ -4,8 +4,8 @@ MAINTAINER brycem@microsoft.com
 LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md"
 LABEL Description="This Dockerfile will install the latest release of PS."
 
-ARG POWERSHELL_MSI=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.14/PowerShell_6.0.0.14-alpha.14-win10-x64.msi
-ARG POWERSHELL_SHA256=503F3AD52223699765895D3E9615FBD7988194693BCB725BE90C9EF0CD594447
+ARG POWERSHELL_MSI=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.15/PowerShell_6.0.0-alpha.15-win10-win2k16-x64.msi
+ARG POWERSHELL_SHA256=CC52D21F3287E412B9C3B73C98BB5B06F8056D49D63201072216DF92B7F2E59B
 
 # Setup PowerShell - Log-to > C:\Docker.log
 SHELL ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]
@@ -46,3 +46,5 @@ RUN Start-Transcript -path C:\Dockerfile.log -append -IncludeInvocationHeader ;
 
 # Persist %PSCORE% ENV variable for user convenience
 ENV PSCORE='"C:\Program Files\PowerShell\Core\PowerShell.exe"'
+
+ENTRYPOINT ["C:\\Program Files\\PowerShell\\Core\\PowerShell.exe"]
$ docker build -t powershell .
$ docker run -it powershell
PowerShell 
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\> 

Then I tried to paste some text into the interactive terminal and the following error happens.

Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 1 Keys:
 0

Exception:
System.ComponentModel.Win32Exception: Incorrect function
-----------------------------------------------------------------------
PSVersionTable

I only can press return to get a new prompt, but typing any other character the error also occurs.

PowerShell 
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\> 
PS C:\> 
PS C:\> 
PS C:\> 
PS C:\> 
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 5 Keys:
 Enter
 Enter
 Enter
 Enter
 d

Exception:
System.ComponentModel.Win32Exception: Incorrect function
-----------------------------------------------------------------------

@alexandair
Copy link
Contributor

The same happens with alpha.18 using a container base image from microsoft/powershell.

@SteveL-MSFT
Copy link
Member

This should be fixed PowerShell/PowerShell#3815

@lzybkr
Copy link
Contributor
lzybkr commented Nov 3, 2017

Closing - the font related code is gone from this repo.

@lzybkr lzybkr closed this as completed Nov 3, 2017
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

5 participants
0