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] AcquireTokenSilent throws an exception

See original GitHub issue

Which Version of MSAL are you using ? MSAL 4.14 and MSAL 4.15

Platform Android Xamarin, note that there is no broker (Authenticater) installed on the mobile devices

What authentication flow has the issue?

  • Mobile on Android device
    • AcquireTokenSilent

Other? - please describe;

Is this a new or existing app? The app is in production with 2 different versions using msal 4.14 or 4.15

Repro While the application runs, AcquireTokenSilent() is called several times. It is thrown the firsttime the application started, but also when the application had a few succesfull calls to AcquireTokenSilent() It looks like it occurs random.

applicationBuilder = PublicClientApplicationBuilder.Create(_configuration.AdClientId)
                    .WithLogging(CustomLoggingMethod, Microsoft.Identity.Client.LogLevel.Info,
                        enablePiiLogging: false,
                        enableDefaultPlatformLogging: false)//no logs to logcat
                    .WithAuthority(_configuration.AdAuthority)
                    .WithRedirectUri(redirectUrl)
                    .Build();

                var accounts = await applicationBuilder.GetAccountsAsync().ConfigureAwait(false);
                var lastUsedAccount = accounts.FirstOrDefault((a) => _tokenCacheService.Cached.EqualsAccountUsername(a.Username));

var authResult = await applicationBuilder
                        .AcquireTokenSilent(_configuration.AdScopes, lastUsedAccount)
                        .WithCorrelationId(Guid.NewGuid())
                        .ExecuteAsync()
                        .ConfigureAwait(false);

Expected behavior It is expected that applicationBuilder.AcquireTokenSilent() returns a valid token.

Actual behavior Note, that in most cases the AcquireTokenSilent, does return a valid token. However, an exception has been thrown a few times. In production we currently use MSAL 4.14 and 4.15 in different versions of the same application. In both versions the exception has been thrown. Because the callstack in the exception is not identical, for both MSAL versions the logging is added.

Possible Solution no idea yet.

Additional context/ Logs / Screenshots Logging for application with MSAL 4.14:

2020-07-29 07:15:50.2516 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50] Deserialized 1 items to token cache. 2020-07-29 07:15:50.2543 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] MSAL MSAL.Xamarin.Android with assembly version ‘4.14.0.0’. CorrelationId(887cd467-2770-456c-8b5f-f9165181c03c) 2020-07-29 07:15:50.2579 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] === AcquireTokenSilent Parameters === 2020-07-29 07:15:50.2595 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] LoginHint provided: False 2020-07-29 07:15:50.2610 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Account provided: True 2020-07-29 07:15:50.2624 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] ForceRefresh: False 2020-07-29 07:15:50.2648 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] === Request Data === Authority Provided? - True Scopes - api://<removed>/.default offline_access Extra Query Params Keys (space separated) -

2020-07-29 07:15:50.2664 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] === Token Acquisition (SilentRequest) started:

Authority Host: login.microsoftonline.com

2020-07-29 07:15:50.2682 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Looking up access token in the cache. 2020-07-29 07:15:50.2712 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Filtering by tenant id item count before 1 after 1 2020-07-29 07:15:50.2729 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Filtering by home account id item count before 1 after 1 2020-07-29 07:15:50.2743 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Filtering by token type item count before 1 after 1 2020-07-29 07:15:50.2757 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Matching entry count - 1 2020-07-29 07:15:50.2774 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Filtering by scopes item count before 1 after 1 2020-07-29 07:15:50.2794 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Access token has expired or about to expire. [Current time (07/29/2020 05:15:50) - Expiration Time (07/29/2020 05:18:37 +00:00) - Extended Expiration Time (07/29/2020 05:18:37 +00:00)] 2020-07-29 07:15:50.2825 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Refresh token found in the cache? - True 2020-07-29 07:15:50.2850 Info 3459 MSAL Info False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:15:50 - 887cd467-2770-456c-8b5f-f9165181c03c] Resolving authority endpoints… Already resolved? - TRUE 2020-07-29 07:20:39.6565 Error 3461 MSAL Error False (False) MSAL 4.14.0.0 MSAL.Xamarin.Android 19 [07/29/2020 05:20:39 - 887cd467-2770-456c-8b5f-f9165181c03c] Exception type: Java.IO.IOException

