Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Firebase: "Pending promise was never set" on sign in with popup

I'm using firebase auth in my application and am implementing other providers, in this case microsoft. Email/password works fine (app is initialised etc.) but trying signInWithPopup, as shown below:

import * as firebaseAuth from 'firebase/auth';

export function signupWithMicrosoft(): Promise<firebaseAuth.UserCredential> {
  const auth = firebaseAuth.getAuth();
  const provider = new firebaseAuth.OAuthProvider('microsoft.com');
  return firebaseAuth.signInWithPopup(auth, provider).catch(Promise.reject);
}

fails inconsistently with:

Uncaught (in promise) Error: INTERNAL ASSERTION FAILED: Pending promise was never set
    debugFail assert.ts:256
    debugAssert assert.ts:271
    reject abstract_popup_redirect_operation.ts:135
    onAuthEvent abstract_popup_redirect_operation.ts:104
    sendToConsumer auth_event_manager.ts:97
    onEvent auth_event_manager.ts:68
    onEvent auth_event_manager.ts:65
    initAndGetManager popup_redirect.ts:133

The error appears sometimes and not others, but is definitely there more than not. I have triple checked redirect URIs in Azure (originally I was getting a trailing slashes error). One thing I have not attempted is redirect login as opposed to popup login.

Attempts at watching what happens inside firebase have led me to believe it's some sort of initialisation problem, with an AuthEventConsumer not having the promise it resolves upon consuming the event being set, however I'm stuck trying to find how to initialise that properly. The actual authentication requests go through and succeed, but once it tries to resolve that promise (that doesn't exist) it complains.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

EDIT: It ended up requiring me to switch to redirect rather than popup.

It turns out that this was a consequence of the auth/popup-closed-by-user thing that goes on in Firefox, just poorly logged by me. The fix was to call the function directly (synchronously from a user input), not from an async function. Apologies as these factors were not clearly laid out in the question.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!