title: Exception: uncaught (in promise) after login with facebook in ionic 2 app
body: <p>I get this error</p>
  
  <blockquote>
    <p>Exception: uncaught (in promise) :false</p>
  </blockquote>
  
  <p>after login with Facebook in my ionic 2 app.
  the connected succeed but i get this error. 
  <a href="https://i.stack.imgur.com/QKp8L.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QKp8L.jpg" alt="enter image description here"></a></p>
  
  <p>my app.component.ts</p>
  
  <pre><code>   import { Component,ViewChild } from '@angular/core';
  import { Platform,Nav, LoadingController} from 'ionic-angular';
  import { StatusBar, Splashscreen } from 'ionic-native';
  
  //import pages
  import { HomePage } from '../pages/home/home';
  import { LoginPage } from '../pages/login/login';
  import { SignupPage } from '../pages/signup/signup';
  import { TabsPage } from '../pages/tabs/tabs';
  import { AboutPage } from '../pages/about/about';
  import {StudentsPage} from '../pages/students/students';
  
  
  
  //import plugins
  //import firebase from 'firebase';
  import {AngularFire, FirebaseListObservable} from 'angularfire2';
  
  @Component({
    template: `&lt;ion-nav [root]="rootPage"&gt;&lt;/ion-nav&gt;`
  })
  export class MyApp {
    @ViewChild(Nav) nav: Nav;
     public rootPage:any;
     //ref firebase
    public semesters:any;
    public userProfile: any;
    //user variables
    public currentUser: any;
    public id_user:any;
    public reg_boolean:any="true";
    public department:any;
    public year:any;
    public semester:any;
    public semesterdetails:any;
   user = {};
  
    constructor(platform: Platform, public loadingCtrl: LoadingController,public af: AngularFire){
     this.af.auth.subscribe(user =&gt; {
        if(user) {
          this.rootPage = SignupPage;
          console.log("connected success");
  
        }
        else {
          // user not logged in
          this.user = {};
          this.rootPage=LoginPage;
  
        }
      });
  
    }
  }
  </code></pre>
  
  <p>my login.ts</p>
  
  <pre><code> import { Component } from '@angular/core';
  import {NavController,LoadingController,AlertController } from 'ionic-angular';
  
  //import pagess
  
  import { HomePage } from '../home/home';
  //import cordova plugins
  import { Facebook } from 'ionic-native';
  import firebase from 'firebase';
  /*
    Generated class for the LoginPage page.
  
    See http://ionicframework.com/docs/v2/components/#navigation for more info on
    Ionic pages and navigation.
  */
  @Component({
    selector: 'page-login',
    templateUrl: 'login.html'
  })
  export class LoginPage {
    userProfile: any = null;
    loading: any;
   constructor(public nav: NavController, public alertCtrl: AlertController,  public loadingCtrl: LoadingController) {}
    ionViewDidLoad() {
  
    }
     facebookLogin(){
      Facebook.login(['email']).then( (response) =&gt; {
        let facebookCredential = firebase.auth.FacebookAuthProvider.credential(response.authResponse.accessToken);
        var that = this;
        firebase.auth().signInWithCredential(facebookCredential)
            .then((success) =&gt; {
              console.log("Firebase success: " + JSON.stringify(success));
              that.userProfile = success;
              console.log(that.userProfile);
             // that.nav.setRoot(HomePage); // after login in it goes to homepage
  
            })
            .catch((error) =&gt; {
              console.log("Firebase failure: " + JSON.stringify(error));
            });
  
      }).catch((error) =&gt; { console.log(error) });
      let loader = this.loadingCtrl.create({
        dismissOnPageChange: true,
      });
  
      loader.present();
    }
  
    GmailLogin(){
  
    }
  
  }
  </code></pre>
  
  <p>I try to check what is my problem but i didn't find any problem. i check also with android emulator and still same problem.</p>