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

309
Views
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
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!