-
Notifications
You must be signed in to change notification settings - Fork 908
Login Error : there is an error in logging you into this application. please try again later. #633
Comments
me too |
Ran into this, I believe it occurred when the Facebook app was on the Android device and signed in. |
Facing same issue right now. This is occurring only on Android if the facebook application is installed on device. |
Not sure if this is the same issue as well, but been stuck on this screen (for android) after login and can't find a fix React Native Environment Info: |
Hey guys, haven’t tried this yet but since it seems the issue is the native Facebook app. You could try setting the Login mode to web only so that it ignores the native app, as a workaround. |
I'm pretty sure that this approach should not be considered as proper solution of the problem but I would definitely like to try this. Let me know if you have any tutorial/guide reference for this approach. |
@abhi-nahi Correct, not a proper solution and hopefully this issue get fixed. Here's some more info on setting LoginBehavior https://stackoverflow.com/questions/39835006/how-do-i-set-loginbehaviour-when-using-react-native-fbsdk-loginmanager/47267836 You can pass this as a prop to LoginButton also to see which login types are working |
@jordangrant Thanks, This thing works but still the question remains same. Why would anyone enter their credentials again if they already have Facebook installed ?? |
I had the same problem and solved like this, setting loginBehavior only for web, like the code below: if (Platform.OS === "android") {
LoginManager.setLoginBehavior("web_only")
}
await LoginManager.logInWithPermissions(["public_profile", "email"]) I dont know why, but when you have facebook app installed react-native-fbsdk try to login with then, and nothing happen. |
@abhi-nahi They wouldn't. Hence the bug report. My current workaround defaults to Web and allows user to manually change to native. If I leave it as native some people can't access my app.
|
Hi guys, any solution yet, I am experiencing the same with |
I found a solution for this guys. Use this stable version "react-native-fbsdk": "^1.0.2". and add correct Hash keys for both development and release mode. It will work. Hope this helps. |
@thisisbalaG that doesn't support IOS 13 |
@yasir-netlinks I have a temporary solution for this. Since you cannot use separate versions of this library for android and iOS, Inside your node modules inside ./ios folder replace the RCTFBSDK and RCTFBSDK.xcodeproj from a lower version file in the library version "react-native-fbsdk": "^0.10.1". This will work |
+1 i had the same problem :( |
same issue |
@janicduplessis any chance this will get a fix soon. Makes this library pretty unusable on android. |
In Build apk login with facebook worked but when I prepare release apk, in release apk login with facebook throw error as thisisbalaG said I also put build & release a hash key. |
Working in current version of RN and SDK |
Yes but thats a current workaround but not a solution. People should be able to log in with the Facebook app without reentering their password. |
This is a temporary workaround, I hope a solution will be found. |
same issue, not cool that people reenter their password :/ |
if (Platform.OS === "android") {
else{
//here logincredential code }### Its working for me |
The issue is not that it's not working when using |
even when set to web_only behavior, in safari it opens up the browser and there is an option to login from the app by facebook so when the user tries that I does not work again :/ |
That error occurred because of using invalid hash key in Facebook Developer.
|
@ngtan , thanks man. So I need to create a new hash key with my release key store? What should I do with the old one that is already there in facebook developer? I understand your command for generating key hash, can you give a full example. Just wanted to see how does it look after adding key alias and key store path. Thanks a lot. |
@Saad-Bashar it's mine from FB developer. |
@Saad-Bashar for debug you also need a debug key and not a release key as far as I am aware. I don't think app signing by google play store supports this. So you have to fall back to the keytool way. Here is a good explanation even for rookies: https://stackoverflow.com/a/46241386/8634342 |
I don't know why, but for me, the hash that FBSDK got for the release build scheme app is not the same that you get with keytool/openssl. What helped me is looking at the "adb logcat" output (just after attempting to log in) where I found:
and i used that hash for the fb console |
Solution provided by @tafelnl works, though I used simpler way to get the hashes:
This code is provided by Facebook in their Quickstart guide. Just make sure you're using correct value for your keystore password! This code generates different hashes if you provide different passwords and does not fail if you provide incorrect password. |
You should not use that method, as it provides really bad User Experience and seems not to be needed anymore. |
@ngtan |
@tafelnl thanks for sharing. It work for me |
For me its not working. And I have the same issue on iOS, too. I added the hash to Facebook then the issue with adding keys is gone and the other one appears. And after I added the key like @tafelnl mentioned. |
I can not see the SHA-1 certificate fingerprint. I can see this screen. Did I miss something? I have released the app into beta mode.Please help |
This works, but ony when i'm in development mode. When I release the sdk and install it in my smartphone, the problem shows again? Do you know why? |
I think because maybe you are using debug SHA-1, please use Release SHA-1 if that is the case. |
The SHA-1 that I was using was the only one in the firebase console, there's no debug and release. But now I tried the SHA-1 loading certificate which I found in Google Play Console and now it works. I don't now if it is the best or right way to do it, but in fact it works. |
SHA-1 you used is release level SHA-1 (you uploaded release build on play store) that is why it worked :) |
The error occurs because of invalid hash key. We can create Hash key using the below command and update the same here under Settings-> Basic -> Android HashKeys keytool -exportcert -alias ADD_RELEASE_KEY_ALIASE_HERE -keystore ADD_UR_KEYSTORE_PATH_HERE | openssl sha1 -binary | openssl base64 You can find the Relase Key Alias of your keystore using the below command if needed: keytool -list -keystore ADD_UR_KEYSTORE_PATH_HERE I have also experience an issue like by using the above HashKey the login works fine if I install the release APK directly to the device, But when I upload the APK to Play Store and install app from store then it shows the same Login failed error. The fix for this is as follows:
|
For those who don't want to paste their hashes into an online tool, here's a oneliner Node.js command to do the same: node -e 'console.log(Buffer.from(process.argv[1].split(":").map(hex => parseInt(hex, 16))).toString("base64"))' '5E:8F:16:06:2E:A3:CD:2C:4A:0D:54:78:76:BA:A6:F3:8C:AB:F6:25' outputs:
|
I had the same problem. Thanks!! |
Set LoginBehavior if you have installed facebook app in your phone loginButton.setLoginBehavior(LoginBehavior.WEB_ONLY); |
This is the proper solution if your app is live on the store and you're using app signing. The method to generate your release key hash (in FB hopelessly outdated documentation) does not apply to you. DO NOT USE THIS TO GENERATE HASH IF YOU'RE USING APP SIGNING : Instead, do this:
Answer credit to Nadhir Falta from Android Facebook SDK: generate release key hash Credit also goes to tafelnl for giving a similar solution . But I thought what was missing was the clarity to remove the SHA1 part of the hex. |
Hi @robertqin86 , I am not able to see any SHA1 key in my release management console. instead it's asking me upload. what to do in this case ? see this screenshot for reference #633 (comment) |
This worked for me. Copy the APK to your PC in Program Files\java\jdkX.X.X_XXX\bin folder In my case it's C:\Program Files\Java\jdk1.8.0_191\bin Open CMD in this directory and type the following keytool -list -printcert -jarfile YOUR_APK_NAME.apk Copy the SHA1 value to your clipboard It will be something like this: 79:D0:E6:80:4E:28:1E:D1:88:28:CB:D7:E6:BE:2E:0C:FB:24:98:52 Then go to http://tomeko.net/online_tools/hex_to_base64.php to convert your SHA1 value to base64. This is what Facebook requires get the generated hash " ********************= " and copy the key hash to your Facebook developers app settings. |
@ahmadsdk I've used your solution and it is working fine, i would like to know if there are any long term problems associated with this method ? @Mayank-U I tried your solution but the resultant hash key was already on the facebook developers app settings, it was working fine with the codes but it just started throwing this error and i cannot pinpoint the exact reason , some feedback on this issue would be welcome. |
I confirm @robertqin86 solution works magically !!! |
I got this problem in dev mode, the problem cause by
In facebook documentation, they generate from |
Hi guys, I also faced this problem and i'he not resolved yet... I've correctly configured the hash key, obtained from SHA-1 fingerpring inside the App signing certificate section on Google Play and http://tomeko.net/online_tools/hex_to_base64.php, inside Facebook developer console, but the problem still persist. Someone has some ideas? |
Hello, I'm also facing this issue. I have made sure to generate the hash keys in the right directory, aswell as pasting and saving the generated hash keys in the FB developers platform. My app is still in devmode, it belongs to the business and pages category. Under app purposes: 'Yourself or your own business'. On iOS the native FB login works correctly without fail, but on android it only works when login behavior is set to 'web_only'. When I try it the native FB login way... it gives the login error mentioned in the title of this question. Oddly everytime I generate a new hash key on my computer the same one comes out which is: Xo8WBi6jzSxKDVR4drqm84yr9iU= just like the one @mifi mentions.. I thought it would generate a different one for everybody everytime but I guess it doesn't.. Anyway I hope a fix comes out for this soon.. Im using react native 0.61.5 and react-native-fbsdk 3.0.0. lib. Any info at all is apreciated thanks. |
Getting this issue too; the hash workaround fixed it for some of my testers but not all of them. Would appreciate any updates. |
Hi,
I have followed the instructions properly and i got this error while i signed in into the app and did the facebook login.
This issue am getting is in android.
Please help
The text was updated successfully, but these errors were encountered: