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

Firefox get an error "window.indexedDB.databases is not a function" when user logout #5107

Closed
dilidili opened this issue Aug 17, 2022 · 4 comments · Fixed by #5112
Closed
Assignees
Labels
answered Question has received "first qualified response" bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package msal-react Related to @azure/msal-react 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

@dilidili
Copy link

Core Library

MSAL.js v2 (@azure/msal-browser)

Core Library Version

2.23.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

1.3.2

Public or Confidential Client?

Public

Description

When call the IPublicClientApplication.logoutRedirect(), the deletion of MSAL databse

const existingDatabases = await window.indexedDB.databases();
will fail due to window.indexedDB.databases is not a function in Firefox.

Error Message

No response

Msal Logs

No response

MSAL Configuration

export const msalConfig: Configuration = {
  auth: {
    clientId: IWPAppId,
    redirectUri: `${window.location.origin}/spa-signin-oidc`,
    postLogoutRedirectUri: "/",
  },
  cache: {
    cacheLocation: "localStorage",
  },
  system: {
    // Give more timeout for waiting for a response hash in an iframe or popup other than default value 6s
    iframeHashTimeout: 10000,
    loggerOptions: {
      loggerCallback: (
        level: LogLevel,
        message: string,
        containsPii: boolean
      ): void => {
        if (containsPii) {
          return;
        }

        switch (level) {
          case LogLevel.Error:
            sendConsoleErrorEvent(`@azure/msal-browser ${message}`);
            return;
          case LogLevel.Info:
          case LogLevel.Verbose:
          case LogLevel.Warning:
            sendNormalEvent(
              `@azure/msal-browser ${message}`,
              "web",
              // Use 3 for EventSendType.SyncFetch in const enum isolated module
              shouldSendSync(message) ? 3 : undefined
            );
            return;
        }
      },
      piiLoggingEnabled: false,
    },
  },
};

Relevant Code Snippets

instance.logoutRedirect();

Reproduction Steps

  1. Signed in user.
  2. Call IPublicClientApplication.logoutRedirect() to signout.

Expected Behavior

The signout will not throw exception and delete all MSAL databses successfully.

Identity Provider

Azure AD / MSA

Browsers Affected (Select all that apply)

Firefox

Regression

No response

Source

Internal (Microsoft)

@dilidili dilidili 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 Aug 17, 2022
@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 17, 2022
@github-actions github-actions bot added msal-browser Related to msal-browser package msal-react Related to @azure/msal-react public-client Issues regarding PublicClientApplications labels Aug 17, 2022
@ghost ghost assigned hectormmg Aug 17, 2022
@hectormmg
Copy link
Member

Thanks for bringing this to our attention. I'll look into it.

@ghost ghost added answered Question has received "first qualified response" Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 17, 2022
@ghost
Copy link

ghost commented Aug 23, 2022

@dilidili 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.

@ghost ghost added the no-issue-activity Issue author has not responded in 5 days label Aug 23, 2022
@ghost ghost closed this as completed Aug 30, 2022
@mchr3k
Copy link

mchr3k commented Sep 7, 2022

I think this ticket should still be open as #5112 has not been merged yet.

@ghost
Copy link

ghost commented Sep 12, 2022

🎉This issue was addressed in #5112, which has now been successfully released as @azure/msal-browser@v2.28.3.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Question has received "first qualified response" bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package msal-react Related to @azure/msal-react 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

Successfully merging a pull request may close this issue.

3 participants