Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Uncaught sign-in error with MSAL.js 2.0 - BrowserAuthError: interaction_in_progress: Interaction is currently in progress #1491

Closed
NathZ1 opened this issue Jan 20, 2022 · 5 comments · Fixed by #1574

Comments

@NathZ1
Copy link
Contributor

NathZ1 commented Jan 20, 2022

Occasionally, users of my newly implemented React app are getting an error when they attempt to sign in. I think this is related to partially signing in, then closing and reopening the app and trying again. I have tried to reproduce consistently but i am struggling to get a set of steps that reliably cause the error.

Describe the bug
User is unable to sign in to app using the MGT Login component. Nothing happens when they click 'Sign In', and viewing the console shows uncaught error:

image

To Reproduce
Steps to reproduce the behavior - not confirmed yet sorry, but appears to be related to cancelling the login process when redirected to O365 login page then reloading the app and trying to login again:

Expected behavior
Cancel any current in-progress interactions and re-start the sign in process, handling MSAL errors silently.

Environment (please complete the following information):

  • OS: Windows 10
  • Browser: Chromium
  • Framework: React
  • Context: MSAL sign-in
  • Version: 2.3.1
  • Provider: MSAL2
@NathZ1 NathZ1 added bug Something isn't working Needs: Triage 🔍 labels Jan 20, 2022
@ghost
Copy link

ghost commented Jan 20, 2022

Hello NathZ1, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@sebastienlevert
Copy link
Contributor

Hello @NathZ1! We will be looking at this to try to reproduce it and let you know of our findings! Thanks for reporting!

@musale
Copy link
Contributor

musale commented Jan 31, 2022

I accidentally reproduced this error. My steps are:

  1. Use the mgt-mock-provider and mgt-login components to login. This should work.
  2. Comment out mgt-mock-provider and use mgt-msal2-provider. It loads the mgt-mock-provider user Megan Bowen(I suspect caching - not sure) first.
  3. Try to sign out. This will throw the error but still sign you out.
  4. Try to sign in. This will also throw the error and NOT sign you in.
  5. Empty cache and hard refresh. You will automatically be signed in.
  6. Try signing out. This will throw the error but still sign you out.

@NathZ1 I assume you are using the mgt-msal-provider can you reproduce the error using my steps? @sebastienlevert can you also reproduce to be sure?

@musale
Copy link
Contributor

musale commented Jan 31, 2022

@NathZ1 @sebastienlevert This looks like a MSALJS issue. Here is a draft PR referencing the error thrown above AzureAD/microsoft-authentication-library-for-js#4460. We should wait for this fix, test it and revert here if the problem persists.

@sebastienlevert
Copy link
Contributor

Seems to have been fixed upstream : https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-browser-v2.22.0

Can we do a test upgrading to this latest version?

@ghost ghost added the State: In Review label Feb 22, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants