Terminal shows an empty window and then a conhost window opens after 30s when used as default terminal application
Windows Terminal version
1.18.3181.0
Windows build number
10.0.26020.1000
Other Software
No response
Steps to reproduce
- Run cmd from the Start box or Start Menu.
Expected Behavior
- Windows Terminal to open with the specified console application.
Actual Behavior
- A Windows Terminal opened without any session in it.
- 30 seconds pass.
- A fallback conhost appears with my desired program.
- Upon exiting the desired program and conhost closing, the Windows Terminal launches a PowerShell session.
See this video: https://github.com/microsoft/terminal/assets/82626/bd07a775-f033-43dc-b8a8-7c793c90fcd1
I do see DCOM timeout errors in the Windows System log related to the E12CFF52-A866-4C77-9A90-F570A7AA2C6B service.
I think that the reason that the powershell came up is because I had pressed enter for the exit command in conhost and my key wasn’t released before Terminal received focus. Most background scripts which create terminal windows stay in the blank frame state.
The biggest two annoyances are that, when this happens, I start getting a very large number of leftover empty frame Terminal and that I have to wait 30s for anything to happen. I think this issue goes away if I reboot, but I shouldn’t have to do that all the time—makes me feel like I’m using Windows 98 again.
Can you share the actual DCOM errors in the event log/? That might help investigate here.
(fwiw, you can usually close those stay empty terminal windows by opening a tab, then closing the window. I'd still like to get to the root cause of why this is happening though ☺️ )
Unfortunately, the computer in question restarted to install updates so I can no longer reproduce the issue. I found the logs in the Windows.old folder. It is Event ID 10010. It appears that other Store apps were also experiencing the same timeout. However, I had no trouble opening the Store app when this issue was happening. I have had this happen on another computer too. I think the issue goes away upon rebooting, so I am not sure how to recreate it or get it unstuck when it does happen.
I have attached the logs which include a few from Terminal failing to launch as the default terminal and a couple from other apps reporting failures (but I didn’t notice any symptoms for those other errors at the time).
Thanks for filing. If the issue comes back, please capture the logs via Feedback Hub under the "Applications" > "Windows Terminal" category. We'll be closing the issue, but are happy to reopen it if it comes back.
The issue is back. I have reported it at https://aka.ms/AAp1aok .
And it came back again and is still not resolved with no comment on that feedback.
did you fix this issue? or it fix itself with windows update? I'm having the same problem now
It still tends to still happen after having my computer on for a few days. An eventual reboot solves it temporarily.
Sometimes I try to avoid commands that open new CMD windows just because I know I'll have to wait for the 30 second timeout. It's a focus derailer/productivity drain.
I realized it might be have something to do with folder or file permission, and something might be corrupted? what I did was reinstalled windows 11 23H2, installed latest windows terminal, and have no problem, then I start to set C drive permission will full control to myself, during this process, some pop up messages say some access denied, because it is in process and this issue returned, I tried to open ubuntu wsl, cmd, powershell 7, windows powershell, all command-line tools seems behaving the same way. but I can directly open windows terminal and open them inside of windows terminal
@xiaotinglian Does the issue go away for you if you reboot?
That sounds different than the issue I am experiencing. What you are doing may simply not be supported in the first place.
reboot did not resolve the issue I do realize, my issue might not be supported here, lol, not a windows expert, but here's some more info that I found from sfc /scannow, might help? not sure if this is related, but these log appears in CBS.log couple times
2025-02-19 23:09:58, Info CBS Missing Current State value for package: Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.1, force absent so at least it can be re-installed
2025-02-19 23:09:58, Info CBS Failed to get visibility for package: Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.1 [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
some interesting findings, I reinstalled PC, with windows 10 22H2, windows terminal works fine there I did a in-place upgrade to windows 11 22H2, then later update to 23h2, work fine at this point I used winget upgrade windows terminal to the latest, it works fine as well then uninstall and reinstall, and the same problem comes back
another thing is windows terminal is not showing in context menu after reinstall I wonder some setting in registry is not right during installation
then I start to set C drive permission will full control to myself
Just so you know: this is a really, really bad idea. App execution aliases in particular rely on the fact that certain files aren't directly readable by the user, in order to switch to the packaged execution context. In the past, we had a user who tried to give themselves permissions to everything and IIRC, a re-install wouldn't even fix it anymore. It was incredibly bad.
Totally agree with you, I felt something must be gone wrong with all the permission changes, that's why I decided to reimage my laptop
then I start to set C drive permission will full control to myself
Just so you know: this is a really, really bad idea. App execution aliases in particular rely on the fact that certain files aren't directly readable by the user, in order to switch to the packaged execution context. In the past, we had a user who tried to give themselves permissions to everything and IIRC, a re-install wouldn't even fix it anymore. It was incredibly bad.