question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UWP authentication sometimes crashes

See original GitHub issue

Which Version of MSAL are you using ? MSAL 3.0.5-preview

Platform UWP

In my UWP app, I only had internetClient capability enabled and it works ok for most users. However, some of my users get an error like

{Microsoft.Identity.Client.MsalException: WAB authentication failed ---> System.IO.FileNotFoundException: The specified protocol is unknown. (Exception from HRESULT: 0x800C000D) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) ...(TRUNCATION)... --- End of stack trace from previous location where exception was thrown --- at UserDetailsClient.MainPage.d__2.MoveNext() ErrorCode: authentication_ui_failed}

Therefore I investigated about what could be the problem and found out it could be related to the app capabilites. Could you please clarify regarding the capabilites needed for UWP.

Here, @jennyf19 states these 4 capabilities are needed:

  <Capabilities>
    <Capability Name="internetClient" />
    <Capability Name="privateNetworkClientServer" />
    <uap:Capability Name="enterpriseAuthentication" />
    <uap:Capability Name="userAccountInformation" />
  </Capabilities>

However, in this example, these 4 capabilities are listed (sharedUserCertificates instead of userAccountInformation):

  <Capabilities>
    <Capability Name="internetClient" />
    <Capability Name="privateNetworkClientServer" />
    <uap:Capability Name="enterpriseAuthentication" />
    <uap:Capability Name="sharedUserCertificates" />
  </Capabilities>

Then again, in this example, only this capability is listed:

  <Capabilities>
    <Capability Name="internetClient" />
  </Capabilities>

Two of the above capabilites, sharedUserCertificates & enterpriseAuthentication, are restricted capabilites and I would only want to include them if they are indeed needed.

All very confusing. Could you maybe clarify here and in the docs?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
tipacommented, Nov 21, 2019

Sure, I’ve just sent them

1reaction
bgavrilMScommented, Oct 4, 2019

I added a retry when calling WAB and some information on how to collect logs if this occurs again. It’s not a fix per se, but hopefully it will bring us closer to a solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UWP App Randomly Crashes When Returning to Previous ...
The problem is that sometimes, when returning to the edit page, the debugger breaks in the generated file App.g.i.cs with an
Read more >
UWP App crash at different screens when using it for a long ...
In our UWP app we have XAML screens with ListView, Grid, ScrollView, ItemsControl like UWP elements. To show HTML content we use Web...
Read more >
Xamarin crashes when UWP running debugger
Xamarin crashes when UWP running debuggerClosed - Not Enough Info View resolution ... We've been seeing a crash that happens with XAML Hot...
Read more >
My Game is Not Launching or is Crashing on PC
In Credential Manager, click on the "Windows Credentials" button. ... Sometimes other programs can affect game performance.
Read more >
UWP
EnableCrashReporting will cause the RaygunClient to automatically listen to all unhandled exceptions that your application experiences, and send them off to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found