at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <2cf3b6713d4f47bab26b2a9fc4e5375e>:0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <2cf3b6713d4f47bab26b2a9fc4e5375e>:0 at Java.Net.HttpURLConnection.get_ResponseCode () [0x0000a] in <f10b261e224f49ae8dc5cbf2e7f62818>:0 at Xamarin.Android.Net.AndroidClientHandler+<>c__DisplayClass46_0.<DoProcessRequest>b__2 () [0x00000] in <f10b261e224f49ae8dc5cbf2e7f62818>:0 at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <7675e239ab70496f89f07b8d043c0155>:0 at System.Threading.Tasks.Task.Execute () [0x00000] in <7675e239ab70496f89f07b8d043c0155>:0 — End of stack trace from previous location where exception was thrown —

at Xamarin.Android.Net.AndroidClientHandler.DoProcessRequest (System.Net.Http.HttpRequestMessage request, Java.Net.URL javaUrl, Java.Net.HttpURLConnection httpConnection, System.Threading.CancellationToken cancellationToken, Xamarin.Android.Net.AndroidClientHandler+RequestRedirectionState redirectState) [0x0036c] in <f10b261e224f49ae8dc5cbf2e7f62818>:0 at Xamarin.Android.Net.AndroidClientHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x002c7] in <f10b261e224f49ae8dc5cbf2e7f62818>:0 at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in <74304af6b1b549478867083afed9e28a>:0 at Microsoft.Identity.Client.Http.HttpManager.ExecuteAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Net.Http.HttpContent body, System.Net.Http.HttpMethod method) [0x000c5] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Http.HttpManager.ExecuteWithRetryAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Net.Http.HttpContent body, System.Net.Http.HttpMethod method, Microsoft.Identity.Client.Core.ICoreLogger logger, System.Boolean doNotThrow, System.Boolean retry) [0x0013b] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Http.HttpManager.SendPostAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Net.Http.HttpContent body, Microsoft.Identity.Client.Core.ICoreLogger logger) [0x0008b] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Http.HttpManager.SendPostAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Collections.Generic.IDictionary2[TKey,TValue] bodyParameters, Microsoft.Identity.Client.Core.ICoreLogger logger) [0x00099] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.OAuth2.OAuth2Client.ExecuteRequestAsync[T] (System.Uri endPoint, System.Net.Http.HttpMethod method, Microsoft.Identity.Client.Core.RequestContext requestContext, System.Boolean expectErrorsOn200OK, System.Boolean addCommonHeaders) [0x0015e] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.OAuth2.OAuth2Client.GetTokenAsync (System.Uri endPoint, Microsoft.Identity.Client.Core.RequestContext requestContext, System.Boolean addCommonHeaders) [0x00084] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync (System.String tokenEndpoint) [0x000c8] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync (System.Collections.Generic.IDictionary2[TKey,TValue] additionalBodyParameters, System.String scopeOverride, System.String tokenEndpointOverride, System.Threading.CancellationToken cancellationToken) [0x000fc] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendTokenRequestAsync (System.String tokenEndpoint, System.Collections.Generic.IDictionary2[TKey,TValue] additionalBodyParameters, System.Threading.CancellationToken cancellationToken) [0x000a3] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Internal.Requests.SilentRequest.RefreshAccessTokenAsync (Microsoft.Identity.Client.Cache.Items.MsalRefreshTokenCacheItem msalRefreshTokenItem, System.Threading.CancellationToken cancellationToken) [0x00112] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Internal.Requests.SilentRequest.RefreshRtOrFailAsync (System.Threading.CancellationToken cancellationToken) [0x0016c] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Internal.Requests.SilentRequest.ExecuteAsync (System.Threading.CancellationToken cancellationToken) [0x00329] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync (System.Threading.CancellationToken cancellationToken) [0x0016e] in <62c5f81aa08b40f6a5628154f09a4f0a>:0 — End of managed Java.IO.IOException stack trace — java.io.EOFException at com.android.okhttp.internal.Util.readAsciiLine(Util.java:318) at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308) at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135) at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644) at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503) at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:136) at dalvik.system.NativeStart.run(Native Method)

