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 876 forks source link

[ANDROID] Getting Error: "A non-recoverable sign in failure occurred" when using firebase emulator #1201

Open awlui opened 9 months ago

awlui commented 9 months ago

This issue applies to Android only. iOS works just fine.

I get an error, "A non-recoverable sign in failure occurred", after triggering google sign in. I found a similar issue, https://github.com/react-native-google-signin/google-signin/issues/659#issuecomment-513555464, which was solved by adding a support email to the firebase console. I've looked at the docs, but I'm still not sure how to do the same via the firebase emulator.

Steps to Reproduce

With

// App.js
    GoogleSignin.configure({
      webClientId: CLIENT_ID}",
    });

// googleSignInButton.js

      const {
        idToken,
        user: { email },
      } = await GoogleSignin.signIn();

Expected Behavior

The google sign on webview should open after triggering GoogleSignin.signIn();

Environment

"react-native": "0.70.8", "@react-native-google-signin/google-signin": "^9.0.2",

ahinkle commented 9 months ago

Guessing you mean the Android Emulator - I'm also receiving this error. I upgraded @react-native-google-signin/google-signin to v10.0.1 and I'm still encountering the A non-recoverable sign-in failure occurred message.

I haven't seen this error before -- as I was able to use this functionality a few weeks ago.

Replicate:

GoogleSignin.configure({
  webClientId:
    '{KEY}',
});

await GoogleSignin.signIn();

// Clicking a sign-in on and clicking a Google account returns: [Error: A non-recoverable sign in failure occurred]

Further, I'm getting the same error, no matter what key I change, or leaving the configuration blank:

GoogleSignin.configure({
  //
});

await GoogleSignin.signIn();
awlui commented 9 months ago

Ah no the problem for me is not with the android emulator. I'm thinking it is the firebase emulator. The non-recoverable sign-in failure occurred message seems to be tied to necessary config changes on firebase console. I'm using firebase emulator (ref: https://firebase.google.com/docs/emulator-suite) in place of an actual firebase project, at least for e2e testing purposes.

farooqalam20996 commented 7 months ago

I m also, facing this issue since a week. On IOS it works fine: but not on android...

I m using "@react-native-google-signin/google-signin": "^10.1.0",

I checked by chenges the following: keys, Oath screen confuguration, add webClient ID, add Android Client id, add my firebase Client id,

But nothing works for me...

Reproducing: When Click on sign in. with google to add calendar, then modal appears by showing google accounts and then click any account then the following error occurred:

[Error: A non-recoverable sign in failure occurred]

derciesto commented 7 months ago

facing same issue

farooqalam20996 commented 6 months ago

is anyOther solution for it...

derciesto commented 6 months ago
GoogleSignin.configure({
  webClientId: Platform.OS === "ios" ? "IOS CLIENT ID" : "WEB CLIENT ID", 
  androidClientId: "ANDROID CLIENT ID",
  iosClientId: "IOS CLIENT ID",
});

above client id work for me.

Uros787 commented 6 months ago

same issue here

alme7airbi93 commented 6 months ago

Any solutions for this so far ?

ijazbacha commented 5 months ago

Facing the same error please provide the solution @vonovak

ijazbacha commented 5 months ago

To solve this problem, you need to follow two steps:

  1. Ensure that the Firebase project name and the Android package name are the same.
  2. Ensure that the 'Android package name' is unique. However, this is not the ideal solution, and the Firebase team should address this issue.
JanakarM commented 5 months ago

I'm facing the same issue.

JanakarM commented 5 months ago

To solve this problem, you need to follow two steps:

  1. Ensure that the Firebase project name and the Android package name are the same.
  2. Ensure that the 'Android package name' is unique. However, this is not the ideal solution, and the Firebase team should address this issue.

I'm able to fix the issue following these steps.

dakshlohar1 commented 5 months ago
  1. Android package name are th

Firebase project name does not allow any special character in their project name, and the android package name contains a '.'(dot) in name, how you are doing this?

krvinc0de commented 5 months ago

@JanakarM are you solved this issue?

kravchenko-anton commented 5 months ago

I hope you can tell me how to solve this problem

rgomezp commented 3 months ago

I'm getting this issue on production

rgomezp commented 3 months ago

@JanakarM are you solved this issue?

This works for me:

Use macbook with m1/m2 processor, in Intel, Push notifications not work

Huh?

UmarbekSaidov commented 3 months ago

same issue here

kravchenko-anton commented 3 months ago

Hi all, you just need to recreate the keys in google console and put the new ones in the project

andrey-shostik commented 2 weeks ago

Getting same error after publishing to google play