NullReferenceException in iOS only
See original GitHub issueI am getting a runtime error:
System.NullReferenceException: Object reference not set to an instance of an object
When i click on Sign in button.
the error is occurring at this step (PCA is null):
PCA = new PublicClientApplication(ClientID)
{
RedirectUri = $"msal{App.ClientID}://auth",
};
Complete Error:
System.NullReferenceException: Object reference not set to an instance of an object at Microsoft.Identity.Core.TokenCacheAccessor.GetTeamId () [0x0003f] in <772466974f16475694ca93a5f7a70108>:0 at Microsoft.Identity.Core.TokenCacheAccessor..ctor () [0x0001c] in <772466974f16475694ca93a5f7a70108>:0 at Microsoft.Identity.Core.Telemetry.TelemetryTokenCacheAccessor..ctor () [0x00000] in <772466974f16475694ca93a5f7a70108>:0 at Microsoft.Identity.Client.TokenCache..ctor () [0x00000] in <772466974f16475694ca93a5f7a70108>:0 at Microsoft.Identity.Client.PublicClientApplication..ctor (System.String clientId, System.String authority) [0x00014] in <772466974f16475694ca93a5f7a70108>:0 at Microsoft.Identity.Client.PublicClientApplication..ctor (System.String clientId) [0x00000] in <772466974f16475694ca93a5f7a70108>:0 at UserDetailsClient.App..ctor () [0x00009] in Downloads/active-directory-xamarin-native-v2-master/UserDetailsClient/UserDetailsClient/App.cs:30
Only iOS is giving me this . Android Version is working fine. I am using Visual Studio for Mac
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (3 by maintainers)
Top GitHub Comments
I was able to worked around the issue with the following hack:
Speaking of hack: I must say that the
GetTeamId()
method looks pretty hacky too 😛@jennyf19 I tested and it works out of the box as expected. Great work