Skip to content

Error: INTERNAL ASSERTION FAILED: Pending promise was never set #7093

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

Closed
tanuj101 opened this issue Mar 5, 2023 · 10 comments
Closed

Error: INTERNAL ASSERTION FAILED: Pending promise was never set #7093

tanuj101 opened this issue Mar 5, 2023 · 10 comments

Comments

@tanuj101
Copy link

tanuj101 commented Mar 5, 2023

[REQUIRED] Describe your environment

  • Operating System version: Ubuntu 22.04.1 LTS
  • Browser version: Firefox 110.0.1
  • Firebase SDK version: 9.14.0
  • Firebase Product: auth

[REQUIRED] Describe the problem

When using signInWithPopup to sign in with Microsoft, An unhandled error is thrown INTERNAL ASSERTION FAILED: Pending promise was never set. This issue happens 5/10 times which makes it difficult to offer authentication with Microsoft.
P.S. This flow works perfectly fine on google chrome.

Steps to reproduce:

  • Setup sign-in button.
  • Execute signInWithPopup function from firebase/auth.

Relevant Code:

    const provider = new OAuthProvider('microsoft.com');
    const auth = getAuth();
    const credentials = await signInWithPopup(auth, provider);
@jbalidiong
Copy link
Contributor

Hi @tanuj101, thanks for reaching out. I tried replicating, but I wasn't able to reproduce the error.

If I can replicate the issue, I can have a better look into it. Please share a minimal, but complete sample of a project that I can run locally.

@tanuj101
Copy link
Author

tanuj101 commented Mar 7, 2023

Hi @jbalidiong, Thanks for responding. I've created a minimal code project where the issue is still reproducible on firefox https://codepen.io/Tanuj69/pen/wvErMrm, Once you add application configuration in initializeApp. The page will load.
Also adding a screenshot for your reference with the trace of the error which occurs in the original application -
image

@jbalidiong
Copy link
Contributor

Thanks for the additional information @tanuj101. I was able to replicate the issue when running it on Firefox. Let me check what we can do for this issue or bring someone from our Auth team here that can provide more context about it. I’ll update this thread if I have any information to share.

@jbalidiong jbalidiong added the bug label Mar 7, 2023
@silas
Copy link

silas commented Mar 7, 2023

This might be the same issue as #6956. It seems like there is Firefox specific handling in /__/auth/handler (or maybe the auth library) which is causing problems.

You can probably confirm this by installing something like https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/ and faking a chrome user-agent. If you don't see the failure anymore, probably the same issue.

@tanuj101
Copy link
Author

tanuj101 commented Mar 9, 2023

It seems due to this issue, the same bug also exists in firebaseui-web library since April 6, 2022.

@bhparijat
Copy link
Contributor

Hi Tanuj,
Thank you for bringing this up. While we work on figuring out the cause here, could you please try @silas's hack. It may help us understand this better. b/272821123 for google internal tracking. Thanks!!

@tanuj101
Copy link
Author

tanuj101 commented Mar 11, 2023

@bhparijat Thanks, but faking a user-agent that @silas mentioned is not a hack but a proof that there is some firefox specific code that is causing this issue. We can not ask our users to use this extension :)

@silas
Copy link

silas commented Mar 11, 2023

@tanuj101 I think @bhparijat is just asking you to confirm/deny that setting the user-agent fixes the issue, not to actually recommend it as a workaround to your users.

@tanuj101
Copy link
Author

tanuj101 commented Mar 11, 2023

Oh then yes @bhparijat, it does fix the issue. thanks for the clarification @silas.

@tanuj-101
Copy link

This is fixed

@firebase firebase locked and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants