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

UI can hang due to not having proper SynchronizationContext for UI interaction #1009

Closed
6 tasks
MarkZuber opened this issue Mar 25, 2019 · 0 comments
Closed
6 tasks
Assignees
Milestone

Comments

@MarkZuber
Copy link
Contributor

Which Version of MSAL are you using ?
Note that to get help, you need to run the latest version. Preview version are also ok.
For ADAL, please log issues to https://github.com/AzureAD/azure-activedirectory-library-for-dotnet
MSAL 3.0.1-preview

Platform
Windows (net45)

What authentication flow has the issue?

  • Desktop / Mobile
    • [ x] Interactive
    • Integrated Windows Auth
    • Username Password
    • Device code flow (browserless)
  • Web App
    • Authorization code
    • OBO
  • Web API
    • OBO

We check internally when starting the windows web authentication dialog that we're running on an MTA or STA thread. Since we're using async await, we'll usually end up here on an MTA thread and try to create a new STA thread to run the browser on. This doesn't work in some cases when the parent window isn't currently pumping messages (like in VS's case) and so the app hangs with a deadlock. We need to capture the synchronization context at acquiretokeninteractive so that we can use the appropriate sync context when creating the interactive browser dialog.

@MarkZuber MarkZuber added this to the 3.0.2 milestone Mar 25, 2019
@MarkZuber MarkZuber self-assigned this Mar 25, 2019
@MarkZuber MarkZuber modified the milestones: 3.0.3, 3.0.2 Mar 25, 2019
@MarkZuber MarkZuber changed the title VS UI can hang due to not having proper SynchronizationContext for UI interaction UI can hang due to not having proper SynchronizationContext for UI interaction Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant