question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Google Authentication on iOS and Android - internal error

See original GitHub issue

Running into:

NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information.,
NSUnderlyingError=0x1c4256e90 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
    code = 400;
    errors =     (
                {
            domain = global;
            message = "Error occurs when calling appIdentity.";
            reason = invalid;
        }
    );
    message = "Error occurs when calling appIdentity.";
}}}}

{N} code which is executed on button tap:

  login() {
    console.log('Login tapped');
    firebase.login({
      type: firebase.LoginType.GOOGLE,
    }).then(result => {
      console.log(JSON.stringify(result));
    },
    err => {
      console.log('Error occured');
      console.log(err);
    });
  }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
noumaanscommented, Apr 26, 2018

I was able to find a workaround for the issue, and am documenting it here @EddyVerbruggen in case someone else runs into the same problem. Also, I’m closing the issue since it’s not a bug on the plugin side.

If your Firebase project was created by Actions on Google, delete your project (after backing up important data). Then, create a new Firebase project and link it to your Actions on Google project.

TL;DR

Buggy Flow:

  1. Create Actions on Google Project a Implicitly have Actions on Google create a brand new DialogFlow project b Implicitly have DialogFlow create a Firebase project c Implicitly have Firebase create a Google Cloud project
  2. Note: None of the projects above are created explicitly – these are all created via Actions on Google
  3. Now enable Authentication on Firebase, and only enable Google sign-in provider
  4. Download google-services.json and / or GoogleService-Info.plist
  5. Add them to Android and iOS sample
  6. Execute login through Google in Android or iOS app
  7. You will now see the Identity error

Working Flow:

  1. Create a Firebase project a. Implicitly have Firebase create a Google Cloud project
  2. Create Actions on Google Project
  3. Create a DialogFlow project and connect it to Firebase project created in 1
  4. Now enable Authentication on Firebase, and only enable Google sign-in provider
  5. Download google-services.json and / or GoogleService-Info.plist
  6. Add them to Android and iOS sample
  7. Execute login through Google in Android or iOS app
  8. Authentication works
0reactions
rb1250commented, Oct 19, 2018

Facing same issue, have created project in react-native and everything is working fine but when using testflight build firebase signinwithphonenumber() returns, “An internal error has occured”. Working well with few iOS devices and throwing this error with few devices. Can anyone help me out with this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.google.firebase.FirebaseException: An internal error ...
I was using signInWithCustomToken() , and just visiting the authentication page in firebase console and pressing on "Get Started" button was ...
Read more >
Google Authentication on iOS and Android - internal error
Running into: NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information., ...
Read more >
Can't sign in from a third-party service - Google Account Help
A general error that your sign-in was unsuccessful. · The service you're signing in from doesn't provide enough information to prove it's you....
Read more >
Authenticate with Firebase on Apple Platforms using a Phone ...
Phone numbers that end users provide for authentication will be sent and stored by Google to improve our spam and abuse prevention across...
Read more >
Google Sign-In for server-side apps | Authentication
Note: Use a single project to hold all platform instances of your app (Android, iOS, web, etc.), each with a different Client ID....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found