quent
quent

Reputation: 2185

Firebase 10.0.: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device

I am developping an Android application using Firebase Authentication (using Google account) and I recently experience the following exception every time I try to connect:

com.google.firebase.FirebaseApiNotAvailableException: API: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device. at com.google.firebase.zza.zzz(Unknown Source) at com.google.android.gms.internal.zzzq$zzd.zzy(Unknown Source) at com.google.android.gms.internal.zzaap$zza.zzC(Unknown Source) at com.google.android.gms.internal.zzaap$zza.onConnectionFailed(Unknown Source) at com.google.android.gms.internal.zzaap$zzb$1.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:730) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.os.HandlerThread.run(HandlerThread.java:61)

I'm quite surprised since the authentication worked very well until a few days ago...

I use firebase 10.0.1.

Do someone have ever experienced this error and resolved it?

Upvotes: 8

Views: 18153

Answers (5)

Mahinthan177
Mahinthan177

Reputation: 876

Check In your build.gradle (Project) > Repository have following code

mavenCentral()

Check In your build.gradle (Module: app) > dependencies have following code

implementation 'com.facebook.android:facebook-android-sdk:[5,6)'

Upvotes: 1

Muhammad Ali
Muhammad Ali

Reputation: 31

You get this error bcz your device not having 'Google play services' so that it can't integrate with.. For those who have been using Genymotion virtual or other(Other than Android studio emulator itself) they need to add these services(Play store, Google, etc).. For this search 'How to install Google play services in Genymotion emulator'

Sometime you also get Default firebase is not initialized in this process for this you must upgrade your classpath and dependency both in gradle script (project and module app respectively) ...

classpath 'com.google.gms:google-services:-.-.-' implementation 'com.google.firebase:firebase-auth:-.-.-'

Upvotes: 0

Hồng Phúc
Hồng Phúc

Reputation: 478

You have to install google play for virtual machine.
For Ex:go to google search: "install google play service for genymotion" , and it will be guide you to install

Upvotes: 1

amorenew
amorenew

Reputation: 10906

Maybe your emulator doesn't have google play

Upvotes: 8

Swarup Rajbhandari
Swarup Rajbhandari

Reputation: 486

I think you are using your phone as a emulator. So, on your phone,

  1. Go to your Google Play Services.
  2. Open its App Info.
  3. Clear the Data and Cache.

path: --> (Settings > Apps > Google Play services > Storage > Manage Space > Clear All Data).

open the app after few minutes.

Upvotes: 9

Related Questions