Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Auth not working - 'Update Google Play services' msg on the emulator (Android)

Tags:

I'm trying to use the Firebase Auth service with email and password. When I click on register I got an alert on the emulator that says :

"Update Google Play services : Firebase Auth won't run unless you update Google Play services" 

When I look in the logs, I can read those 2 lines :

DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 9080480  

In the SDK Manager, Google Play services are up to date. I suspect it's a problem with the emulator, which somehow isn't up to date.

The emulator I'm using : Nexus 5X API 21 (with Google API)

Any idea? Thanks!

like image 348
raphh Avatar asked Jun 29 '16 17:06

raphh


People also ask

How do I enable Android verification for Firebase project in?

In the Firebase console, open the Authentication section. In the Sign in method tab, enable the Phone provider if you haven't already. Open the Phone numbers for testing accordion menu. Provide the phone number you want to test, for example: +1 650-555-3434.

How do I remove Captcha verification from Firebase phone auth using Android?

Don't forget to go in Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour and u will remove reCaptcha from phone auth OTP! That's awesome.


2 Answers

In your post you say, In the SDK Manager, Google Play services are up to date.

The version of Google Play Services shown in the Extras section at the bottom of the Standalone SDK Manager has no effect on the version used by an emulator. The emulators run on system images configured to contain some particular version of Play Services, which is not always the latest.

You should confirm that you have downloaded the latest emulator images. These are listed in the Standalone SDK Manager under each API level and have names that end with System Image. Double check that you have downloaded the lastest versions of the Goggle APIs...System Image files. You will then need to recreate your emulator to use the updated image.

Until I saw your question, I did not have the latest versions and tried running Firebase Auth 9.0.2 on a Nexus 5X API 21 emulator. It failed with a message similar to what you reported. I then downloaded the latest image (rev 12) and am now able to run successfully.

like image 177
Bob Snyder Avatar answered Sep 19 '22 17:09

Bob Snyder


best way for future problems like this is .

open you emulator go to settings > apps > Google Play Services

you will find witch version your AVD is using

play_services_version

now that you know the number your AVD is using just use any

version equal or bellow in your gradle

dependencies {      compile fileTree(include: ['*.jar'], dir: 'libs')     testCompile 'junit:junit:4.12'     compile 'com.android.support:appcompat-v7:24.0.0'     compile 'com.android.support:design:24.0.0'     // Fire base     compile 'com.google.firebase:firebase-auth:9.0.1'     compile 'com.google.firebase:firebase-database:9.0.1'     compile 'com.google.android.gms:play-services-auth:9.0.1' }  apply plugin: 'com.google.gms.google-services' 

this work for me , i hope it helps !

like image 36
Adliano Alves Avatar answered Sep 20 '22 17:09

Adliano Alves