• 1000 время он работает отлично, но со второго момента данные не отправляются без возврата какого-либо типа ответа. Если я удалю и переустановлю приложение, произойдет то же самое (fecth работает только с первой попытки). Небольшая идея? Примечание: команда console.log ('2') вызывается только в первый раз. вот мой код:
.auth()
.createUserWithEmailAndPassword(email,password)
.then((user)=>{
var user = firebase.auth().currentUser;
// User is signed in
user.sendEmailVerification() //this always work
fetch('https://url/application/adduser.php?info1=test&info2='+firebase.auth().currentUser.email+'&info3='+firebase.auth().currentUser.uid, {headers: {
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': 0
}})
.then(() => {
console.log("2")
}).catch((error) => {
console.error(error)
})
.then(function() {
navigate('confermaReg')
}, function(error) {
// An error happened.
let errorCode = error.code
let errorMessage = error.message;
this.onLoginFailure.bind(this)(errorMessage)
})
})
.catch((error) => {
let errorCode = error.code
let errorMessage = error.message;
this.onLoginFailure.bind(this)(errorMessage)
});
```