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

311
Vistas
How do I resolve "Firebase: Error (auth/network-request-failed)." in a react cordova app?

I am working on a react cordova app, and I'm trying to authenticate my users with Firebase createUserWithEmailAndPassword. The problem however is it always return this "Firebase: Error (auth/network-request-failed)." anytime I click the sign up button. I have enabled Email/Password as one of my sign in methods in my firebase console, and I have tried both the older version of firebase and the newest version 9 Modular SDK version, I have also ensured that my sign in button is not of type submit and also prevented event default in my button function. All these are answers that people have given to this question but none of these has helped me so far.

import { getAuth, createUserWithEmailAndPassword } from "firebase/auth";

const signInWithEmail = (setAlertState, setAlertMessage) => {

const auth = getAuth();

createUserWithEmailAndPassword(auth, document.getElementById("email-input"), document.getElementById("password-input")).then((userCredential) => { 

const user = userCredential.user;

setAlertState(true);
setAlertMessage(user.uid);

}).catch((error) => {

const errorCode = error.code;
const errorMessage = error.message;

setAlertState(true);
setAlertMessage(errorCode);

});
    
}

export default signInWithEmail;
<Button
color="primary"
variant="contained"
type="input"
onClick={(event) => {
event.preventDefault();
signInWithEmail(setAlertState, setAlertMessage);
}}
sx={{
position:"relative",
marginTop:"1.5rem",
width:"100%",
height:"3rem",
borderRadius:"1rem",
color:"custom.main",
}}
>
Sign In
</Button>

Image of errorMessage

about 4 years ago · Juan Pablo Isaza
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