Hello
I'm getting issue when I try to use firebase UI authentication phone verification on an emulator. I get an error says
Internal error has occurred [invalid_app_credential: app validation failed]
Error description received from server: INVALID_APP_CREDENTIAL : App validation failed
BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=AIzaSyDWGycBk58rjdR5IlyaUMhT4XXkzhKaxQE
same issue in moto g 1st gen

My issue was in the emulator but when I install the app on my Samsung Galaxy. It works perfectly.
Hi all this is by design. Phone Authentication uses a lot of signals to prevent fraud which means it can't work on an emulator. You'll need to test on a real device.
I though It was done to prevent abuse.
Any how. At least the error message should indicate this. @samtstern
What i do for this error on my android device?
@kishansinhparmar does the email and password works perfectly ?. if it is not you may have issue with firebase configuration see the documentation. Otherwise, firebase auth may think your device is an emulator or rooted. Like @samtstern what said. It seems Google is trying to prevent any case of abusing Firebase phone verification.
yup rooted...but what about sign in with google?
While sign in with google
E/GoogleProvider: Error logging in with Google. 10 null
@kishansinhparmar try to re-sync firebase or redo the firebase configuration. I've no idea
@MuBoori thanks...try to re-sync
Is this problem also occurs on rooted devices?
Phone auth works in emulator but only with testing phone numbers.
Please read the stackoverflow answer here
Anyone know how it detects if the device being used is a physical device?
I tried to add my testing phone number in firebase console but it didn't worked also
Your problem related to SHA1 and SHA256 keys. You have to add them to authenticate your certs.
Goto
Firebase Console of your project
Authentication
Project Setting (From Setting button near Project Overview)
Add fingerprint
Add SHA-1 and SHA-256 values of your keystore.
You can get keystores from gradle like this.
./gradlew signingReport
Read this for more information: https://firebase.google.com/docs/auth/android/phone-auth#enable-app-verification
Most helpful comment
I tried to add my testing phone number in firebase console but it didn't worked also