FirebaseRemoteConfig Error “No value of type 'String' exists for parameter key”

后端 未结 8 850
心在旅途
心在旅途 2021-01-31 13:27

I am using Firebase Core and some other Features, but not Remote Config. Multiple times a second the following Output is on Logcat.

Where can I disable the Remote Confi

相关标签:
8条回答
  • 2021-01-31 14:06

    This might be related to, or a result of:

    W/zzd: Application name is not set. Call Builder#setApplicationName
    

    disabling perf-plugin & firebase-perf removes the annoying log entries:

    // classpath "com.google.firebase:perf-plugin:1.2.1"
    // apply plugin: "com.google.firebase.firebase-perf"
    // implementation "com.google.firebase:firebase-perf:17.0.0"
    

    firebase-config works fine on it's own.

    0 讨论(0)
  • 2021-01-31 14:21

    This was my observation:

    If you have a specific key set up on RemoteConfig console & have not added a default key in the default xml (passed in setDefaultsAsync()).

    And if, for some rare case,
    either the there was No Connectivity or Firebase RemoteConfig failed to fetch the values & if that specific key was used to get a default value,
    you might get that message in the Logcat.

    0 讨论(0)
  • 2021-01-31 14:23

    Solution

    Firebase Performance released version 19.0.8 last week to address log spam issue. (see Release Note https://firebase.google.com/support/release-notes/android#2020-07-17) You can update your dependency com.google.firebase:firebase-perf to be the same or higher version to validate the fix.


    Explaination

    To explain more about the reason of this issue: Firebase Performance utilizes Firebase Remote Config to sample down number of events being sent to Firebase, so it will call Firebase Remote Config API getValue(String key) every time it needs the sampling configuration value.

    However, Firebase Remote Config fetch happens every 12 hours. It is possible that configuration value doesn't exist by the time of development. In this case, Firebase Performance SDK will use default value.

    When the configuration value doesn't exist, Firebase Remote Config will generate this log for warning, which is the source of log spam for Firebase Performance users. (See Source Code)

    We have reduced Firebase Performance's call frequency to Firebase Remote Config to avoid triggering this log.

    0 讨论(0)
  • 2021-01-31 14:26

    If you use Firebase Console, setting both values in the Remote Config tab stops the warnings.

    I've used: (as string values)

    • Parameter key: sessions_max_length_minutes | Value: "15"
    • Parameter key: sessions_feature_enabled | Value: "true"

    Not sure if there are any side effects, but (hopefully) it's an internal testing thing and doesn't change anything.

    0 讨论(0)
  • 2021-01-31 14:26

    The Firebase Android library firebase-core is no longer needed. This SDK included the Firebase SDK for Google Analytics.

    Remove firebase-core in your build.gradle

    0 讨论(0)
  • 2021-01-31 14:30

    Firebase Performance Monitoring uses Firebase Remote Config internally. You can't change the output, but you can send feedback to the team using the link that I gave in the comment above.

    0 讨论(0)
提交回复
热议问题