title: Failed to get FIS auth token on Flutter Android
body: <p>I've encountered with a problem today. 2 or 3 days ago, I integrate FCM in my Flutter App. There were some lack of implementation but I did not care because FCM part of my coding phase did not come yet. But today, before starting to code, normally I run <code>flutter run</code> and these are the logs.</p>
  <pre><code>
  W/ConnectionTracker(17017): java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.measurement.internal.zzja@e8966f2
  W/ConnectionTracker(17017):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1832)
  W/ConnectionTracker(17017):     at android.app.ContextImpl.unbindService(ContextImpl.java:1880)
  W/ConnectionTracker(17017):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:741)
  W/ConnectionTracker(17017):     at com.google.android.gms.common.stats.ConnectionTracker.zza(com.google.android.gms:play-services-basement@@17.3.0:55)
  W/ConnectionTracker(17017):     at com.google.android.gms.common.stats.ConnectionTracker.unbindService(com.google.android.gms:play-services-basement@@17.3.0:50)
  W/ConnectionTracker(17017):     at com.google.android.gms.measurement.internal.zzjb.zzF(com.google.android.gms:play-services-measurement-impl@@18.0.2:6)
  W/ConnectionTracker(17017):     at com.google.android.gms.measurement.internal.zzil.zza(com.google.android.gms:play-services-measurement-impl@@18.0.2:5)
  W/ConnectionTracker(17017):     at com.google.android.gms.measurement.internal.zzak.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:5)
  W/ConnectionTracker(17017):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
  W/ConnectionTracker(17017):     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  W/ConnectionTracker(17017):     at com.google.android.gms.measurement.internal.zzfh.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:6)
  E/FirebaseInstanceId(17017): Failed to get FIS auth token
  E/FirebaseInstanceId(17017): java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@17.1.0:69)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@17.1.0:23)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(com.google.firebase:firebase-iid@@21.0.1:11)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.startRpc(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.getToken(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$1$FirebaseInstanceId(Unknown Source:2)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:8)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(com.google.firebase:firebase-iid@@21.0.1:7)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(Unknown Source:33)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.zzf.run(com.google.android.gms:play-services-tasks@@17.1.0:2)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.3.0:6)
  E/FirebaseInstanceId(17017):    at java.lang.Thread.run(Thread.java:929)
  E/FirebaseInstanceId(17017): Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:200)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:533)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:388)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:377)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    ... 1 more
  W/FirebaseInstanceId(17017): Token retrieval failed: SERVICE_NOT_AVAILABLE. Will retry token retrieval
  E/FirebaseInstanceId(17017): Failed to get FIS auth token
  E/FirebaseInstanceId(17017): java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@17.1.0:69)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@17.1.0:23)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(com.google.firebase:firebase-iid@@21.0.1:11)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.startRpc(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.getToken(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$1$FirebaseInstanceId(Unknown Source:2)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:8)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(com.google.firebase:firebase-iid@@21.0.1:7)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(Unknown Source:33)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.zzf.run(com.google.android.gms:play-services-tasks@@17.1.0:2)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.3.0:6)
  E/FirebaseInstanceId(17017):    at java.lang.Thread.run(Thread.java:929)
  E/FirebaseInstanceId(17017): Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:200)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:533)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:388)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:377)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    ... 1 more
  W/FirebaseInstanceId(17017): Token retrieval failed: SERVICE_NOT_AVAILABLE. Will retry token retrieval
  E/FirebaseInstanceId(17017): Failed to get FIS auth token
  E/FirebaseInstanceId(17017): java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@17.1.0:69)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@17.1.0:23)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(com.google.firebase:firebase-iid@@21.0.1:11)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.startRpc(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.getToken(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$1$FirebaseInstanceId(Unknown Source:2)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:8)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(com.google.firebase:firebase-iid@@21.0.1:7)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(Unknown Source:33)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.zzf.run(com.google.android.gms:play-services-tasks@@17.1.0:2)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.3.0:6)
  E/FirebaseInstanceId(17017):    at java.lang.Thread.run(Thread.java:929)
  E/FirebaseInstanceId(17017): Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:200)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:533)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:388)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:377)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    ... 1 more
  W/FirebaseInstanceId(17017): Token retrieval failed: SERVICE_NOT_AVAILABLE. Will retry token retrieval
  W/Settings(17017): Setting device_provisioned has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
  V/HiTouch_HiTouchSensor(17017): User setup is finished.
  W/HiTouch_PressGestureDetector(17017): Touch pointer move a lot. The moving distance of X is:5.0, limit is:60The moving distance of Y is:64.0, limit is:60
  E/FirebaseInstanceId(17017): Failed to get FIS auth token
  E/FirebaseInstanceId(17017): java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@17.1.0:69)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@17.1.0:23)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(com.google.firebase:firebase-iid@@21.0.1:11)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.startRpc(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.getToken(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$1$FirebaseInstanceId(Unknown Source:2)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:8)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(com.google.firebase:firebase-iid@@21.0.1:7)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(Unknown Source:33)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.zzf.run(com.google.android.gms:play-services-tasks@@17.1.0:2)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.3.0:6)
  E/FirebaseInstanceId(17017):    at java.lang.Thread.run(Thread.java:929)
  E/FirebaseInstanceId(17017): Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:200)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:533)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:388)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:377)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    ... 1 more
  W/FirebaseInstanceId(17017): Token retrieval failed: SERVICE_NOT_AVAILABLE. Will retry token retrieval
  
  
  E/FirebaseInstanceId(17017): Failed to get FIS auth token
  
  
  E/FirebaseInstanceId(17017): java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@17.1.0:69)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@17.1.0:23)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(com.google.firebase:firebase-iid@@21.0.1:11)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.startRpc(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.GmsRpc.getToken(com.google.firebase:firebase-iid@@21.0.1:1)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$1$FirebaseInstanceId(Unknown Source:2)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:8)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(com.google.firebase:firebase-iid@@21.0.1:7)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(Unknown Source:33)
  E/FirebaseInstanceId(17017):    at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.tasks.zzf.run(com.google.android.gms:play-services-tasks@@17.1.0:2)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.3.0:6)
  E/FirebaseInstanceId(17017):    at java.lang.Thread.run(Thread.java:929)
  E/FirebaseInstanceId(17017): Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:200)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:533)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:388)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:377)
  E/FirebaseInstanceId(17017):    at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
  E/FirebaseInstanceId(17017):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/FirebaseInstanceId(17017):    ... 1 more
  W/FirebaseInstanceId(17017): Token retrieval failed: SERVICE_NOT_AVAILABLE. Will retry token retrieval
  
  </code></pre>
  <p>This is my app level gradle dependencies:</p>
  <pre><code>
  apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply plugin: 'com.google.gms.google-services'
  apply from: &quot;$flutterRoot/packages/flutter_tools/gradle/flutter.gradle&quot;
  
  dependencies {
     implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&quot;
     implementation 'com.android.support:multidex:1.0.3'
     implementation platform('com.google.firebase:firebase-bom:26.5.0')
     implementation 'com.google.firebase:firebase-analytics:18.0.2'
     implementation 'com.google.firebase:firebase-messaging:21.0.1'
     implementation 'com.google.firebase:firebase-firestore:22.1.0'
     implementation 'com.google.firebase:firebase-auth:20.0.2'
     implementation 'com.google.android.gms:play-services-basement:17.5.0'
  }
  
  </code></pre>
  <p>This is the Application.java file placed in android/app/src/main/java/io/flutter/plugins/</p>
  <pre><code>
  package com.xyz.yzx;
  
  import io.flutter.app.FlutterApplication;
  import io.flutter.plugin.common.PluginRegistry;
  import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
  import io.flutter.plugins.GeneratedPluginRegistrant;
  import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
  import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;
  
  
  public class Application extends FlutterApplication implements PluginRegistrantCallback {
   @Override
   public void onCreate() {
     super.onCreate();
     FlutterFirebaseMessagingService.setPluginRegistrant(this);
   }
  
   @Override
   public void registerWith(PluginRegistry registry) {
     FirebaseMessagingPlugin.registerWith(registry.registrarFor(&quot;io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin&quot;));
  
   }
  }
  
  </code></pre>
  <p>This is the MainActivity.kt placed in android/app/src/main/kotlin/com/xyz/zxy</p>
  <pre><code>package com.xyz.zxy
  
  import io.flutter.embedding.android.FlutterActivity
  
  class MainActivity: FlutterActivity() {
  }
  
  </code></pre>
  <p>Also I converted android:name to .Application because I want to implement FCM right?</p>
  <pre><code>   &lt;application
         android:name=&quot;.Application&quot;
  </code></pre>
  <p>I did those:</p>
  <ul>
  <li><code>flutter clean</code>.</li>
  <li>Deleted the app from Android (physical device).</li>
  <li>Deleted build file completely.</li>
  <li><code>flutter pub get</code>.</li>
  <li><code>flutter run</code> again.</li>
  </ul>
  <p>After being unsuccessful, I chose a different path.</p>
  <p>I cross check google-services.json file in android/app/src with the newest google-services.json file I have just downloaded from Firebase. Everything is same. Still I replaced the old one with the fresh file.</p>
  <p>No solution found.</p>
  <p>I have checked build/app/generated/res/google-services folder and cross check values.xml with Firebase information. Still same files and API datas. Such as google_api_key, google_app_id, google_storage_bucket, gcm_defaultSenderId etc. are completely match each other.</p>
  <pre><code>Future&lt;void&gt; main() async {
    Paint.enableDithering = true;
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp();
    await setupHive();
    runApp(MyApp());
  }
  </code></pre>
  <p>This is the main block of my project. I did not call FCM in there and did not call it from anywhere of my app except Application.java file in android files.</p>
  <p>firebase dependencies in pubspec.yaml to indicate the versions of them:</p>
  <pre><code>  firebase_admob: ^0.11.0+1
    firebase_messaging:
    firebase_core: ^0.7.0
    firebase_auth: ^0.20.0+1
    cloud_firestore: ^0.16.0
  </code></pre>
  <p>The app is in production mode which removes all restrictions in Firebase and Google Cloud Platform. I check Google Cloud Platform and made sure there is no restriction. Also Firebase Installations are enabled.</p>
  <p>Due to  <code>Failed to get FIS auth token on Flutter Android</code> and <code>W/FirebaseInstanceId(17017): Token retrieval failed: SERVICE_NOT_AVAILABLE. Will retry token retrieval</code> I can not use Authentication service, I can not use Firestore service etc. So the application is somehow dead even in production stage.</p>
  <p>I don't know how to solve this problem. Can anyone help me?</p>
  <p>EDIT:</p>
  <p>When I try to sign-up with e-mail and password method this is the output in log:</p>
  <pre><code>I/FirebaseAuth(17017): [FirebaseAuth:] Preparing to create service connection to fallback implementation
  
  W/System  (17017): Ignoring header X-Firebase-Locale because its value was null.
  </code></pre>