Firebase Remote Config : NullPointerException on Map.keySet()

随声附和 提交于 2019-11-29 07:31:58

As stated in Kirril Karmizin's comment, it's a known bug since June 2017 (Github Firebase issues). I also received multiple crash reports

Fatal Exception: java.lang.NullPointerException
   at com.google.android.gms.internal.zzdyx.zzb(Unknown Source)
   at com.google.android.gms.internal.zzdyx.zza(Unknown Source)
   at com.google.android.gms.internal.zzfan.run(Unknown Source)
   at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
   at java.lang.Thread.run(Thread.java:848)

, with:

  • Firebase: 12.0.1
  • buildTools: 27.0.3

A probable step in the right direction for those that would want to keep Remote Config in their apps can be found in Official RemoteConfic docs:

You should set in-app default parameter values in the Remote Config object, so that your app behaves predictably before it fetches values from the Remote Config service.

For me, I could not risk more crash reports in a production app. I removed Remote Config and I've seen no crashes until now.

The bug @Ευάγγελος pointed out was fixed in version 15.0.0. However, that version introduced another bug that was also causing NullPointerException. Fortunately, it was quickly fixed in 15.0.2.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!