-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Context Menu -> Open in Windows Terminal -> "The server threw an exception" #8936
Comments
The same is happening both with Preview (1.6.10272.0) and Stable (1.5.10271.0) release. The Preview release writes the following error event in the Windows Registry (I have translated the message since my system language is Italian):
The Stable release, on the other hand, keeps its secrets and doesn't write anything in the Windows Registry. |
Curious. @axcadsd do you also have both the Stable and Preview versions of the Terminal installed? It might be helpful to get this crash dump: /feedback |
Hi @zadjii-msft, I have sent a report with the Feedback Hub as instructed, after having uninstalled both Preview and Stable and performed a fresh install of Stable (unfortunately the issue remains). |
@zadjii-msft Hopefully LucaBlackDragon's logs will help fix the issue. |
Huh, that got bucketed to |
any instructions on how to debug / provide useful information? |
If it's not too much trouble, we might be able to figure this out by building from source and throwing breakpoints at the top of /cc @hereafter, because they might have some ideas what's going on here (#8638) |
Note to anybody else debugging the issue:
Anyways,
this is the line that fails with error - REGDB_E_CLASSNOTREG, 0x80040154, Class not registered
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
i am not able to repro the issue. I suspect it is due to the context |
@hereafter auto shell = create_instance<IShellWindows>(CLSID_ShellWindows, CLSCTX_ALL); it no longer crashes at this line. it now crashes at L282 - disp.put() terminal/src/cascadia/ShellExtension/OpenTerminalHere.cpp Lines 280 to 298 in e7d3262
However, after clicking on Ignore , the Terminal does open correctly :D
EDIT: |
EDIT: |
could you please take the code here to see if it works for you now |
Thanks, it works perfectly. diff --git a/src/cascadia/ShellExtension/OpenTerminalHere.cpp b/src/cascadia/ShellExtension/OpenTerminalHere.cpp
index bd748338..1c2649df 100644
--- a/src/cascadia/ShellExtension/OpenTerminalHere.cpp
+++ b/src/cascadia/ShellExtension/OpenTerminalHere.cpp
@@ -266,7 +266,7 @@ std::wstring OpenTerminalHere::_GetPathFromExplorer() const
return path;
}
- auto shell = create_instance<IShellWindows>(CLSID_ShellWindows);
+ auto shell = create_instance<IShellWindows>(CLSID_ShellWindows, CLSCTX_ALL);
if (shell == nullptr)
{
return path;
@@ -285,6 +285,7 @@ std::wstring OpenTerminalHere::_GetPathFromExplorer() const
com_ptr<IWebBrowserApp> tmp;
if (FAILED(disp->QueryInterface(tmp.put())))
{
+ disp = nullptr;
continue;
}
@@ -293,8 +294,10 @@ std::wstring OpenTerminalHere::_GetPathFromExplorer() const
if (hwnd == tmpHWND)
{
browser = tmp;
+ disp = nullptr;
break; //found
}
+ disp = nullptr;
}
if (browser != nullptr) I have also set up teamviewer, so in case any debugging is still required, please let me know. |
THANK YOU VERY MUCH that would be good enough for now I am making a pr to the mess I left |
Fix a bug brought in with PR: #8638 see, #8936 #8638 * [x] Closes #8936 * [x] CLA signed * [x] Tests passed With the help from @nc-x, the issue is reproduced and fixed by this patch. CLSCTX_IN_PROCESS is not good enough for all cases to create IShellWindows interface. Put a CLSCTX_ALL fixes the issue. Another debugging warning dialogs for reusing not null com_ptr in the loop is fixed too. (This was shown in debug builds only)
was here to report this issue...how do I get this now? |
Right now, we've committed the fix to |
Fix a bug brought in with PR: #8638 see, #8936 #8638 * [x] Closes #8936 * [x] CLA signed * [x] Tests passed With the help from @nc-x, the issue is reproduced and fixed by this patch. CLSCTX_IN_PROCESS is not good enough for all cases to create IShellWindows interface. Put a CLSCTX_ALL fixes the issue. Another debugging warning dialogs for reusing not null com_ptr in the loop is fixed too. (This was shown in debug builds only) (cherry picked from commit e207236)
Fix a bug brought in with PR: #8638 see, #8936 #8638 * [x] Closes #8936 * [x] CLA signed * [x] Tests passed With the help from @nc-x, the issue is reproduced and fixed by this patch. CLSCTX_IN_PROCESS is not good enough for all cases to create IShellWindows interface. Put a CLSCTX_ALL fixes the issue. Another debugging warning dialogs for reusing not null com_ptr in the loop is fixed too. (This was shown in debug builds only) (cherry picked from commit e207236)
hi @zadjii-msft! just wanted to check in to see if this fix was released? I see that the issue is assigned to the v1.7 milestone- should I check back on February 28th? |
This is due to be released in a bugfix update to 1.6 this week. |
But stable 1.5 won't get an update? |
1.5 won't get an update because the bug wasn't present in 1.5. The support for the context menu in the background of a directory was only added in 1.6. That feature had a bug that would cause this error message for some users. We can patch that bug in 1.6, but we're not going to bring the whole feature down a level (since clearly, it needs more time to bake in Preview). |
@zadjii-msft I have 1.5.10271.0 installed, there is this entry in the context menu and I'm getting this error. I haven't installed the Preview version. |
Well, that's certainly not expected. @DHowett we didn't sneak this context menu entry into 1.5, did we? |
It's in the changelog: https://github.com/microsoft/terminal/releases/tag/v1.5.10271.0 |
Well then this should probably be serviced to 1.5 too. That's what we get for sneaking features into the stable builds. |
What is the resolution? I'm still facing this issue, and I downloaded the last version of Terminal |
@arthursoas Please read the thread. This is fixed in |
🎉This issue was addressed in #8977, which has now been successfully released as Handy links: |
🎉This issue was addressed in #8977, which has now been successfully released as Handy links: |
Note:
Environment
Steps to reproduce
Context Menu -> Open in Windows Terminal -> "The server threw an exception"
Expected behavior
It should work
Actual behavior
It doesn't
The text was updated successfully, but these errors were encountered: