Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: DEVELOPER_ERROR React Native 0.72 #1192

Closed
kelvinvasquezitofc opened this issue Jul 30, 2023 · 14 comments
Closed

Error: DEVELOPER_ERROR React Native 0.72 #1192

kelvinvasquezitofc opened this issue Jul 30, 2023 · 14 comments

Comments

@kelvinvasquezitofc
Copy link

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"
@KubaKubikula
Copy link

KubaKubikula commented Aug 1, 2023

Same here tried everything but no success

@lorenzolaricchia
Copy link

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.

@neilanthonyte
Copy link

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
            }
        }

@adamblvck
Copy link

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.

@vonovak
Copy link
Member

vonovak commented Aug 11, 2023

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

@vonovak vonovak closed this as completed Aug 11, 2023
@CruzNadin
Copy link

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
            }
        }

Worked for me, thank you.

@schrodingersca8
Copy link

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.

@lucasbasquerotto
Copy link

I was having this issue and had done everything like @schrodingersca8. I solved it using the webClientId from the google project we use for authentication, which is different than the project in the google-services.json file.

I had added the SHA-1 in the project of the google-services file, but I had to create a new android oauth credential (at https://console.cloud.google.com/apis/credentials?project=<your_project>) with the correct package name and SHA-1 in the same project that has the web oauth.

@Devdannnny
Copy link

Devdannnny commented Feb 7, 2024

offlineAccess: true,
      forceCodeForRefreshToken: true,

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.

For those using Expo SDK 49 and with no firebase....This works for me

@davidmonnom
Copy link

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.

Wooww, thanks man! I don't know how you came up with this but it works :)

@audn
Copy link

audn commented Mar 16, 2024

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.

@aleksey-mukho
Copy link

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.

Man, you are the best! Thank you so much!

@orichh
Copy link

orichh commented Apr 7, 2024

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

@Avizura
Copy link

Avizura commented Apr 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests