Open rupinderjeet opened 3 years ago
I found a few problems with this issue:
isn't it simply because the SDK couldn't connect to the firebase service? you can wrap the fetching in a try-catch block
Well, anyone will do exactly that.
I reported because the last guy who commented on #1776 asked to reopen it if anyone encountered it. Also, they couldn't find the source of the issue.
https://github.com/firebase/firebase-android-sdk/issues/1776#issuecomment-713738642
Besides, will you want the app to crash if there's no connectivity? The documentation never mentioned that I need to do this. And, what's the point of adding something like onFailureListener
or onCompleteListener
?
is await()
an extension function? can you give me a sneak peek of the extension? maybe that is a coroutine related issue
Ah, sure. Yes, that makes sense. await()
is from following dependency.
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.1.1"
possibly the await()
resume the coroutine with an exception when there is a failure
@AgiMaulana you're right, await()
will re-throw any exceptions thrown in the co-routines
@ankitaj224 can comment on the specifics of the failure
I was facing the same issue while using multiple project config(staging and prod). If you are using double google-service.json files one for prod and one for staging environment then you should override the below string res values in staging directory string.xml file. it is working for me.
`
<string name="firebase_database_url" translatable="false"></string>
<string name="gcm_defaultSenderId" translatable="false"></string>
<string name="google_api_key" translatable="false"></string>
<string name="google_app_id" translatable="false"></string>
<string name="google_crash_reporting_api_key" translatable="false"></string>
<string name="google_storage_bucket" translatable="false"></string>
<string name="project_id" translatable="false"></string>`
you can verify or compare values of these res in this path -> build/generated/res/google-services/production/debug/values/values.xml
this is what actual values your current build is using
@rlazo Regarding the Firebase Installations error: If the RC fetch was awaiting on FIS getToken method for auth token and there is no connectivity, the call will fail with the above error. I am not sure how RC internally handles that failure.
@danasilver can you please help from the RC end of things.
Thanks.
Sure - if the getToken
method fails, RC will propagate that exception and return a task with a FirebaseRemoteConfigClientException
.
I am also getting the same issue any luck??
Firebase remote config fetch failed, details:c9.d: Firebase Installations failed to get installation auth token for fetch.
Our users are still facing this error on version 21.2.1. The configs are fetched on the main activity and Google Play Services availability is checked before fetching them. I couldn't believe it is happening due to network connectivity (523 occurrences in the last 7 days). I tried disabling the wifi / mobile data but couldn't reproduce the exception.
Any thoughts or solutions?
Describe your environment
Describe the problem
At the time of doing a
fetchAndActivate()
, the task finishes not successful with the following exception inside:Failed to get Firebase Instance ID token for fetch. FIS_AUTH_ERROR
This is a duplicate of #1776 with steps to reproduce
Steps to reproduce:
fetchAndActivite()
on remote config instanceRelevant Code:
Following call is made from
onResume()
of an activity. It is, also, surrounded by coroutineDispatchers.IO
usingwithContext()
Note: App doesn't crash if there is a SIM card and airplane mode is off (even if mobile data and WiFi is turned off)