Interaction in progress error caused by other apps #7472
Labels
b2c
Related to Azure B2C library-specific issues
bug-unconfirmed
A reported bug that needs to be investigated and confirmed
msal-angular
Related to @azure/msal-angular package
msal-browser
Related to msal-browser package
Needs: Attention 👋
Awaiting response from the MSAL.js team
public-client
Issues regarding PublicClientApplications
question
Customer is asking for a clarification, use case or information.
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.26.1
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
3.0.25
Public or Confidential Client?
Public
Description
In App A, I start the login process and then close the tap before it finishes. It will create a Msal.interaction.status cookie, and it will remain there even after I have closed App A. And when I try to login to App B, I get the interaction in progress error due to that cookie.
App A and App B share the same origin.
Is the cookie supposed to be there even after I have closed the tab?
I have also tried adding handleRedirectObservable() and handleRedirectPromise()
Error Message
Error - Guard - error: interaction_in_progress: Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API.
MSAL Logs
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Event callback registered with id: 0193d187-b9b4-7025-bb2d-10f56681ad78 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:initializeStart 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Claims-based caching is disabled. Clearing the previous cache with claims 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getTokenKeys - No token keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - getAllAccounts called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getAccountKeys - No account keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Event callback registered with id: 0193d187-ba1a-7184-add9-962819ae6299 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Guard - canActivate 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - MSAL Guard activated 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:initializeStart 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-ba1a-7184-add9-962819ae6299: msal:initializeStart 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Claims-based caching is disabled. Clearing the previous cache with claims 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getTokenKeys - No token keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:initializeEnd 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-ba1a-7184-add9-962819ae6299: msal:initializeEnd 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:initializeEnd 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-ba1a-7184-add9-962819ae6299: msal:initializeEnd 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - handleRedirectPromise called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - getAllAccounts called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getAccountKeys - No account keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:handleRedirectStart 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BroadcastService - msal:handleRedirectStart results in setting inProgress from startup to handleRedirect 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-ba1a-7184-add9-962819ae6299: msal:handleRedirectStart 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BroadcastService - msal:handleRedirectStart results in setting inProgress from startup to handleRedirect 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [0193d187-ba3b-7e38-a23a-de2d6c61cea0] : [email protected] : Verbose - initializeServerTelemetryManager called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [0193d187-ba3b-7e38-a23a-de2d6c61cea0] : [email protected] : Info - handleRedirectPromise called but there is no interaction in progress, returning null. 2
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - handleRedirectPromise has been called for the first time, storing the promise 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Info - initialize has already been called, exiting early. 2
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - handleRedirectPromise called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - handleRedirectPromise has been called previously, returning the result from the first call 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:handleRedirectEnd 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BroadcastService - msal:handleRedirectEnd results in setting inProgress from handleRedirect to none 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - getAllAccounts called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getAccountKeys - No account keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - getAllAccounts called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getAccountKeys - No account keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-ba1a-7184-add9-962819ae6299: msal:handleRedirectEnd 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BroadcastService - msal:handleRedirectEnd results in setting inProgress from handleRedirect to none 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - getAllAccounts called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getAccountKeys - No account keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Guard - no accounts retrieved, log in required to activate 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Guard - logging in by redirect 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Guard - getting destination url 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [0193d187-ba41-706f-b183-3f8dd47ccb74] : @azure/[email protected] : Verbose - loginRedirect called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [0193d187-ba41-706f-b183-3f8dd47ccb74] : @azure/[email protected] : Verbose - acquireTokenRedirect called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - getAllAccounts called 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - BrowserCacheManager.getAccountKeys - No account keys found 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-b9b4-7025-bb2d-10f56681ad78: msal:loginFailure 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Emitting event to callback 0193d187-ba1a-7184-add9-962819ae6299: msal:loginFailure 3
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Error - Guard - error while logging in, unable to activate 0
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Error - Guard - error: 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 0
app-config.ts:24 [Mon, 16 Dec 2024 22:12:33 GMT] : [] : @azure/[email protected] : Verbose - Guard - loginFailedRoute set, redirecting 3
Network Trace (Preferrably Fiddler)
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
Cookie should be cleaned up after closing the tab, or on the login in attempt in the second application. MsalGuard should be able to redirect to login page instead of hitting the interaction in progress error.
Identity Provider
Azure B2C Custom Policy
Browsers Affected (Select all that apply)
Chrome, Other
Regression
No response
The text was updated successfully, but these errors were encountered: