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

[Bug] Interactive auth with Edge system browser sometimes hangs #1506

Closed
1 of 7 tasks
bgavrilMS opened this issue Nov 14, 2019 · 7 comments · Fixed by #1509
Closed
1 of 7 tasks

[Bug] Interactive auth with Edge system browser sometimes hangs #1506

bgavrilMS opened this issue Nov 14, 2019 · 7 comments · Fixed by #1509
Assignees
Labels
Milestone

Comments

@bgavrilMS
Copy link
Member

Which Version of MSAL are you using ?
MSAL 4.7

Platform
netcore or net classic

What authentication flow has the issue?

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

Repro

Configure interactive auth to use the system browser and also configure it to use Edge.

  var options = new SystemWebViewOptions()
{
     OpenBrowserAsync = SystemWebViewOptions.OpenWithEdgeBrowserAsync
};

var cts = new CancellationTokenSource();
authTask = pca.AcquireTokenInteractive(s_scopes)
                        .WithSystemWebViewOptions(options)
                        .ExecuteAsync(cts.Token);

Actual behavior
Sometimes the browser hangs at an url similar to:
https://login.microsoftonline.com/common/reprocess?ctx=rQIIAW2Q

Eventually an MsalClientException occurs, stating:

Could not extract the query from the authorization response - check Pii enabled logs for details

This happens about 50% of the time.

Possible Solution
It looks like the TCP listener is invoked, but no data is available. Calling ReadAsync seems to block. After some time or if the browser is refreshed, the tcp listener reads 0 bytes.

@bgavrilMS bgavrilMS added the bug label Nov 14, 2019
@bgavrilMS
Copy link
Member Author

P1 as it is blocking customers (Storage Explorer in particular)

@bgavrilMS
Copy link
Member Author

CC @crmann1

@jmprieur
Copy link
Contributor

@bgavrilMS : we did not ship 4.8 yet? we might just want to mark it as fixed (and keep it open)

@jmprieur jmprieur reopened this Nov 19, 2019
@jmprieur jmprieur added the Fixed label Nov 19, 2019
@bgavrilMS
Copy link
Member Author

I merged the fix and it looks like GitHub closes the associated issue...

@bgavrilMS
Copy link
Member Author

I think this is because GitHub inspects the PR comments and if it finds smth like "fixes bug xxx" then it automatically closes bug xxx. Smart, but not customizable ... :)

https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords

@jmprieur
Copy link
Contributor

oh, ok. thanks for the explantion, @bgavrilMS !

@jmprieur
Copy link
Contributor

Released today in MSAL.NET 4.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants