CommunityToolkit / Graph-Controls

Set of Helpers and Controls for Windows development using the Microsoft Graph.
https://docs.microsoft.com/en-us/windows/communitytoolkit/graph/overview
Other
155 stars 39 forks source link

NullReferenceException in WindowsProvider #205

Closed kinex closed 1 year ago

kinex commented 1 year ago

Trying to sign in results the exception System.NullReferenceException here https://github.com/CommunityToolkit/Graph-Controls/blob/main/CommunityToolkit.Authentication.Uwp/WindowsProvider.cs#L401

Maybe related to https://github.com/CommunityToolkit/Graph-Controls/pull/136

Stack Trace:

CommunityToolkit.Authentication.Uwp.dll!CommunityToolkit.Authentication.WindowsProvider.AuthenticateInteractiveAsync(string[] scopes) Line 401  C#
    CommunityToolkit.Authentication.Uwp.dll!CommunityToolkit.Authentication.WindowsProvider.GetTokenAsync(bool silentOnly) Line 208 C#
    CommunityToolkit.Authentication.Uwp.dll!CommunityToolkit.Authentication.WindowsProvider.SignInAsync() Line 131  C#

Package version 7.1.3

Windows Version 10.0.19045.2486

Device form factor: desktop

Visual Studio 2019 (version: 16.111.23)

ghost commented 1 year ago

Hello kinex, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

kinex commented 1 year ago

OK I found it. Need to create WindowsProvider with the dispatcherQueue parameter.