Logging for application with MSAL 4.15:

2020-08-07 22:36:19.5706 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19] Deserialized 1 items to token cache. 2020-08-07 22:36:19.5766 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] MSAL MSAL.Xamarin.Android with assembly version ‘4.15.0.0’. CorrelationId(1358eb5c-732b-4d62-823c-ffa2f4bf4c18) 2020-08-07 22:36:19.5790 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] === AcquireTokenSilent Parameters === 2020-08-07 22:36:19.5805 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] LoginHint provided: False 2020-08-07 22:36:19.5819 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Account provided: True 2020-08-07 22:36:19.5833 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] ForceRefresh: False 2020-08-07 22:36:19.5856 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] === Request Data === Authority Provided? - True Scopes - api://<removed>/.default offline_access Extra Query Params Keys (space separated) -

2020-08-07 22:36:19.5872 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] === Token Acquisition (SilentRequest) started:

Authority Host: login.microsoftonline.com

2020-08-07 22:36:19.5888 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Attempting to acquire token using using local cache… 2020-08-07 22:36:19.5906 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Looking up access token in the cache. 2020-08-07 22:36:19.5936 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Filtering by tenant id item count before 1 after 1 2020-08-07 22:36:19.5952 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Filtering by home account id item count before 1 after 1 2020-08-07 22:36:19.5968 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Filtering by token type item count before 1 after 1 2020-08-07 22:36:19.5983 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Matching entry count - 1 2020-08-07 22:36:19.6000 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Filtering by scopes item count before 1 after 1 2020-08-07 22:36:19.6019 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Access token has expired or about to expire. [Current time (08/07/2020 20:36:19) - Expiration Time (08/07/2020 20:36:07 +00:00) - Extended Expiration Time (08/07/2020 20:36:07 +00:00)] 2020-08-07 22:36:19.6049 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Refresh token found in the cache? - True 2020-08-07 22:36:19.6073 Info 427 MSAL Info False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:36:19 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Resolving authority endpoints… Already resolved? - TRUE 2020-08-07 22:36:28.3850 Info 379 PushService.ConnectionOnStateChanged() from Connected to Disconnected. 2020-08-07 22:36:28.3867 Info 379 Account.EnsureValidTokenSilentAsync(): initiate SilentTokenRequest >> 2020-08-07 22:36:28.3879 Info 379 Account.LoginSilentAsync(RoleCount 0): initiate SilentTokenRequest 2020-08-07 22:36:28.3890 Info 379 Account.LoginServiceBase.Execute() 2020-08-07 22:37:59.5422 Error 379 MSAL Error False (False) MSAL 4.15.0.0 MSAL.Xamarin.Android 19 [08/07/2020 20:37:59 - 1358eb5c-732b-4d62-823c-ffa2f4bf4c18] Exception type: Java.IO.IOException

at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <e12090061e9543f78670b707342f74aa>:0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <e12090061e9543f78670b707342f74aa>:0 at Java.Net.HttpURLConnection.get_ResponseCode () [0x0000a] in <6546ee6e35934592aba6a8abe6a8ea31>:0 at Xamarin.Android.Net.AndroidClientHandler+<>c__DisplayClass46_0.<DoProcessRequest>b__2 () [0x00000] in <6546ee6e35934592aba6a8abe6a8ea31>:0 at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <9d6fd9f223064a5a82eb5faaf0c2a30c>:0 at System.Threading.Tasks.Task.Execute () [0x00000] in <9d6fd9f223064a5a82eb5faaf0c2a30c>:0 — End of stack trace from previous location where exception was thrown —

