Object reference not set to an instance of an object
See original GitHub issueHi,
I’m using Microsoft.Identity.Client, Version=1.1.3.-preview0012
And i’ve got this error on iOS. (android works fine)
{System.NullReferenceException: Object reference not set to an instance of an object at Microsoft.Identity.Client.TokenCacheAccessor.Remove (System.String key, System.String service) [0x00055] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.TokenCacheAccessor.SetValueForKey (System.String key, System.String value, System.String service) [0x00000] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.TokenCacheAccessor.SaveAccessToken (System.String cacheKey, System.String item) [0x00000] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.Internal.Telemetry.TelemetryTokenCacheAccessor.SaveAccessToken (System.String cacheKey, System.String item, Microsoft.Identity.Client.Internal.RequestContext requestContext) [0x00023] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.TokenCache.SaveAccessAndRefreshToken (Microsoft.Identity.Client.Internal.Requests.AuthenticationRequestParameters requestParams, Microsoft.Identity.Client.Internal.OAuth2.TokenResponse response) [0x00291] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase.SaveTokenResponseToCache () [0x001a8] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase.PostTokenRequest () [0x00008] in <7f73819fd99b45669100adda813d89e4>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase+<RunAsync>d__33.MoveNext () [0x00360] in <7f73819fd99b45669100adda813d89e4>:0 — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535 at Microsoft.Identity.Client.PublicClientApplication+<AcquireTokenForUserCommonAsync>d__18.MoveNext () [0x000d2] in <7f73819fd99b45669100adda813d89e4>:0 — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 …
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top GitHub Comments
@jennyf19 thank you so much you are really fast.
@Journeyman42 - That is not correct. We do not have broker for MSAL yet. I will update the wiki. It should be:
Can you open an issue in MSAL with the logs and stack trace? this will help us investigate the issue you’re running into. thanks.