Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

226
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda