google-signin: Error: DEVELOPER_ERROR React Native 0.72

When configuring google signing it shows the following error DEVELOPER_ERROR

GoogleSignin.configure({ offlineAccess: false, webClientId:'My_ID_ANDROID', iosClientId: 'My_ID_IOS', });

  • but for ios it works perfectly but on android it doesn’t work for me I already made several changes suggested by the community but it still persists in the android environment I DO NOT USE FIREBASE "react-native": "0.72.3"

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 21
  • Comments: 44

Most upvoted comments

Code is Medicine. Insane what hoops were meant to be jumped through…

I made it run on SDK 49 EXPO, React Native 0.72.3, Android (since iOS works as butter):

  1. For Android, you’ll need both a Web and Android credentials in Google API Console:
Screenshot 2023-08-08 at 23 58 54
  1. Find out your SHA-1 signing key for your development/production apk. If you’ve built using EAS, get your sha-1 by running eas credentials, then selecting android > com.yourbuild.app.dev. Put that SHA-1 Key, and the appropriate package-name in your Android OAuth credential in Google API console.

3. Now the biggest medicine moment, and super counterintuitive: use the WEB clientID in your config, instead of the Android clientID. I have no idea why this is…

googleSigninComponent.configure({
      scopes: ['https://www.googleapis.com/auth/drive'],
      webClientId: 'YOUR WEB CLIENTID, NOT YOUR ANDROID CLIENTID FROM GOOGLE CONSOLE',
      iosClientId: 'iosClientId for iOS, nothing special here',
      offlineAccess: true,
      forceCodeForRefreshToken: true,
      profileImageSize: 120
});

After this, logged-ins work on Android.

How is implementing Google Sign In on iOS way easier than on Android? man the guys at Google, they really don’t know how to create a good developer experience.

Error message here is not informative “DEVELOPER_ERROR” gives no information of what went wrong.

React Native + Android + Firebase + SHA keys = Depression

Hello and thanks for asking, seems the issue is resolved. Also, note that it’s documented extensively in the android docs. Thank you 🙂

Hi, I am new to react-native. I am trying to implement google signin in expo using the Google Console API, but I am getting the DEVELOPER_ERROR.

Steps I followed:

  1. Created a new expo project with tabs template (SDK 49).
  2. installed @react-native-google-signin/google-signin library and generated a custom dev client in my android phone.
  3. created a eas.json file and ran command ‘eas credentials -p android’ and created a new key store, and copied the SHA-1
  4. generated webClientId and androidClientID.
  5. copied the code in the github repo
  6. getting DEVELOPER_ERROR on await GoogleSignin.signIn()

Thank you so much for your help.

In my case I register the production keystore in firebase . . and when running the app using emulator, it is the debug keystore that is being built . . what I did was replace the debug keystore with the production and it works

debug {
            // storeFile file('debug.keystore')
            // storePassword 'android'
            // keyAlias 'androiddebugkey'
            // keyPassword 'android'
            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
                storeFile file(MYAPP_UPLOAD_STORE_FILE)
                storePassword MYAPP_UPLOAD_STORE_PASSWORD
                keyAlias MYAPP_UPLOAD_KEY_ALIAS
                keyPassword MYAPP_UPLOAD_KEY_PASSWORD
            }
        }

I also have the same error. I’m currently on React Native 0.72.3 I’m using Firebase (@react-native-firebase/... version 16.4.6), but I don’t think the error is related to it, since those who don’t use it have the same error. On version 9.0.2 it was working perfectly.

react-native: “0.75.4” react-native-google-signin/google-signin: “13.1.0” Screenshot 2024-10-12 at 5 18 09 PM

Main issue in the OAuth 2.0 Client IDs. I use this command for SHA1: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android.

and it gave me the release SHA1 not debug.

So, i run the this command cd android && ./gradlew signingReport and first >Task :app:signingReport use SHA1. and it’s worked.

Screenshot 2024-10-12 at 5 45 25 PM

Here how i’m using.

GoogleSignin.configure({
  webClientId: 'Web client ID', 
  iosClientId: 'iOS Client ID',
  offlineAccess: true,
  forceCodeForRefreshToken: true,
  profileImageSize: 120,
  scopes: ['email', 'profile']
});

I’m using Supabase and Expo and I was getting DEVELOPER_ERROR for a long time and finally figured it out. I was using the wrong SHA-1 fingerprint. Once I finally followed this, it worked for me in prod/the actual Play Store live app:

Fingerprint of a production app downloaded from the play store. You can find the SHA-1 certificate fingerprint in the Google Play Console under Release > Setup > App Integrity > App signing key certificate.

This quote is from Expo’s guide on Google auth.

I previously was using the SHA-1 that I got from running eas credentials and that was not the right one. It seems like using that is sometimes the right one (maybe when your app is just in testing?) but I’m not really sure when that is.

How is implementing Google Sign In on iOS way easier than on Android? man the guys at Google, they really don’t know how to create a good developer experience.

Error message here is not informative “DEVELOPER_ERROR” gives no information of what went wrong.

yeah, seriously, WTF is this error message? Bunch of overpaid jackasses.

In conclusion, this issue causes owing two main problem. One is from wrong sha-1 key and another one is from webClientId.

In my case, I got the valid the sha-1 key generated by command “cd android && keytool -list -v -keystore app/debug.keystore” and replaced sha-1 key in firebase and google cloud Android credential using this.

Code is Medicine. Insane what hoops were meant to be jumped through…

I made it run on SDK 49 EXPO, React Native 0.72.3, Android (since iOS works as butter):

  1. For Android, you’ll need both a Web and Android credentials in Google API Console:
