Hi All,
I have already install react native google signin step by step and configure android side step by step base on documentation nothing left. But in actual if i try to hit GoogleSignin.signIn() and try to login using an google account, it's get an DEVELOPER ERROR and error code 10.
If i googling that cause of keystore not properly configured, but in my case i have already configured it and from A to Z, nothing left.
What should i check next?
step to produce:



Environment:
android/build.gradle:
`buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
googlePlayServicesAuthVersion = "16.0.1" // <--- use this version or newer
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.2")
classpath 'com.google.gms:google-services:4.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
jcenter()
maven { url 'https://jitpack.io' }
}
}
`
android/app/build.gradle
`apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
react-native bundle with the correct arguments during the Android buildapply from: "../../node_modules/react-native/react.gradle" line.project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
/**
/**
/**
def jscFlavor = 'org.webkit:android-jsc-intl:+'Date.toLocaleString and String.localeCompare that/**
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.samplerngooglesignin"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services' // <--- this should be the last line`
Please provide
hello, please see https://github.com/react-native-community/react-native-google-signin/blob/master/docs/android-guide.md#getting-developer_error-error-message-on-android-when-trying-to-login
hello, please see https://github.com/react-native-community/react-native-google-signin/blob/master/docs/android-guide.md#getting-developer_error-error-message-on-android-when-trying-to-login
Already follow that's instruction, then still get error code 10.
Hi All,
Issue solved,
note for documentation get SHA-1 debug for path is not
I install RN-google-signin correctly. I get hash SHA-1, firebase configured but the error continues :/
note for documentation get SHA-1 debug for path is not
Sorry, what? I am having the same problem
@skaptox
I had the same problem, and this article solved it all at once.
https://medium.com/fullstack-with-react-native-aws-serverless-and/google-sign-in-for-react-native-android-7d43df78c082
I hope you find it helpful if you haven't solved the problem yet.
I ve solved it by replacing androidClientId to webClientId
In issue #794
In google console open project Credentials
under 2.0 client IDs there is 2 ID one android other web. I used WEB one.
clientID
In my code google config like that: enter webClientId prop.
It successfull to login with google.
For anybody else who is coming across this and has gone through the steps of
webClientIdI was able to finally get past this by running gradlew clean.
Can't seem to solve this issue. I have two custom keystores setup.
What I did:
keytool -exportcert -alias KEYSTORE_ALIAS -keystore KEYSTORE_PATH and inserted this to my dev and prod app in FirebasewebClientId from Firebase Console > Authentication > GoogleSignIn and added it before the signin with Google.Configure buildTypes {
debug {
debuggable true
productFlavors.dev.signingConfig signingConfigs.dev
productFlavors.prod.signingConfig signingConfigs.prod
}
release {
debuggable false
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles fileTree(dir: "${project.rootDir}/proguard_libs", include: ["*.pro"]).asList().toArray()
productFlavors.dev.signingConfig signingConfigs.dev
productFlavors.prod.signingConfig signingConfigs.prod
}
}
google-services.json./gradlew clean and adb uninstall com.packagenamenpm run androidStill the same DEVELOPER_ERROR.
I'm really out of options.. Anyone suggestions?
In the Google console, I had to use the web application type (which doesn't require a SHA1) instead of the android type when creating an OAuth 2.0 client id. That worked for me.
Try adding SHA 1 key of debug to firebase in settings -> Add FingerPrint,
you can find your key by
cd android && ./gradlew signingReport

And again download googleservices.json
Cheers!
Most helpful comment
Sorry, what? I am having the same problem