Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Unhandled Promise Rejection #2

Open
hophoppoppop opened this issue Oct 31, 2017 · 1 comment
Open

Possible Unhandled Promise Rejection #2

hophoppoppop opened this issue Oct 31, 2017 · 1 comment

Comments

@hophoppoppop
Copy link

So i have this code:

`constructor(props){
super(props);
this._fbAuth = this._fbAuth.bind(this);
this.login = this.login.bind(this);
}

login(){
this.props.navigator.push({
id: "Home",
});
}

_fbAuth(){
LoginManager.logInWithReadPermissions(['public_profile']).then(
function(result) {
if (result.isCancelled) {
alert('Login cancelled');
} else {
alert('Login success with permissions: '+result.grantedPermissions.toString());
this.login();
}
},
function(error) {
alert('Login fail with error: ' + error);
}
);
}`

Everytime after i try login with facebook. It's success but always give warning
"Possible: Unhandled Promise Rejection (id: 0): Type Error: Undefined is not a function (Evaluating 'this.login()')".

i try bind the auth function and login function in constructor but the warning still pop up.

@arslan63
Copy link

arslan63 commented Dec 3, 2018

Hi,
I am facing this error and spend lot of time on ti, not find any solution. Can you help me.
Issue on React Native Android.
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants