Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

224
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda