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.

[Bug] ArgumentNullException when creating MsalException

See original GitHub issue

Which Version of MSAL are you using ? MSAL 4.4.0

Platform UWP

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

Actual behavior Some of my users are experiencing a new issue that hasn’t been present before. I initially got aware of it 2 weeks ago.

System.ArgumentNullException: Value cannot be null.
   at Microsoft.Identity.Client.MsalException.set_ErrorCode(String) + 0x4e
   at Microsoft.Identity.Client.MsalException..ctor(String, String) + 0x36
   at Microsoft.Identity.Client.MsalServiceException..ctor(String, String) + 0xc
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.VerifyAuthorizationResult() + 0x1db
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.<ExecuteAsync>d__9.MoveNext() + 0x23a
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__14.MoveNext() + 0x477
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
tipacommented, Oct 6, 2019

Alright, I will ask my users these questions and let you know here if and when they respond. From one of those users I already know that he eventually was able to finish the auth process successfully.

What I found really interesting: Both these users are using a “Microsoft Surface Pro 6 Desktop”.

0reactions
jennyf19commented, Oct 16, 2019

This is included in the 4.5.0 release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handle exceptions and errors in MSAL for Android
Learn how to handle errors and exceptions, Conditional Access, and claims challenges in MSAL Android applications.
Read more >
FIX: ArgumentNullException exception error message ...
Fixes an issue in which an ArgumentNullException exception occurs when the Web service processes a null stream response with asynchronous HTTP handlers in...
Read more >
ArgumentNullException. UriString Null Parameter when I ...
1 Answer. The reason you are getting this error is because you are trying to use Storage Emulator for Service Bus. Storage Emulator...
Read more >
MSAL.PS
Gets user information including user Id. Some elements in UserInfo might be null if not returned by the service. ... Gets the entire...
Read more >
netFramework/Microsoft.Identity.Client.xml 2.0.5-Preview1
If the region cannot be determined (e.g. not running on Azure), MSALClientException is thrown with error code region_discovery_failed.
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