I am using NativeScript (Vue app) with the Firebase plugin to allow Google account logins. The login button redirects to Google sign-in page but I cannot sign in. The error displayed is "This account already exists on your phone."
According to the plugin page this will happen if the SHA1 fingerprints have not been uploaded to the Firebase console.
There is no difference between a physical device or the emulator, neither between "tns run" and "tns build" and then uploading the APK manually.
The command I use is
tns run android --key-store-path ./keyStore.jks --key-store-password <my_keystore_password> --key-store-alias <my_alias> --key-store-alias-password <my_alias_password> --bundle
I followed these steps:
When I check the Firebase Analytics page I can see the connection, so I am using the correct app URI etc.
The following is printed in the terminal window:
JS: 'Make sure you\'ve uploaded your SHA1 fingerprint(s) to the Firebase console. Status: Status{statusCode=unknown status code: 12502, resolution=null}'
JS: 'Has the SHA1 fingerprint been uploaded? Sign-in status: Status{statusCode=unknown status code: 12502, resolution=null}'
I noticed another question regarding this on SO but it's not been answered and is a few years old.
Any suggestions/help would be greatly appreciated.
Something that worked for me was to delete the "Platforms" directory from the project files and then run tns build android --bundle
.
I would also just verify that your SHA1 fingerprint that you can find with: keytool -exportcert -list -v \\ -alias androiddebugkey -keystore ~/.android/debug.keystore
is the same as one listed in your Firebase settings. ( https://developers.google.com/android/guides/client-auth )
The other thing to check would be that you downloaded the google-services.json file after you added the SHA1 fingerprint. But it seems like you've already done most of that.
That's all folks.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.