Epsiba Angel
Epsiba Angel

Reputation: 433

FireBase stuck on "Run your app to verify installation" for android

I'm new to android development, since a long time, I'm stuck in one error that is Run your app to verify installation (Checking if the app has communicated with our servers. You may need to uninstall and reinstall your app.)

build.gradle(Module:app)
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
        implementation 'com.google.firebase:firebase-core:16.0.1'
    }

     dependencies {
            classpath 'com.android.tools.build:gradle:3.3.2'
            classpath 'com.google.gms:google-services:4.0.1'
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }

Upvotes: 42

Views: 43809

Answers (18)

Perraco
Perraco

Reputation: 17380

In my case the problem was that in the gradle file at project level, I had set the latest google-services, which at the time of this answer is 4.3.0:

classpath 'com.google.gms:google-services:4.3.0'

Then I noticed that in the Firebase wizard, the configuration steps showed instead a previous version: 4.2.0

Changing my gradle one to match the same version as shown in the Firebase configuration wizard solved the problem.

Note: so, my conclusion is that regardless of which one is the latest google-services version, (and the versions we talk about in this stack-overflow question and answer), we should always use the version shown in the Firebase wizard configuration steps.

Upvotes: 12

Emilie
Emilie

Reputation: 285

I found that, even though I wasn't using Analytics (only functions and firestore), I had to add the analytics line in the build.gradle file, or:

implementation 'com.google.firebase:firebase-analytics:17.5.0'

in order for the automatic app detection to work.

I think if you know what you are doing, and don't need analytics, it is fine to just skip this step.

Upvotes: 0

Deepak swain
Deepak swain

Reputation: 3700

Follow the exact version mentioned in Waizard, It will show success.

Its worked for me.

Upvotes: 0

Raviraj Pophale
Raviraj Pophale

Reputation: 81

Firebase is not good for analytics. google merge Google Analytics with firebase from then this irritating issue occurred. Previously Google analytics was working superbly within sec. Now we don't have options just skip this step and hope it'll work automatically after sometime.

Upvotes: 0

Luke
Luke

Reputation: 93

Make sure you don't have any network-level adblockers running, which may be blocking calls to Firebase.

In my case, I had to disable Pi-Hole in order to allow my app to connect to Firebase over my network.

Upvotes: 5

Sachin
Sachin

Reputation: 1425

If any one is getting like this in console :

com.google.firebase.FirebaseException: An internal error has occurred. [ API key not valid. Please pass a valid API key. ]

Just change the version of google services at project level gradle and sync your project and reinstall.

classpath 'com.google.gms:google-services:4.3.0'

This work for me I

Upvotes: 0

Virat18
Virat18

Reputation: 3505

None of the above answers helped me. But @kotlinski's answer helped me to go AndroidManifest.xml to check issue. In my case, this was the entry in AndroidManifest.xml.

<meta-data
        android:name="firebase_analytics_collection_enabled"
        android:value="false" />

I just modified it to true, in order to make things work. Immediately I got message on FCM console 'Congratulations, you've successfully added Firebase to your app! '

Upvotes: 2

ivoroto
ivoroto

Reputation: 1035

I solved updating the SDK Tools: Preferences -> Appearance & Behavior -> System Settings -> Updates, then click on "Check Now".

When the update was completed I uninstalled the app from the emulator, quitted both Android Studio and emulator and ran again

Upvotes: 3

Andris
Andris

Reputation: 4203

In my case Fabric was conflicting with Firebase. When i removed Fabric from packages, it started working. Also i have seen cases when there is problem to verify, when phone is connected to wifi. In this case change network to Mobile data.

Upvotes: 1

kotlinski
kotlinski

Reputation: 330

I followed every step, but i didn't work. So I contacted the Firebase support and got the following answer:

Thanks for reaching out, Simon.

I'd recommend just skipping that step altogether. The app should have already been successfully added and to verify that Firebase is working, it'd be better to directly test whichever service you're trying to use.

Let me know if you have any other questions/issues.

---- Update 2020-01-20 ----

I found out that someone of my colleagues added this snippet in the AndroidManifest.xml a couple of years ago. After enabling analytics again I got the expected behaviour in the Firebase console.

<meta-data
    android:name="firebase_analytics_collection_deactivated"
    android:value="true" />

Upvotes: 16

atereshkov
atereshkov

Reputation: 4565

Make sure you:

  1. Have included google() in the buildscript repositories in the android/build.gradle
  2. Have added classpath 'com.google.gms:google-services:4.3.3' dependency in the android/build.gradle
  3. Have included google() in the allprojects repositories in the android/build.gradle

And this official documentation helped me a lot (I just followed all the steps).

Upvotes: 0

user12348221
user12348221

Reputation: 29

Just run flutter clean command in Android studio terminal, then reinstall and then try connecting it in firebase it will work

Upvotes: 2

rabiaasif
rabiaasif

Reputation: 312

I had this issue, i deleted the google.json / google.plist file and started the app again. clean the build folder, clear caches, delete the app off simulator, restart it, do pod update && pod install... etc. I found for me this happened when the google file was messed up

Upvotes: 2

Richard Miller
Richard Miller

Reputation: 616

Thanks to @Udayraj Deshmukh comment I fixed the issue. I thought I will add this as an answer as it helped me

Simply go to your app-level Gradle and add this:

apply plugin: 'com.google.gms.google-services'

enter image description here

Firebase SDK guide forgot to tell you to include the plugin. enter image description here

Upvotes: 20

ezQel
ezQel

Reputation: 81

If the application is still empty, you need to add internet permission in the manifest. <uses-permission android:name="android.permission.INTERNET"/>

Upvotes: 8

Saurav Kumar
Saurav Kumar

Reputation: 7

Incase you are running the app in a physical android device ensure it has the same google account as used to sign up for Firebase.

Upvotes: -3

Nelvin Nakoro
Nelvin Nakoro

Reputation: 69

You are not stucked my friend, just follow this steps: 1. Go to your android studio project and click on Main_activity.xml to show your app 2. click run menu and run the app either in a real device or an emulator 3. when it has loaded the app, then your connection will be successful in firebase

Upvotes: -1

Gourav
Gourav

Reputation: 2819

You have to do nothing for your question but run the app on the android emulator or a real android device. If you have made your app and later added the dependencies, then you need to delete the app from the device/emulator and install the app again.

By doing this, when the app runs, it passes variables from the google-services.json file to the firebase servers and checks if the same app is communicating or not.

This step is to verify the correct installation of firebase dependencies in the app. If you find it difficult, you can skip the process anyway.

Upvotes: 37

Related Questions