at Xamarin.Android.Net.AndroidClientHandler.DoProcessRequest (System.Net.Http.HttpRequestMessage request, Java.Net.URL javaUrl, Java.Net.HttpURLConnection httpConnection, System.Threading.CancellationToken cancellationToken, Xamarin.Android.Net.AndroidClientHandler+RequestRedirectionState redirectState) [0x0036c] in <6546ee6e35934592aba6a8abe6a8ea31>:0 at Xamarin.Android.Net.AndroidClientHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x002c7] in <6546ee6e35934592aba6a8abe6a8ea31>:0 at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in <27e9d596031b4c3191ebf40dda35a22d>:0 at Microsoft.Identity.Client.Http.HttpManager.ExecuteAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Net.Http.HttpContent body, System.Net.Http.HttpMethod method) [0x000c5] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Http.HttpManager.ExecuteWithRetryAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Net.Http.HttpContent body, System.Net.Http.HttpMethod method, Microsoft.Identity.Client.Core.ICoreLogger logger, System.Boolean doNotThrow, System.Boolean retry) [0x0013b] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Http.HttpManager.SendPostAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Net.Http.HttpContent body, Microsoft.Identity.Client.Core.ICoreLogger logger) [0x0008b] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Http.HttpManager.SendPostAsync (System.Uri endpoint, System.Collections.Generic.IDictionary2[TKey,TValue] headers, System.Collections.Generic.IDictionary2[TKey,TValue] bodyParameters, Microsoft.Identity.Client.Core.ICoreLogger logger) [0x00099] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.OAuth2.OAuth2Client.ExecuteRequestAsync[T] (System.Uri endPoint, System.Net.Http.HttpMethod method, Microsoft.Identity.Client.Internal.RequestContext requestContext, System.Boolean expectErrorsOn200OK, System.Boolean addCommonHeaders) [0x0011c] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.OAuth2.OAuth2Client.GetTokenAsync (System.Uri endPoint, Microsoft.Identity.Client.Internal.RequestContext requestContext, System.Boolean addCommonHeaders) [0x00084] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync (System.String tokenEndpoint) [0x000c8] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync (System.Collections.Generic.IDictionary2[TKey,TValue] additionalBodyParameters, System.String scopeOverride, System.String tokenEndpointOverride, System.Threading.CancellationToken cancellationToken) [0x000fc] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendTokenRequestAsync (System.String tokenEndpoint, System.Collections.Generic.IDictionary2[TKey,TValue] additionalBodyParameters, System.Threading.CancellationToken cancellationToken) [0x000a3] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Internal.Requests.Silent.SilentClientAuthStretegy.RefreshAccessTokenAsync (Microsoft.Identity.Client.Cache.Items.MsalRefreshTokenCacheItem msalRefreshTokenItem, System.Threading.CancellationToken cancellationToken) [0x0011c] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Internal.Requests.Silent.SilentClientAuthStretegy.RefreshRtOrFailAsync (System.Threading.CancellationToken cancellationToken) [0x0016c] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Internal.Requests.Silent.SilentClientAuthStretegy.ExecuteAsync (System.Threading.CancellationToken cancellationToken) [0x0023b] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync (System.Threading.CancellationToken cancellationToken) [0x0009b] in <5379e12126bf461d83f6959d6b241d45>:0 at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync (System.Threading.CancellationToken cancellationToken) [0x0016e] in <5379e12126bf461d83f6959d6b241d45>:0 — End of managed Java.IO.IOException stack trace — java.io.EOFException at com.android.okhttp.internal.Util.readAsciiLine(Util.java:318) at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308) at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135) at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644) at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503) at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:136) at dalvik.system.NativeStart.run(Native Method)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-papencommented, Sep 15, 2020

Yes I openned an issue at Xamarin repo like 11 days ago. Didnt get any response on that issue yet

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calling acquireTokenSilent throws but error cannot be caught
It is thrown by the SilentFlowClient which is created internally when calling acquireTokenSilent and should be caught and handled internally by ...
Read more >
AcquireTokenSilent() throws Failed to acquire token ...
I have a native client application and I'm trying to use AcquireTokenSilent() so there isn't a prompt for user creds. However, after many...
Read more >
Handle errors and exceptions in MSAL.js
This error is thrown by acquireTokenSilent if the user is required to interact with the server to provide credentials or consent for ...
Read more >
Handle errors and exceptions in MSAL.NET
MsalServiceException is thrown when the Identity Provider (Azure AD) returns an error. It's a translation of the server error.
Read more >
Acquiretokensilent msal javascript. To be 100% sure that the ...
Thus far, javascript; reactjs; azure-ad-msal; MSAL JS throws multiple_matching_tokens_detected exception while renewing id token using acquireTokenSilent ...
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