Closed kelvinvasquezitofc closed 11 months ago
Same here tried everything but no success
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.
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
}
}
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):
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.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.
Hello and thanks for asking, seems the issue is resolved. Also, note that it's documented extensively in the android docs. Thank you 🙂
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.
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:
Thank you so much for your help.
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=
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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 :)
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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.
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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!
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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
In my case it was incorrect package name provided to android client (there were 3 different ones in AndroidManifest)
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.
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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
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):
- For Android, you'll need both a Web and Android credentials in Google API Console:
![]()
- 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 selectingandroid
>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.
This is really good works for me as well.
When configuring google signing it shows the following error DEVELOPER_ERROR
GoogleSignin.configure({
offlineAccess: false,
webClientId:'My_ID_ANDROID',
iosClientId: 'My_ID_IOS',
});
"react-native": "0.72.3"