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

Show a more descriptive error message when the ConptyConnection fails to start for some reason #7186

Open
RufusJWB opened this issue Aug 5, 2020 · 6 comments
Labels
Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@RufusJWB
Copy link

RufusJWB commented Aug 5, 2020

Description of the new feature/enhancement

Show a speaking error message, when it is necessary to run Terminal with admin privileges. See #4272 for the problem

Proposed technical implementation details (optional)

@RufusJWB RufusJWB added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 5, 2020
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 5, 2020
@KalleOlaviNiemitalo
Copy link

How about just displaying the error message that matches the error code, like so:

[error 0x800702e4 when launching `C:\Program Files\PowerShell\6\pwsh.exe']
The requested operation requires elevation.

Or does Windows Terminal have to recognize the 0x800702e4 code specifically and display something more verbose?

@RufusJWB
Copy link
Author

RufusJWB commented Aug 5, 2020

I think displaying the error message would be perfectly fine. I had to google it. With the error message, this wouldn't have been necessary.

@KalleOlaviNiemitalo
Copy link

Could even extend that to process exit codes that look like NTSTATUS error codes:

[process exited with code 3221225786]
The application terminated as a result of a CTRL+C.

That would have a greater risk of false matches, though.

@zadjii-msft
Copy link
Member

This isn't a bad idea, and I bet @DHowett thought about something like this when he first added the error codes

@zadjii-msft zadjii-msft added Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Aug 5, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 5, 2020
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Aug 5, 2020
@DHowett
Copy link
Member

DHowett commented Aug 6, 2020

Yeah, we can definitely do better with these error messages!

@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Aug 6, 2020
@DHowett DHowett changed the title Show a 'speaking' error when running of Terminal with admin privileges is necessary Show a more descriptive error message when the ConptyConnection fails to start for some reason Aug 6, 2020
@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@zadjii-msft zadjii-msft added the good first issue This is a fix that might be easier for someone to do as a first contribution label Apr 7, 2022
@zadjii-msft
Copy link
Member

For those who'd like to try this themselves, I added a similar kind of error message in #10045.

Collected relevant error messages:

Symbolic Name Error Description Header
ERROR_ELEVATION_REQUIRED The requested operation requires elevation. winerror.h
STATUS_CONTROL_C_EXIT {Application Exit by CTRL+C} The application terminated as a result of a CTRL+C. ntstatus.h
MSG_DIR_BAD_COMMAND_OR_FILE '%1' is not recognized as an internal or external command, operable program or batch file. cmdmsg.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
Status: Should be written
Development

No branches or pull requests

4 participants