We're using react-native-fbsdk-next
in our Expo 47 project and we notice some errors only on a small portion of users on Android.
Invalid Signature or Invalid Claims
The nativeStackAndroid
is the same for both errors:
{
code: EUNSPECIFIED,
message: Invalid Signature,
name: Error,
nativeStackAndroid: [
{"class":"com.facebook.login.LoginManager","file":"LoginManager.kt","lineNumber":244.0,"methodName":"onActivityResult"},
{"class":"com.facebook.login.LoginManager","file":"LoginManager.kt","lineNumber":203.0,"methodName":"registerCallback$lambda-0"},
{"class":"com.facebook.login.LoginManager","file":null,"lineNumber":0.0,"methodName":"$r8$lambda$pJs0X7lr0NZVFDkZnLW7STXSTPA"},
{"class":"com.facebook.login.LoginManager$$ExternalSyntheticLambda1","file":null,"lineNumber":4.0,"methodName":"onActivityResult"},
{"class":"com.facebook.internal.CallbackManagerImpl","file":"CallbackManagerImpl.kt","lineNumber":33.0,"methodName":"onActivityResult"},
{"class":"com.facebook.reactnative.androidsdk.FBActivityEventListener","file":"FBActivityEventListener.java","lineNumber":34.0,"methodName":"onActivityResult"},
{"class":"com.facebook.react.bridge.ReactContext","file":"ReactContext.java","lineNumber":338.0,"methodName":"onActivityResult"},
{"class":"com.facebook.react.ReactInstanceManager","file":"ReactInstanceManager.java","lineNumber":824.0,"methodName":"onActivityResult"},
{"class":"com.facebook.react.ReactDelegate","file":"ReactDelegate.java","lineNumber":90.0,"methodName":"onActivityResult"},
{"class":"com.facebook.react.ReactActivityDelegate","file":"ReactActivityDelegate.java","lineNumber":133.0,"methodName":"onActivityResult"},
{"class":"expo.modules.ReactActivityDelegateWrapper","file":"ReactActivityDelegateWrapper.kt","lineNumber":170.0,"methodName":"onActivityResult"},
{"class":"com.facebook.react.ReactActivity","file":"ReactActivity.java","lineNumber":70.0,"methodName":"onActivityResult"},
{"class":"android.app.Activity","file":"Activity.java","lineNumber":8938.0,"methodName":"dispatchActivityResult"},
{"class":"android.app.ActivityThread","file":"ActivityThread.java","lineNumber":6000.0,"methodName":"deliverResults"},
{"class":"android.app.ActivityThread","file":"ActivityThread.java","lineNumber":6046.0,"methodName":"handleSendResult"}
]
}
The method that initiates the login:
const onPressLoginWithFacebook = async (loginVars: any, referralVars: any) => {
try {
console.log("Facebook Login Started");
const { isCancelled, grantedPermissions } = await LoginManager.logInWithPermissions(['public_profile', 'email']);
if (isCancelled) {
console.log("Facebook Login was cancelled!");
} else {
// Get the Facebook token
const token = await AccessToken.getCurrentAccessToken();
if (!token) {
throw new Error("No token received!");
}
}
} catch (error) {
console.log("Facebook Login Error:", error);
}
}
As this happens rarely, I can't tell if it's a configuration issue or something else. Have anyone encounter this issue before?