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

[Windows 11 22000.65] Default Terminal does not work with 1.9! #10594

Closed
obrobrio2000 opened this issue Jul 9, 2021 · 56 comments
Closed

[Windows 11 22000.65] Default Terminal does not work with 1.9! #10594

obrobrio2000 opened this issue Jul 9, 2021 · 56 comments
Labels
Area-DefApp Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@obrobrio2000
Copy link

obrobrio2000 commented Jul 9, 2021

MAINTAINER NOTE

There's a version mismatch between Terminal 1.9 and 22000.65. We had to introduce a new "default terminal" code path because the one we had introduced for 22000.51 was broken.

Until we release Terminal 1.10 to Preview, this will not work.


Original Report

Windows Terminal version (or Windows build number)

10.0.22000.65, 1.9.1523.0

Other Software

No response

Steps to reproduce

  1. Update to Windows 11 22000.65
  2. Set Terminal Preview as default terminal app (in Settings > Privacy & security > For developers or in Terminal Preview's settings)
  3. Open non-elevated cmd/powershell/wsl.

Expected Behavior

Terminal Preview should be used as the default terminal, respecting user's choice.

Actual Behavior

After 22000.65 update, Console Host is always used instead of Terminal Preview (ignoring user's choice). Even if I set Terminal Preview as the default terminal instead of conhost, it always opens everything (cmd, powershell, wsl2 etc.) in conhost.
Feedback Hub link: https://aka.ms/AAd5hc6

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 9, 2021
@skyline75489 skyline75489 added Area-DefApp Product-Terminal The new Windows Terminal. labels Jul 9, 2021
@DHowett
Copy link
Member

DHowett commented Jul 9, 2021

Thanks for the report! There's a version mismatch between Terminal 1.9 and 22000.65. We had to introduce a new "default terminal" code path because the one we had introduced for 22000.51 was broken.

Until we release Terminal 1.10 to Preview, this will not work.

Sorry!

@DHowett DHowett changed the title Windows 11 22000.65 never uses Terminal Preview as the default terminal app [Windows 11 22000.65] Default Terminal does not work with 1.9! Jul 9, 2021
@DHowett DHowett pinned this issue Jul 9, 2021
@DHowett DHowett added Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. labels Jul 9, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 9, 2021
@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 Jul 9, 2021
@vaualbus
Copy link

@DHowett so basically it was done to fix the problem, I reported, that if you set terminal as conhost and you add auto start scripts in the Startup folders, sometime when the system start you got a windows cannot start app?
It's a fix anyway at least now i can use again all of my subst that I set at startup, that was broken in prev build!

@ghost
Copy link

ghost commented Jul 15, 2021

This is also the case on Microsoft Windows [Version 10.0.21390.2025]. Set Terminal Preview as default terminal application but Console Host is used when running Command Prompt or Powershell.

@obrobrio2000
Copy link
Author

obrobrio2000 commented Jul 15, 2021

[22000.65] I checked for updates on the Store and it updated Terminal Preview to 1.10.1933.0 , the problem is finally solved! Now cmd, ps, wsl etc. open with Terminal Preview if set as default! Thanks to all the devs!

2021_07_15_160256.mp4

@ghost
Copy link

ghost commented Jul 16, 2021

@obrobrio2000, This still does not work on Microsoft Windows [Version 10.0.21390.2025] with Terminal Preview 1.10.1933.0.

@obrobrio2000
Copy link
Author

@obrobrio2000, This still does not work on Microsoft Windows [Version 10.0.21390.2025] with Terminal Preview 1.10.1933.0.

Thanks for letting me know, I reopened the issue.

@obrobrio2000 obrobrio2000 reopened this Jul 16, 2021
@DHowett
Copy link
Member

DHowett commented Jul 16, 2021

That release predates the revised handoff interface, and I believe that it is an insider build that is not currently receiving updates to any of our components. Our recent work is available in Insider builds 22000 and beyond.

@ayamadori
Copy link

This still does not work on Microsoft Windows [Version 10.0.22000.71] with Terminal Preview 1.10.1933.0...
image

@obrobrio2000
Copy link
Author

obrobrio2000 commented Jul 18, 2021

@ayamadori same as you (22000.71 and 1.10.1993.0) but it seems working fine on my end.

2021_07_18_055325.2.mp4

@ghost
Copy link

ghost commented Jul 18, 2021

@obrobrio2000, @ayamadori, Strange. It still does not work on my machine. Are there any steps required other than changing the setting on the Terminal?

@minpeter
Copy link

windows 11 PRO build 22000.100
windows terminal build 1.10.1933.0
I also have terminal preferences not working. 😥

@minpeter
Copy link

Rebooting solved it..🤦‍♂️

@ayamadori
Copy link

ayamadori commented Aug 11, 2021

This seems to be fixed... (Windows 10.0.22000.120, Terminal Preview 1.10.1933.0)
But I don't know when fixed. 🤔
When Windows was updated to 22000.120, this should be NOT fixed.
Maybe it's when Visual Studio was installed.

@The-MAZZTer
Copy link

The-MAZZTer commented Aug 19, 2021

Not working with Windows 11 22000.160 with Windows Terminal Preview 1.101.933.0

Only unusual thing about my install is I don't have Windows activated (trying it out in a VM). I don't see any messages in Windows Settings indicating that would stop this feature from working though.

I also had installed PowerShell 7, as well as Windows Terminal Stable and Preview, all through winget (shouldn't matter).

Things I tried:

  1. Changing default host in Windows Terminal Settings.
  2. Verifying default host in Windows Settings (I know Windows has been stingy about letting apps manipulate these types of settings so I'm surprised Windows Terminal can), then switching it back and forth to make sure.
  3. Rebooting.
  4. Running cmd.exe from Run dialog (used console host).
  5. Running Command Prompt from Start Menu (used console host).
  6. Running find.exe/dism.exe from Run dialog (hard to tell but looked like console host window).
  7. Created BAT and CMD files with "pause" command. Ran using "start" from a Windows Terminal Command Prompt. (console host).
  8. Ran "start cmd" from a Windows Terminal Command Prompt (console host).
  9. Ran "start find.exe" from a Windows Terminal Command Prompt (closes immediately, but again seemed to be console host).

@n-gao

This comment has been minimized.

@swift-lee

This comment has been minimized.

@zadjii-msft
Copy link
Member

@n-gao, @swift-lee That's correct. From the blog post for 1.11:

All of the features from our previous release are now in Windows Terminal, except for the default terminal setting, ...

@zadjii-msft
Copy link
Member

@The-MAZZTer If you're still seeing this, can you share what's in HKEY_CURRENT_USER\Console\%%Startup for you? It should look something like
image

@miniksa
Copy link
Member

miniksa commented Sep 20, 2021

FWIW, I tried to install and use VirtualBox 6.1.26 on my Windows 11 host machine and it couldn't start any VMs. I wonder if that's a known issue for VirtualBox and I need a Windows 10 host machine?

@CDAGaming
Copy link

CDAGaming commented Oct 4, 2021

Any updates on this?

Given the release of Windows 11 is under 24 hours away at time of writing, I'd love to know whether this was nearing stability...

(On the fence about using the preview version of the terminal, since the only thing I'm after is the default console setting)

@zadjii-msft
Copy link
Member

@CDAGaming This isn't the thread for that discussion, though I'm not sure there is another one. This one's tracking a very specific bug in the defterm implementation that we're still trying to track down, but there's only the one user with the repro.

I'm gonna file another issue to track that discussion in the immediate future.

@zadjii-msft
Copy link
Member

If you want to discuss that topic more, let's move over to #11415.

We still haven't found anything that looks like a root cause for this one, nor do we have any live repros unfortunately.

@zadjii-msft zadjii-msft unpinned this issue Oct 5, 2021
@shaunthorne
Copy link

This seems to be fixed... (Windows 10.0.22000.120, Terminal Preview 1.10.1933.0) But I don't know when fixed. 🤔 When Windows was updated to 22000.120, this should be NOT fixed. Maybe it's when Visual Studio was installed.

Windows 11 Build 2200.194. Windows Terminal Preview 1.11.2731.0

Windows Terminal started to work as expected immediately after installing Visual Studio 2019 with .NET components
Is it kind of magic?
image

@zadjii-msft
Copy link
Member

@The-MAZZTer These questions might seem silly, but I'm just trying to correlate with an internal report of a similar bug. Are you by any chance running on an ARM CPU?

Even more wildly: Is the copy of Windows you're running in VirtualBox activated?

We've got a crazy theory that the second bit might somehow be causing this to fail (but we've still got NO idea why that might be)

@NotTheDr01ds
Copy link

NotTheDr01ds commented Oct 18, 2021

@zadjii-msft While we're waiting on The-MAZZTer's reply, I will chime in that I can also reproduce this with:

  • An activated Windows 11 (22000.258)
  • Installed on KVM/QEMU on a Linux (openSUSE Tumbleweed) installation with nested virtualization enabled
  • Completed initial install with no network, so local account (sounds similar to The-MAZZTer's process)
  • Did not activate during install
  • After reboot, installed virtio drivers
  • Connected to network
  • Activated Windows
  • Converted to Microsoft Account
  • Installed WSL with Ubuntu, Debian, and Alpine
  • Installed Windows Terminal Preview (currently 1.11.2731.0)
  • Set it to default through the Windows "For Developers" settings
  • Ran cmd.exe
  • Opened in Windows Console Host
  • Rebooted
  • Ran cmd.exe
  • Opened in Windows Console Host

@zadjii-msft
Copy link
Member

@NotTheDr01ds Are you by any chance running on an ARM CPU?

@NotTheDr01ds
Copy link

NotTheDr01ds commented Oct 18, 2021

@zadjii-msft I knew I would miss some critical information in there :-). No. The host CPU is an i5-9500T. The kvm setup is per this guide, so the guest is "Skylake, IBRS, No TSX".

PankajBhojwani pushed a commit that referenced this issue Oct 19, 2021
Considering the number of reports of "defterm isn't working (mysteriously)", I figured more logging current hurt. I also added a wprp profile for the defterm logging as well, which should capture conhost side things as well. 

From an elevated conhost:
```
wpr -start path\to\Terminal.wprp!Defterm.Verbose
wpr -stop %USERPROFILE%\defterm-trace.etl
```

* [x] I work here
* [x] relevant to: #10594, #11529, #11524.
PankajBhojwani pushed a commit that referenced this issue Oct 19, 2021
Considering the number of reports of "defterm isn't working (mysteriously)", I figured more logging current hurt. I also added a wprp profile for the defterm logging as well, which should capture conhost side things as well.

From an elevated conhost:
```
wpr -start path\to\Terminal.wprp!Defterm.Verbose
wpr -stop %USERPROFILE%\defterm-trace.etl
```

* [x] I work here
* [x] relevant to: #10594, #11529, #11524.

(cherry picked from commit 284257a)
PankajBhojwani pushed a commit that referenced this issue Oct 20, 2021
Considering the number of reports of "defterm isn't working (mysteriously)", I figured more logging current hurt. I also added a wprp profile for the defterm logging as well, which should capture conhost side things as well. 

From an elevated conhost:
```
wpr -start path\to\Terminal.wprp!Defterm.Verbose
wpr -stop %USERPROFILE%\defterm-trace.etl
```

* [x] I work here
* [x] relevant to: #10594, #11529, #11524.
@zadjii-msft
Copy link
Member

@NotTheDr01ds @The-MAZZTer We think we have a fix for this over in #11610. Could you do the steps in this comment: #11529 (comment) and send me the trace? I should be able to tell from the trace if this you were hitting the same cause.

Even if it's not, we should probably move the discussion to a new thread, just so we can follow up and track the bug separately.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Oct 26, 2021
@zadjii-msft zadjii-msft added this to the Terminal v1.13 milestone Oct 26, 2021
@The-MAZZTer
Copy link

@zadjii-msft Alright, I haven't updated my VM to Windows 11 RTM so it is still on 22458.1000, and I generated the trace using it. Let me know if you want a trace running on Windows 11 RTM or whatever.

Trace sent to your e-mail as directed.

@zadjii-msft
Copy link
Member

Yep, that's the same thing. Manually installing the visual c++ redistributable will probably fix this for you. We'll probably roll out a hotfix with #11610 in it soon enough.

Thanks everyone for the persistence on this one!

@szilvaa-adsk
Copy link

I'm seeing this issue when I run cmd.exe as ADMINISTRATOR. It works fine when I run it as "regular user".

Steps to repro:

  1. Open File Explorer
  2. Right click on %windir%\system32\cmd.exe and choose "Run as Administrator".

Actual results:
Cmd.exe runs with Conhost.

Expected result:
Cmd.exe runs with Windows Terminal. In fact, this happens if I simply click on cmd.exe (without choosing "Run As Administrator")

Windows version: 10.0.22000.282
Terminal version: 1.11.2921.0
I also have VS 2019 16.11.5 and VS 2022 Preview4 installed in case that matters.

@zadjii-msft
Copy link
Member

@szilvaa-adsk Please read the FAQ.

Launching elevated commandline applications won't open in the Terminal. Unfortunately, this is by design right now. Due to a limitation in the app platform it is impossible for Terminal to be "discovered" as the handler when the application that needs a terminal is running elevated. We're working on this, but this is something that needs OS-side work to resolve.

@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 3, 2021
@ghost
Copy link

ghost commented Nov 3, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@The-MAZZTer
Copy link

@zadjii-msft Missed your other questions, I'm running on a x64 host (is there even an ARM VirtualBox?) and I didn't activate Windows 11 since I don't have a license, apart from a couple Windows 10 ones (just wanted to take a sneak peek before I update my Windows 10 PC).

@ghost ghost removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 3, 2021
@zadjii-msft
Copy link
Member

@The-MAZZTer Oh sorry, we moved on past those theories. We believe this was due to an accidental dependency on the CRT. Manually installing the C Runtime should fix this (until we roll out a hotfix build of the Terminal that doesn't have this dependency anymore)

@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 7, 2021
@ghost
Copy link

ghost commented Nov 7, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Nov 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-DefApp Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests