I'm having trouble getting Firebase Crashlytics to work in my Android Studio project. I keep getting these runtime errors:
E/FirebaseCrashlytics: Settings request failed.
java.io.FileNotFoundException: https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/xxxxxxx:android:xxxxxxxxb/settings?instance=xxxxxxx8&build_version=2&display_version=2.0&source=1
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
at com.google.firebase.crashlytics.internal.network.HttpGetRequest.execute(HttpGetRequest.java:80)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:113)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:199)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:192)
at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run(Thread.java:923)
E/FirebaseCrashlytics: Error handling uncaught exception
java.util.concurrent.TimeoutException
at com.google.firebase.crashlytics.internal.common.Utils.awaitEvenIfOnMainThread(Utils.java:122)
at com.google.firebase.crashlytics.internal.common.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:232)
at com.google.firebase.crashlytics.internal.common.CrashlyticsController$1.onUncaughtException(CrashlyticsController.java:155)
at com.google.firebase.crashlytics.internal.common.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:54)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1073)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
at java.lang.Thread.dispatchUncaughtException(Thread.java:2203)
I/Process: Sending signal. PID: 19658 SIG: 9
I've tried completely removing Firebase from the project and removing the project from Firebase, in other words starting from scratch, but this isn't working either. What could be going on here?
I solved this by migrating my project to a new Firestore project and replacing google-services.json in my Android Studio app folder. I then invalidated cache/restart and I was able to enable Crashlytics in Firestore by forcing an app crash per documentation instruction.