Screenshot 2023-08-08 at 23 58 54 2. Find out your SHA-1 signing key for your development/production apk. If you've built using EAS, get your sha-1 by running `eas credentials`, then selecting `android` > `com.yourbuild.app.dev`. Put that SHA-1 Key, and the appropriate package-name in your Android OAuth credential in Google API console.

3. Now the biggest medicine moment, and super counterintuitive: use the WEB clientID in your config, instead of the Android clientID. I have no idea why this is…

googleSigninComponent.configure({
      scopes: ['https://www.googleapis.com/auth/drive'],
      webClientId: 'YOUR WEB CLIENTID, NOT YOUR ANDROID CLIENTID FROM GOOGLE CONSOLE',
      iosClientId: 'iosClientId for iOS, nothing special here',
      offlineAccess: true,
      forceCodeForRefreshToken: true,
      profileImageSize: 120
});

After this, logged-ins work on Android.

Thank you! I had to get the SHA1 from eas credentials instead of keytool -keystore path-to-debug-or-production-keystore -list -v to get it working on my non-firebase project.

Hi all,

I’m encountering a developer error when using Google Sign-In in my React Native production build, and I wanted to share details here in case anyone has insights or is facing similar issues.

Here’s what I’ve verified so far:

✅ Package name matches across Google Cloud Console, Firebase, Play Console, and the app’s AndroidManifest.xml

✅ SHA-1 and SHA-256 fingerprints added

Both keystore and Google Play App Signing SHA-1s are registered in Firebase and Google Cloud Console

Verified using keytool

✅ OAuth client configuration correct

Correct SHA-1 + package configured in the Google Cloud Console

OAuth consent screen set up

App ownership verified

✅ Firebase + Play Console linked

Firebase project linked to Play Console

google-services.json matches current Firebase project and config

✅ Build environment

Dev (debug) build → working flawlessly

Prod build (closed test track on Play Console) → developer error

No recent changes to app code, configuration, or cloud console settings

It was working in production just last week

✅ Web Client ID match

Given that no updates have been made on my side, I’m confused as to where the issue is coming from. Dev build is working. Production build worked last week, only to stop working this week. I checked and there’s no new update to the package either.

If anyone has encountered this recently or has suggestions, I’d really appreciate the help!

Thanks!

iam also facing same issue is it due to that sha1 key from eas build is different than native build for android? currently iam using the key from eas build but i do using emulator so it’s basically use the native android build.

Code is Medicine. Insane what hoops were meant to be jumped through…

I made it run on SDK 49 EXPO, React Native 0.72.3, Android (since iOS works as butter):

  1. For Android, you’ll need both a Web and Android credentials in Google API Console:
Screenshot 2023-08-08 at 23 58 54 2. Find out your SHA-1 signing key for your development/production apk. If you've built using EAS, get your sha-1 by running `eas credentials`, then selecting `android` > `com.yourbuild.app.dev`. Put that SHA-1 Key, and the appropriate package-name in your Android OAuth credential in Google API console.

3. Now the biggest medicine moment, and super counterintuitive: use the WEB clientID in your config, instead of the Android clientID. I have no idea why this is…

googleSigninComponent.configure({
      scopes: ['https://www.googleapis.com/auth/drive'],
      webClientId: 'YOUR WEB CLIENTID, NOT YOUR ANDROID CLIENTID FROM GOOGLE CONSOLE',
      iosClientId: 'iosClientId for iOS, nothing special here',
      offlineAccess: true,
      forceCodeForRefreshToken: true,
      profileImageSize: 120
});

After this, logged-ins work on Android.

THANK YOUUUUUUUU. I’ve been stuck on this for freaking DAYS, and this finally got me to sign in correctly

Same here tried everything but no success

I my case, I was facing Google Sign-In Error: com.google.android.gms.common.api.ApiException: DEVELOPER_ERROR ### error because I was in debug mode and trying to use release SHA-1 key in my Firebase account

When using npm run android, you’re creating a debug build. The keystore you made with keytool is for releasing your app on the Play Store. For debug builds with npm run android, React Native uses an automatically generated debug keystore. This means the SHA-1 fingerprint you need for Firebase and Google Cloud Console will likely be different from your release keystore’s SHA-1.

hey i’m just stuck for a day to facing error Google Sign In Error: [com.google.android.gms.common.api.ApiException: DEVELOPER_ERROR], anyone have ideas to solve it? I was generate SHA1 and check the google console too

@rogerkerse that’s indeed when you’re using Firebase. For a Firebase-less login, the hoops are higher and tighter.

For me, just adding SHA-1 from Play Store > App Signing into Firebase and then updating google-services.json worked.

Code is Medicine. Insane what hoops were meant to be jumped through…

I made it run on SDK 49 EXPO, React Native 0.72.3, Android (since iOS works as butter):

  1. For Android, you’ll need both a Web and Android credentials in Google API Console:
Screenshot 2023-08-08 at 23 58 54 2. Find out your SHA-1 signing key for your development/production apk. If you've built using EAS, get your sha-1 by running `eas credentials`, then selecting `android` > `com.yourbuild.app.dev`. Put that SHA-1 Key, and the appropriate package-name in your Android OAuth credential in Google API console.

3. Now the biggest medicine moment, and super counterintuitive: use the WEB clientID in your config, instead of the Android clientID. I have no idea why this is…

googleSigninComponent.configure({
      scopes: ['https://www.googleapis.com/auth/drive'],
      webClientId: 'YOUR WEB CLIENTID, NOT YOUR ANDROID CLIENTID FROM GOOGLE CONSOLE',
      iosClientId: 'iosClientId for iOS, nothing special here',
      offlineAccess: true,
      forceCodeForRefreshToken: true,
      profileImageSize: 120
});

After this, logged-ins work on Android.

should be in the docs ideally

In my case it was incorrect package name provided to android client (there were 3 different ones in AndroidManifest)