Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Ionic firebase登录问题_Android_Firebase_Ionic Framework_Firebase Authentication - Fatal编程技术网

Android Ionic firebase登录问题

Android Ionic firebase登录问题,android,firebase,ionic-framework,firebase-authentication,Android,Firebase,Ionic Framework,Firebase Authentication,我有一个ionic 1应用程序,我只在android上登录时出现了一个奇怪的错误。只有当用户第一次打开应用程序并登录时,它才能完美地登录。当他注销并尝试再次登录时,我收到错误“Auth/Network Request Failed”,除非他关闭应用程序并重新打开,否则无法登录。我不明白这是什么问题,为什么它第一次起作用。这是我的密码 <ion-content style="background-image:url(img/LoginBack.jpg); background-size:10

我有一个ionic 1应用程序,我只在android上登录时出现了一个奇怪的错误。只有当用户第一次打开应用程序并登录时,它才能完美地登录。当他注销并尝试再次登录时,我收到错误“Auth/Network Request Failed”,除非他关闭应用程序并重新打开,否则无法登录。我不明白这是什么问题,为什么它第一次起作用。这是我的密码

<ion-content style="background-image:url(img/LoginBack.jpg); background-size:100% 100%;" ng-controller="LoginController">

    <hr style="height:100px; visibility:hidden">
        <div align="center">

            <img src="img/loggo.png" style="width:43%;height:13vh">

        </div>
<hr style="height:20px; visibility:hidden">
        <div align="center">
            <div style="width:100%;padding:5px 10px 5px 10px" align="center">
                <h5 class="button" style="color:white;min-height:12px;line-height:12px;background-color:#3b5998;width:100%;color:white;border-radius: 20px"
                 ng-click="FacebookLogin()">
             <div class="row" style="padding:0px">
                 <div class="col col-10" style="padding:3px 0 0 0">
                     <i class = "ion-social-facebook larger" style="margin-right:50px"> </i> 
                     </div>
                 <div class="col col-80" align="center" style="padding:0;line-height:35px">
                     Sign in with Facebook 
                 </div>
                  <div class="col col-20">

                     </div>
                     </div>
                 </div>

            </div>

        <div class="padding" style="width:100%;" align="center" ng-show="!toggle">
            <button style="min-height:35px;line-height:35px;width:100%;border-radius: 20px" class="button button-balanced small_button"
             ng-click="Switch()">
                Already have an account? Log in
            </button>

        </div>


        <div style="width:100%; padding:10px 10px 0 10px" ng-show="toggle">

            <div align="center" style="padding-top:10px;padding-bottom:10px">
                <input ng-model="registerusername" align="center" style="padding:20px;background-color:rgba(0, 0, 0, 0.4);padding-left:20px;color:#2ab041;border-radius:5px"
                 placeholder="Email" type="text" required>
                <br>
                <input align="center" ng-model="registerpassword" style="padding:20px;background-color:rgba(0, 0, 0, 0.4);padding-left:20px;color:#2ab041;border-radius:5px"
                 placeholder="Password" type="password" required>

            </div>

            <div class="col " style="background-color: transparent">

                <h6 style="margin:5px 0 10px 0;padding:0px;min-height:6vh;line-height:6vh;width:100%;border-radius: 20px" class="button button-balanced small_button"
                 ng-click="LogIn(user)">
                Sign in
            </h6>

            </div>
            <div class="col col-10" style="background-color: transparent">


            </div>
        </div>

        <div align="center">
            <h4 style="margin-top:-2px;padding-top:0px;font-weight:bold;color:white; font-size:15px">
                or
            </h4>

        <div class="padding" style="width:100%;" align="center">
            <button style="min-height:35px;line-height:35px;width:100%;border-radius:20px;background-color:white;color:#2ab041" class="button button-balanced small_button"
                 ng-click="GoToRegister()">
                Register with Email
            </button>

        </div>

            <div align="center">
                <h6 style="color:white" ng-click="GoToForgetPass()">
                    Forgot your password?
                </h6>
            </div>

        </div>
</ion-view>



使用Facebook登录 已经有账户了吗?登录
登录 或 通过电子邮件注册 忘记密码了?
//JS文件 firebase.auth().signInWithEmailAndPassword($scope.registerusername,$scope.registerpassword) .then(功能(用户){ //GO主页 }) .catch(函数(错误){ 警报(错误代码);

});

您在注销时是否使用了此方法

firebase.auth().signOut().then(function() {
 // Sign-out successful.
}, function(error) {
 // An error happened.
});

Firebase Auth使用
navigator.onLine
检测网络状态。如果此问题偶尔发生,可能与
navigator.onLine
有关。尝试安装可修复
navigator.onLine
问题的软件。