react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.12k stars 877 forks source link

Google Signin not working after release on play store - Error: DEVELOPER_ERROR #1276

Closed Ganeshguru5 closed 1 month ago

Ganeshguru5 commented 2 months ago

Here is the explaination of my issue

Environment

Here is my Auth function

function* SignInGoogle(action) {
  try {
   // Check if your device supports Gogle Play
   GoogleSignin.configure({ 
    webClientId: '<I use my webclient ID>'
   })
  yield GoogleSignin.hasPlayServices({ showPlayServicesUpdateDialog: true })
  const { idToken } = yield GoogleSignin.signIn()
  const googleCredential = auth.GoogleAuthProvider.credential(idToken)
  const users = yield firebase.auth().signInWithCredential(googleCredential).then(users => users)
  const userData = users.user
  const additionalUserInfo = users.additionalUserInfo
  const isNewUser = additionalUserInfo.isNewUser
  if(!isNewUser) {
    const data = yield call(getDoc, 'users', userData.uid)
    if(data) {
      yield put(loginUserSuccess(data, userData.uid))
    } else {
      const name = userData.displayName !== null ? userData.displayName : ''
      const phone = userData.phoneNumber !== null ? userData.phoneNumber : ''
      const userd = {
        email: userData.email,
        name,
        uid: userData.uid,
        phone,
        signInMode:'signInWithGoogle'
      }
      const dd = yield call(setDoc, 'users', userData.uid, userd)
      yield put(signUpSuccess(userd, 'currentUser.accessToken'))
    }
  } else {
    const name = userData.displayName !== null ? userData.displayName : ''
    const phone = userData.phoneNumber !== null ? userData.phoneNumber : ''
    const userd = {
      email: userData.email,
      name,
      uid: userData.uid,
      phone,
      signInMode:'signInWithGoogle'
    }
    const dd = yield call(setDoc, 'users', userData.uid, userd)
    yield put(signUpSuccess(userd, 'currentUser.accessToken'))
  }
    signUpFailure('error')
  } catch (e) {
    const updates = {}
    const time = moment().unix() * 1000
    const refId = 'error_log'
    updates[time] = {
      time,
      error_msg: `${e}`,
    }
    update(getDatabase(refId), updates)
    signUpFailure(e)
  }
}
killerchip commented 2 months ago

Does this help? https://github.com/react-native-google-signin/google-signin/issues/1252

Ganeshguru5 commented 2 months ago

Does this help? #1252

Thanks, But it does'nt help. I have already done this.

Ali-Hassan-0 commented 1 month ago

Also I'm facing this issue and waiting solution.

MiiiaYang commented 1 month ago

Does this help? #1252

I have the same problem! I also done this, But it doesn't help.

mohdabbas commented 1 month ago

Did anyone find the solution?

Ganeshguru5 commented 1 month ago

Did anyone find the solution?

No, I tired of research on this issue on past two weeks.

ahmadtech199 commented 1 month ago

Did anyone find the solution?

mohammad-goldast commented 1 month ago

Same issue, Doesn't Google Console change our SHA-1 when we upload the app with .aab format?

mohammad-goldast commented 1 month ago

SOLUTION:

As I mentioned a question in the above message, I searched a little about Google Signing and realized that the Google App Sign section in the GooglePlay dashboard, changes the SHA-1 fingerprint after uploading.

The only thing you need to do is : 1 - Go to the GooglePlay Dashboard 2 - Setup > App Signing 3 - Copy the SHA-1 Certificate 4 - Go to the Firebase > Project Settings 5 - Press "Add a new fingerprint" button inside of the Android project 6 - Past the new SHA-1 there and save it.

Done.

vyshakh commented 1 month ago

I'm also facing the same issue. Production release apk is working fine, but getting DEVELOPER_ERROR after release on playstore. I already have SHA-1 in place

vyshakh commented 1 month ago

This worked for me. @mohammad-goldast @Ganeshguru5 play console -> production -> app bundles -> downloads -> download signed universal apk Run below command keytool -printcert -jarfile version_number.apk copy the sha1 to firebase

lamlengend98 commented 1 month ago

I did everything, copy SHA-1 to firebase, create Android Credentials on Google Cloud Still not working, so sad

vonovak commented 1 month ago

Hello and thanks for asking, please refer to the guide https://react-native-google-signin.github.io/docs/troubleshooting or get in touch with me if you're stuck (as a paid service, see at the top of the linked page) Thank you 🙂

mohdabbas commented 1 month ago

We were not expecting this answer!

vonovak commented 1 month ago

We were not expecting this answer!

I beg your pardon?