Closed patolax closed 4 months ago
Looks like you're firing several requests at the same time which are failing and each falling back to interaction. Only one interaction is allowed at a time. Based on your code snippets above it looks like you have fallback logic that invokes acquireTokenPopup but you're not checking if an interaction is already in progress. See here for more.
Relevant logs for reference:
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [c6f13c73-9428-43bf-ace0-f5a392af2a1c] : @azure/msal-browser@2.38.4 : Verbose - acquireTokenRedirect called
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-browser@2.38.4 : Verbose - preflightBrowserEnvironmentCheck started
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-browser@2.38.4 : Verbose - preflightInteractiveRequest called, validating app environment
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-browser@2.38.4 : Verbose - getAllAccounts called
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-common@13.3.1 : Info - CacheManager:getIdToken - Returning id token
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-browser@2.38.4 : Info - Emitting event: msal:acquireTokenStart
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-browser@2.38.4 : Verbose - Emitting event to callback 7b192272-3903-443e-97aa-cc9ac517cf6f: msal:acquireTokenStart
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-angular@2.5.13 : Verbose - BroadcastService - msal:acquireTokenStart results in setting inProgress from none to acquireToken
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [6d36b58d-00f6-4191-8e21-79a1dc35a21f] : msal.js.browser@2.38.4 : Verbose - initializeAuthorizationRequest called
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [6d36b58d-00f6-4191-8e21-79a1dc35a21f] : msal.js.browser@2.38.4 : Verbose - getRedirectUri called
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [6d36b58d-00f6-4191-8e21-79a1dc35a21f] : msal.js.browser@2.38.4 : Verbose - Initializing BaseAuthRequest
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [6d36b58d-00f6-4191-8e21-79a1dc35a21f] : msal.js.browser@2.38.4 : Verbose - Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-angular@2.5.13 : Error - Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve. main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-angular@2.5.13 : Error - Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve. main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-angular@2.5.13 : Error - Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve. main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : @azure/msal-angular@2.5.13 : Error - Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve.
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [6d36b58d-00f6-4191-8e21-79a1dc35a21f] : msal.js.browser@2.38.4 : Verbose - Setting validated request account
main.12a91667d91c2598.js:1 [Fri, 19 Apr 2024 04:21:06 GMT] : [d025eedc-2bbe-4375-8d0d-7370a95b27e2] : @azure/msal-browser@2.38.4 : Verbose - acquireTokenPopup called
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
2.28.1
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.4.3
Public or Confidential Client?
Public
Description
After user login and 2 days after when token has expired when the page is reloaded, it takes a long time to redirect to b2c login page. Sometimes if we click on page then redirection takes place otherwise no change. Console is showin this error.
Error Message
BrowserAuthError: interaction_in_progress: Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors. BrowserAuthError: interaction_in_progress: Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors.
MSAL Logs
www.redacted.com-1713500518270.log
Network Trace (Preferrably Fiddler)
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
Recirect the user to b2c login page without significant wait. Currently it stays in loading state.
Identity Provider
Azure B2C Basic Policy
Browsers Affected (Select all that apply)
Chrome, Firefox, Edge
Regression
no
Source
External (Customer)