[Bug] Log-in window is sometimes left running by itself/orphaned
See original GitHub issueI’m experimenting with WinappSDK / WinUI3. Coming from UWP, one odd thing I’ve noticed is sometimes when my app closes/crashes, the MSAL sign-in window is left running on its own/orphaned. Why does that happen and is there a way to prevent it?
Which version of MSAL.NET are you using? 4.49.1-preview
Platform WinappSDK 1.3 expermintal1, WinUI3
** Repro ** It repros fine with a console app.
static async Task Main(string[] args)
{
var pca = PublicClientApplicationBuilder
.Create("4b0db8c2-9f26-4417-8bde-3f0e3656f8e0")
.WithRedirectUri("http://localhost")
.WithBrokerPreview(true)
.Build();
var result = pca.AcquireTokenInteractive(new[] { "user.read" })
.WithParentActivityOrWindow(GetConsoleOrTerminalWindow())
.ExecuteAsync();
// WAM account picker pops up here.
await Task.Delay(1000);
// app crashes, but instead of closing, both console and Account picker remain on the screen. Console is modal.
throw new Exception("oh no");
}
Actual: when app crashes, the account picker stays on screen and so does the console window, which remains modal. Account Picker seems to be blocking the window from closing after the crash. App appears “frozen”
Expected: on app crash, Account picker and app should close.
Issue Analytics
- State:
- Created 7 months ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Orphaned processes when terminal is force-closed by ...
The computer didn't restart because my other apps are still in their previous state, but Windows Terminal is just closed. Maybe it crashed?...
Read more >How do I remove an "orphaned" window from a closed ...
Currently, I have a login window from the Screen Sharing application that's been spinning the spoked progress wheel next to "Connecting..." for ...
Read more >[SOLVED] "Ghost" or Orphaned Window Won't Go Away ( ...
The problem is that when they stop working I'm left with a "ghost" window that ... Plasma then restarts itself and the ghost...
Read more >How to Fix Orphaned Users in SQL Server - sqlity.net
Sometimes that login-user association breaks. That can for example happen, when a backup is restored on a different server. In this article, we ......
Read more >Troubleshoot orphaned users - SQL Server Always On
Orphaned users in SQL Server occur when a database user is based on a login in the master database, but the login no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MSamWils @bgavrilMS I just happened to see this. I don’t want to add to this problem: https://twitter.com/marcgravell/status/1656208913706909701?s=46&t=Tpb1beI0_8d1EL5lz_inPg
@localden - the account picker is a windows component separate from WAM. It’s official name is Accounts Settings Pane. It is owned by Windows. It is required when combining AAD and MSA accounts.
If MSAL knows we deal only with “work and school” accounts, then it bypasses this picker and goes directly to WAM’s AAD plugin, which behaves better in scenarios where you have a login hint etc.