Firebase authentication results in an "auth / network-request-failed" error. [React-Native]

I am developing a response application that uses Firebase for authentication.

When I start an authentication request, it causes the following error:

N {code: "auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."} 

Here is the code that I use to authenticate / create the user. Note. I use shortening to maintain my condition.

 firebase.auth().signInWithEmailAndPassword(email, password) .then(user => authenticateUserSuccess(dispatch, user)) .catch((error) => { console.log(error); firebase.auth().createUserWithEmailAndPassword(email, password) .then(user => authenticateUserSuccess(dispatch, user)) .catch(() => authenticateUserFail(dispatch)); }); 

The following are the dependencies that I use in the project:

 "dependencies": { "axios": "^0.15.3", "firebase": "^3.7.2", "lodash": "^4.17.4", "react": "15.4.2", "react-native": "0.42.0", "react-native-router-flux": "^3.38.0", "react-native-vector-icons": "^4.0.0", "react-redux": "^5.0.3", "redux": "^3.6.0", "redux-thunk": "^2.2.0" } 

Other posts on stackoverflow did not help .:(

Hooray!

+5
source share

Source: https://habr.com/ru/post/1266792/


All Articles