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

Error: Uncaught (in promise): InteractionRequiredAuthError: interaction_required: AADB2C90077: User does not have an existing session and request prompt parameter has a value of 'None'. #7115

Closed
2 tasks
gabi04 opened this issue May 20, 2024 · 2 comments
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: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@gabi04
Copy link

gabi04 commented May 20, 2024

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.13.0

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

3.0.16

Public or Confidential Client?

Public

Description

My app is working aparetally alrigth

But my data dog is full of errors like the one that I'm attaching

Error Message

InteractionRequiredAuthError: interaction_required: AADB2C90077: User does not have an existing session and request prompt parameter has a value of 'None'.
Correlation ID: environment.azure.clientId
Timestamp: 2024-05-14 14:41:10Z

MSAL Logs

Error: Uncaught (in promise): InteractionRequiredAuthError: interaction_required: AADB2C90077: User does not have an existing session and request prompt parameter has a value of 'None'.
Correlation ID: environment.azure.clientId
Timestamp: 2024-05-14 14:41:10Z
InteractionRequiredAuthError: interaction_required: AADB2C90077: User does not have an existing session and request prompt parameter has a value of 'None'.
Correlation ID: environment.azure.clientId
Timestamp: 2024-05-14 14:41:10Z
at nn.validateServerAuthorizationCodeResponse (https://clientportal-test.iadb.org/main.js:1:2033937)
at Fn.handleFragmentResponse (https://clientportal-test.iadb.org/main.js:1:2041269)
at https://clientportal-test.iadb.org/main.js:1:2087258
at Generator.next ()
at i (https://clientportal-test.iadb.org/main.js:1:2271949)
at v (https://clientportal-test.iadb.org/main.js:1:2272151)
at https://clientportal-test.iadb.org/main.js:1:2272210
at new t (https://clientportal-test.iadb.org/polyfills.js:1:18396)
at https://clientportal-test.iadb.org/main.js:1:2272092
at g.handleCodeResponse (https://clientportal-test.iadb.org/main.js:1:2087503)
at z @ https://clientportal-test.iadb.org/polyfills.js:1:16008
at @ https://clientportal-test.iadb.org/polyfills.js:1:15098
at @ https://clientportal-test.iadb.org/polyfills.js:1:15204
at @ https://clientportal-test.iadb.org/main.js:1:2143662
at v.invoke @ https://clientportal-test.iadb.org/polyfills.js:1:6593
at Object.onInvoke @ https://clientportal-test.iadb.org/main.js:1:1247047
at v.invoke @ https://clientportal-test.iadb.org/polyfills.js:1:6533
at L.run @ https://clientportal-test.iadb.org/polyfills.js:1:1974
at @ https://clientportal-test.iadb.org/polyfills.js:1:16803
at v.invokeTask @ https://clientportal-test.iadb.org/polyfills.js:1:7211
Handled by
Error:
at Mc.handleError @ https://clientportal-test.iadb.org/main.js:1:1244459
at Object.next @ https://clientportal-test.iadb.org/main.js:1:1307015
at x.next @ https://clientportal-test.iadb.org/main.js:1:1017990
at P._next @ https://clientportal-test.iadb.org/main.js:1:1017666
at P.next @ https://clientportal-test.iadb.org/main.js:1:1017356
at @ https://clientportal-test.iadb.org/main.js:1:1015312
at f @ https://clientportal-test.iadb.org/main.js:1:1039302
at Py.next @ https://clientportal-test.iadb.org/main.js:1:1015151

Error: Uncaught (in promise): BrowserAuthError: hash_empty_error: Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors
BrowserAuthError: hash_empty_error: Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors
at V (https://clientportal-test.iadb.org/main.js:1:2160264)
at X (https://clientportal-test.iadb.org/main.js:1:2089010)
at https://clientportal-test.iadb.org/main.js:1:1981451
at https://clientportal-test.iadb.org/main.js:1:2111522
at Generator.next ()
at i (https://clientportal-test.iadb.org/main.js:1:2271949)
at v (https://clientportal-test.iadb.org/main.js:1:2272151)
at v.invoke (https://clientportal-test.iadb.org/polyfills.js:1:6593)
at Object.onInvoke (https://clientportal-test.iadb.org/main.js:1:1247047)
at v.invoke (https://clientportal-test.iadb.org/polyfills.js:1:6533)
at z @ https://clientportal-test.iadb.org/polyfills.js:1:16008
at @ https://clientportal-test.iadb.org/polyfills.js:1:15098
at @ https://clientportal-test.iadb.org/polyfills.js:1:15204
at @ https://clientportal-test.iadb.org/main.js:1:2143662
at v.invoke @ https://clientportal-test.iadb.org/polyfills.js:1:6593
at Object.onInvoke @ https://clientportal-test.iadb.org/main.js:1:1247047
at v.invoke @ https://clientportal-test.iadb.org/polyfills.js:1:6533
at L.run @ https://clientportal-test.iadb.org/polyfills.js:1:1974
at @ https://clientportal-test.iadb.org/polyfills.js:1:16803
at v.invokeTask @ https://clientportal-test.iadb.org/polyfills.js:1:7211
Handled by
Error:
at Mc.handleError @ https://clientportal-test.iadb.org/main.js:1:1244459
at Object.next @ https://clientportal-test.iadb.org/main.js:1:1307015
at x.next @ https://clientportal-test.iadb.org/main.js:1:1017990
at P._next @ https://clientportal-test.iadb.org/main.js:1:1017666
at P.next @ https://clientportal-test.iadb.org/main.js:1:1017356
at @ https://clientportal-test.iadb.org/main.js:1:1015312
at f @ https://clientportal-test.iadb.org/main.js:1:1039302
at Py.next @ https://clientportal-test.iadb.org/main.js:1:1015151

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

export const MsalConfig: Configuration = {
  auth: {
    authority: environment.azure.loginUrl,
    clientId: environment.azure.clientId,
    redirectUri: '/',
    postLogoutRedirectUri: '/',
    knownAuthorities: [`${environment.azure.loginUrl}/oauth2/v2.0/authorize`],
  },
  cache: {
    cacheLocation: 'localStorage',
    storeAuthStateInCookie: isIE,
  },
  system: {
    iframeHashTimeout: 20000,
  },
};

Relevant Code Snippets

Besides the configura

import { NgModule } from '@angular/core';
import {
  MsalGuard,
  MsalInterceptor,
  MsalModule,
  MsalRedirectComponent,
  MsalService,
  MsalInterceptorConfiguration,
  MsalGuardConfiguration
} from '@azure/msal-angular';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import {InterceptorMSAL, MsalConfig, ProtectedResources} from "./auth.constants";
import {PublicClientApplication} from "@azure/msal-browser";

/**
 * Module auth, declaration to msal module and add msal interceptor in providers
 */
@NgModule({
  declarations: [],
  imports: [
    MsalModule.forRoot(
      new PublicClientApplication(MsalConfig),
      ProtectedResources as MsalGuardConfiguration,
      InterceptorMSAL as MsalInterceptorConfiguration
    )
  ],
  providers: [
    MsalService,
    { provide: HTTP_INTERCEPTORS, useClass: MsalInterceptor, multi: true },
    MsalGuard,
  ],
  bootstrap: [MsalRedirectComponent],
})
export class AuthModule {}

Reproduction Steps

await token expire and monitor console

Expected Behavior

no recievin those errors in data dog

Identity Provider

Azure B2C Basic Policy

Browsers Affected (Select all that apply)

Chrome, Firefox, Edge, Safari

Regression

No response

Source

External (Customer)

@gabi04 gabi04 added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels May 20, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label May 20, 2024
@github-actions github-actions bot added b2c Related to Azure B2C library-specific issues msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels May 20, 2024
@hectormmg
Copy link
Member

@gabi04 this will happen when MSAL attempts to refresh a token silently after a session has expired. The interaction required error is returned to the application so it can fall back to interactive authentication, but the error remains in the logs anyway. As long as interactive auth works as a fallback, this is by design so I wouldn't worry about it.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels May 21, 2024
Copy link
Contributor

@gabi04 This issue has been automatically marked as stale because it is marked as requiring author feedback but has not had any activity for 5 days. If your issue has been resolved please let us know by closing the issue. If your issue has not been resolved please leave a comment to keep this open. It will be closed automatically in 7 days if it remains stale.

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-issue-activity Issue author has not responded in 5 days label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

2 participants