Closed jimmirbn closed 5 years ago
Is there any proper solution to this error? cause of all the steps I have followed.
I followed all steps. still im getting this error without reason.
So, finally, I found a solution for this. My package. name in firebase and in the app were different, I had to delete and create again the app on Firebase, and now is working like a charm!
@victorbruce You've saved my time! Thanks a lot
@victorbruce You've saved my time! Thanks a lot
Glad I did 😊 👍
I am getting this error in play store and not in debug mode. I have also copied SHA to firebase console :(
Hey @gamingumar, Make sure you add SHA which is generated by the keystore you have used to upload the apk. Also make sure your app bundle name on firebase is same as you are using it in your project.
@mitjnextt I resolved this issue, it was caused by wrong SHA. The reason was the confusion between firebase and google cloud project. They were 2 different projects in google cloud. I found out that firebase creates google cloud project by default.
I am getting this error in play store and not in debug mode. I have also copied SHA to firebase console :(
+1
sometimes unprepared app/build.gradle
could be the culprit.
signingConfigs {
release {
storeFile file("android-.jks")
storePassword pass
keyAlias "~~~"
keyPassword pass
}
debug {
storeFile file("android-.jks")
storePassword pass
keyAlias "~~~"
keyPassword pass
}
// debug {
// storeFile file('debug.keystore')
// storePassword 'android'
// keyAlias 'androiddebugkey'
// keyPassword 'android'
// }
}
I'm using Firebase. The solution for me was to copy the google-services.json
file also under the subfolders for different variants. So I have this file in app/google-services.json
and additionally app/src/dev/google-services.json
, app/src/test/google-services.json
, app/src/production/google-services.json
etc. At first I thought that it's enough to have the file in the app
folder like stated here but looks like this will not work by default.
Also, be sure which key is being used to sign your dev/test app and add your debug key SHA1 to the Firebase console. Use the signingReport
task in Android Studio -> Gradle menu to double-check. Or unzip your .apk and check the cert fingerprint in the META-INF
directory.
@SanjanaTailor did you find any solution?
I fixed it by making sure the sha1 key in my firebase android project is the correct one. I did that performing the following:
- Inside of my project folder, I cd into android and run
./gradlew signingReport'
- Copy the sha1 key under > Task :app:signingReport with the property and value
**Config: debug**
, and**Variant: debugUnitTest**
- Paste it in your firebase android project by clicking on add finger print
Make sure you have copied the google-services.json file inside of your /android/app/ folder
I'm not using firebase and this worked for me! This SHA1 is different from the ones generated by the keytool with the debug.keystore files on user/.android and and myapp/android/app, neither of them were working. I just created a new credential on the same app in the google console, didn't even need to delete the credentials from the old debug.keystore. Thanks!
PRO TIP:
Even if you think you have the correct webClientId
just copy it from firebase and paste it in.
Spent way to much time on debugging this
For anyone banging their heads on this in the future. I had this issue in production after deploying my app to the Play Store. The problem happens because i'm using the managed app signing service so the Play Console actually manages the App Signing Keys and therefore your app would actually have a different signing key when deployed on the Play store..
To find that key you must go to the Play Developer Console under Setup > App Integrity > App Signing
and find the SHA-1 certificate and enter that into your Firebase console.
I solved it at fast create webClientId from google cloud console web Application Credential . then create Android Credential with your package name and SHA-1 certificate fingerprint * . then configure like bellow =>
GoogleSignin.configure({ webClientId: 'your web client id here ', offlineAccess: true, });
i hope it will work for all . Thanks
For me, it wasn't working until I provided offlineAccess:true
GoogleSignin.configure({ webClientId: "...", offlineAccess: true });
OFFICIAL SOLUTION IS THIS: Use command:
keytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
Copy the SHA1 from the output Go to Firebase WEBSITE -> open project settings and look for where it says "fingerprint" or something about "Sha1" thats where you need to place it, if you cna't find that, create new project it will ask for it once you start a new project
Same
UPDATE: I was able to get it working by adding the debug key to the Firebase project. Was able to retrieve the debug SH1 key via
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android
same my isssue, because SHA1 from here "keytool -list -v -alias aliasName -keystore app/keystore.jks -storepass passWordStore -keypass passWordKeyPass". in this case, we need to generate SHA1 from above command from keystore file. this is production deploy for privateKey. THanks u very much.
For anyone banging their heads on this in the future. I had this issue in production after deploying my app to the Play Store. The problem happens because i'm using the managed app signing service so the Play Console actually manages the App Signing Keys and therefore your app would actually have a different signing key when deployed on the Play store..
To find that key you must go to the Play Developer Console under
Setup > App Integrity > App Signing
and find the SHA-1 certificate and enter that into your Firebase console.
Yeah, the same issue I had. i was checking the release build and it was working fine but after pushing it to play store it was not working. But it's working now. Thanks
One more step to try (that was my case of DEVELOPER_ERROR) is to check if you definitely typed correctly your package name that locates at
In my case It worked in development, but when I tried to use Firebase App Distribution it threw DEVELOPER_ERROR
.
Turns out that Firebase re-sign test bundles with a new sha-1 that you can find here:
These steps worked for me:
I have tried all above suggestion but nothing work at all :(
On Sat, 24 Dec 2022 at 15:50, Lê Vũ Huy @.***> wrote:
I have tried all above suggestion but nothing work at all :(
— Reply to this email directly, view it on GitHub https://github.com/react-native-google-signin/google-signin/issues/706#issuecomment-1364540808, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGR3T3P3KST6SRLQXET7NDWO4ESFANCNFSM4IMFTPEA . You are receiving this because you commented.Message ID: @.*** com>
-- With regards Cyrus_Zei [ Developer + Designer = Unicorn]
Found my problem:
In my folder android/app there is a debug.keystore
file, but I run keytool
command to get SHA1 with ~/.android/debug.keystore
file.
Rerun with correct keystore file and everything will be fine. Hope this help someone :D
Yes, there are two SHA-1 keys and you can enter this command and you can see the SHA-1 key
keytool -list -v -keystore ./android/app/debug.keystore -alias androiddebugkey -storepass android -keypass android
On Sun, 25 Dec 2022 at 06:12, Lê Vũ Huy @.***> wrote:
Found my problem: In my folder android/app there is a debug.keystore file, but I run keytool command to get SHA1 with ~/.android/debug.keystore file. Rerun with correct keystore file and everything will be fine.
— Reply to this email directly, view it on GitHub https://github.com/react-native-google-signin/google-signin/issues/706#issuecomment-1364627904, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGR3T6VMLQASTGDQZG2NVTWO7JTLANCNFSM4IMFTPEA . You are receiving this because you commented.Message ID: @.*** com>
-- With regards Cyrus_Zei [ Developer + Designer = Unicorn]
tricky steps for android
sudo keytool -genkey -v -keystore my-upload-key.keystore \
-storepass android -alias androiddebugkey -keypass android \
-keyalg RSA -keysize 2048 -validity 100000
-dname "CN=serhii, OU=debug, O=private, L=home, ST=0, C=UA"
I spent more time than I'd care to admit on this, so writing down what I found, in the hope that it'll be helpful to someone.
GoogleSignin.configure
call:GoogleSignin.configure({
webClientId: YOUR_WEB_CLIENT_ID,
offlineAccess: true,
});
What I found:
google-services.json
isn't needed. Don't include googleServicesFile
in app.json
/app.config.js
.OAuth 2.0 Client IDs
:GoogleSignin.configure
as webClientId
.Package name
is correct. Get SHA-1 certificate fingerprint
by running keytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
from the project root.Package name
is correct. Get SHA-1 certificate fingerprint
by running eas credentials
from the project root. Select Android
as the platform, then select your build profile.In addition to this, I changed the third one to the SHA-1 certificate fingerprint
from the production keystore.
+1 - After a long time I realised that it HAS to be the SHA1, not the SHA256
@apalm thank you! This is the final solution or those who are not using firebase and are using EAS managed credentials
I spent more time than I'd care to admit on this, so writing down what I found, in the hope that it'll be helpful to someone.
* I'm not using Firebase * I'm using Expo, and I'm using [managed credentials](https://docs.expo.dev/app-signing/managed-credentials/) * My `GoogleSignin.configure` call:
GoogleSignin.configure({ webClientId: YOUR_WEB_CLIENT_ID, offlineAccess: true, });
What I found:
* `google-services.json` isn't needed. Don't include `googleServicesFile` in `app.json`/`app.config.js`. * In [Google Cloud Console](https://console.cloud.google.com/apis/credentials), create 3 `OAuth 2.0 Client IDs`: 1. Application type="Web application". Pass this client ID to `GoogleSignin.configure` as `webClientId`. 2. Application type="Android". Make sure `Package name` is correct. Get `SHA-1 certificate fingerprint` by running `keytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android` from the project root. 3. Application type="Android". Make sure `Package name` is correct. Get `SHA-1 certificate fingerprint` by running `eas credentials` from the project root. Select `Android` as the platform, then select your build profile.
Also, people, don't forget to update the google-service.json (download the new one if you updated the SHA-1 in the Firebase). 😄
I spent more time than I'd care to admit on this, so writing down what I found, in the hope that it'll be helpful to someone.
- I'm not using Firebase
- I'm using Expo, and I'm using managed credentials
- My
GoogleSignin.configure
call:GoogleSignin.configure({ webClientId: YOUR_WEB_CLIENT_ID, offlineAccess: true, });
What I found:
google-services.json
isn't needed. Don't includegoogleServicesFile
inapp.json
/app.config.js
.- In Google Cloud Console, create 3
OAuth 2.0 Client IDs
:
- Application type="Web application". Pass this client ID to
GoogleSignin.configure
aswebClientId
.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningkeytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
from the project root.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningeas credentials
from the project root. SelectAndroid
as the platform, then select your build profile.
It doesnt make sense to me that Web application client ID worked for logging in from my Samsung Gakaxy Android phone. I got the idToken, but serverAuthCode is still Null {..."https://www.googleapis.com/auth/youtube.readonly"], "serverAuthCode": null, "user": .....}
For those using eas-build with a development client, in my case, eas inserts different signing credentials during the build process. In other words, it is not using the SHA1 specified in the google-services.json file. To make the google signing work in development, I had to add the SHA-1 Certificate Fingerprint listed in the Expo.dev console, under "Project Settings" > "Credentials" > "Android Keystore", to my Firebase project (which also adds it to Google Cloud API). I personally can't remember ever uploading credentials to Expo, but it could be the case. If they're autogenerated, I can imagine a lot more developers must face the same issue which is why I'm sharing this.
Non-firebase users that let Google sign their app: Under the Google Cloud Console > APIs & Services > Credentials > Client ID for Android, set your SHA-1 to the App signing key certificate found in the Play Store Console > Setup > App signing.
You'll know it works because Verify app ownership
under the Client ID for Android
page will say "Your app ownership has been verified".
I spent more time than I'd care to admit on this, so writing down what I found, in the hope that it'll be helpful to someone.
- I'm not using Firebase
- I'm using Expo, and I'm using managed credentials
- My
GoogleSignin.configure
call:GoogleSignin.configure({ webClientId: YOUR_WEB_CLIENT_ID, offlineAccess: true, });
What I found:
google-services.json
isn't needed. Don't includegoogleServicesFile
inapp.json
/app.config.js
.- In Google Cloud Console, create 3
OAuth 2.0 Client IDs
:
- Application type="Web application". Pass this client ID to
GoogleSignin.configure
aswebClientId
.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningkeytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
from the project root.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningeas credentials
from the project root. SelectAndroid
as the platform, then select your build profile.
I am using an Expo managed project, so i don't have direct access to the android keystore in the same way that i would in a bare react native project (in other words I can't run keytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
because I don't have an android folder) Is there another way I can get the SHA-1 certificate fingerprint
@apalm ?
I spent more time than I'd care to admit on this, so writing down what I found, in the hope that it'll be helpful to someone.
- I'm not using Firebase
- I'm using Expo, and I'm using managed credentials
- My
GoogleSignin.configure
call:GoogleSignin.configure({ webClientId: YOUR_WEB_CLIENT_ID, offlineAccess: true, });
What I found:
google-services.json
isn't needed. Don't includegoogleServicesFile
inapp.json
/app.config.js
.- In Google Cloud Console, create 3
OAuth 2.0 Client IDs
:
- Application type="Web application". Pass this client ID to
GoogleSignin.configure
aswebClientId
.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningkeytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
from the project root.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningeas credentials
from the project root. SelectAndroid
as the platform, then select your build profile.
Thanks god, i couldnt find solution, because everywhere is written only Web Application and Androiod with SHA-1 from eas credentials OR SHA-1 from keystore, i spend whole night trying, but few minutes back i tried put there both SHA-1 and it works! THANK YOU!
// supabase non firebase google sign-in
wow. this error really needs to be less vague. I have the correct SHA1 from the keystore specified in my gradle script and the correct app ID. No dice. If this error actually described what the problem was in any way I could potentially fix it
I spent more time than I'd care to admit on this, so writing down what I found, in the hope that it'll be helpful to someone.
- I'm not using Firebase
- I'm using Expo, and I'm using managed credentials
- My
GoogleSignin.configure
call:GoogleSignin.configure({ webClientId: YOUR_WEB_CLIENT_ID, offlineAccess: true, });
What I found:
google-services.json
isn't needed. Don't includegoogleServicesFile
inapp.json
/app.config.js
.- In Google Cloud Console, create 3
OAuth 2.0 Client IDs
:
- Application type="Web application". Pass this client ID to
GoogleSignin.configure
aswebClientId
.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningkeytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
from the project root.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningeas credentials
from the project root. SelectAndroid
as the platform, then select your build profile.
only this works for me, no firebase, only expo weird af
thanks @amitbravo you don't have the idea how much it stress me. Thank you so much for lending the tips. Now its working. Love lots po.
I'm still having trouble with this with Supabase and Expo. I added the SHA-1 from Expo but when I try to run:
keytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
I get:
keytool error: java.lang.Exception: Keystore file does not exist: android/app/debug.keystore
java.lang.Exception: Keystore file does not exist: android/app/debug.keystore
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:923)
at java.base/sun.security.tools.keytool.Main.run(Main.java:423)
at java.base/sun.security.tools.keytool.Main.main(Main.java:416)
I thought I'd only need the Expo SHA-1. Anyone else know what's going on here? Either how to get the command to work or just troubleshooting steps to help me diagnose the real issue?
google-services.json
isn't needed. Don't includegoogleServicesFile
inapp.json
/app.config.js
.- In Google Cloud Console, create 3
OAuth 2.0 Client IDs
:
- Application type="Web application". Pass this client ID to
GoogleSignin.configure
aswebClientId
.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningkeytool -list -v -alias androiddebugkey -keystore android/app/debug.keystore -storepass android -keypass android
from the project root.- Application type="Android". Make sure
Package name
is correct. GetSHA-1 certificate fingerprint
by runningeas credentials
from the project root. SelectAndroid
as the platform, then select your build profile.
It works for me
Follow this video https://www.youtube.com/watch?v=vojHmGUGUGc
For anyone stumbling into this issue and you do not have an expo app and you are facing this issue with an app you submitted to the play store.
I had everything setup correctly (web client id + non debug signing key for production), but the missing change was registering an OAuth 2.0 Client ID credential in GCP with the signing key sha1 from the google play console.
Once you register the sha1 make sure to add the generated client id to the list of authorized client ids in the supabase google provider configuration.
If anyone is experiencing the ERROR: DEVELOPER_ERROR, it could be because the SHA-1 in Firebase is already registered with another application. To resolve this issue, follow these steps:
1 - Delete the debug.keystore file.
2 - In the terminal, navigate to the Android app directory:
cd android/app
3 - Generate a new keystore by running the following command:
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000
4 - Fill in the required information.
5 - After that, retrieve the new SHA-1 by running the following command:
keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass [your-password] -keypass [your-password]
All commands are executed in the ./android/app path.
For anyone banging their heads on this in the future. I had this issue in production after deploying my app to the Play Store. The problem happens because i'm using the managed app signing service so the Play Console actually manages the App Signing Keys and therefore your app would actually have a different signing key when deployed on the Play store..
To find that key you must go to the Play Developer Console under
Setup > App Integrity > App Signing
and find the SHA-1 certificate and enter that into your Firebase console.
Yes this was the fix for the issue after releasing my app. Thank you
adding my 2c.
Setup: expo, firebase, react-native-firebase
I was using the sha1 from the debug keystore instead of the sha1 from expo. To get it you need to run
eas credentials
When signing in using
await GoogleSignin.signIn();
It opens the dialog, I sign in but gives the'ERROR: DEVELOPER_ERROR'
Steps to Reproduce
calls await GoogleSignin.signIn()
Expected Behavior
Actual Behavior
'ERROR: DEVELOPER_ERROR'
Environment