Monday, July 23, 2018

EmojiCompat fetchFont result is not OK

Leave a Comment

My app uses EmojiCompat with font downloading (not bundled) and a big amount of my users are reporting the following error:

Non-fatal Exception: java.lang.RuntimeException: fetchFonts result is not OK. (2)    at android.support.text.emoji.FontRequestEmojiCompatConfig$FontRequestMetadataLoader.createMetadata(FontRequestEmojiCompatConfig.java:307)    at android.support.text.emoji.FontRequestEmojiCompatConfig$FontRequestMetadataLoader.access$100(FontRequestEmojiCompatConfig.java:164)    at android.support.text.emoji.FontRequestEmojiCompatConfig$FontRequestMetadataLoader$1.run(FontRequestEmojiCompatConfig.java:218)    at android.os.Handler.handleCallback(Handler.java:739)    at android.os.Handler.dispatchMessage(Handler.java:95)    at android.os.Looper.loop(Looper.java:158)    at android.os.HandlerThread.run(HandlerThread.java:61) 

I could not find any reference to this error message and I have no idea what is causing it. My guess is that it is an internal problem on the Google Play Services font downloading.

Edit on 2017-11-13: Still happening on support library 27.0.0.

Edit on 2017-11-15: My configuration.

On my Application class, on the onCreate():

val fontRequest = FontRequest(         "com.google.android.gms.fonts",         "com.google.android.gms",         "Noto Color Emoji Compat",         R.array.com_google_android_gms_fonts_certs) val config = FontRequestEmojiCompatConfig(this, fontRequest) config.setReplaceAll(true) EmojiCompat.init(config) 

Parsing text with Emoji:

EmojiCompat.get().registerInitCallback(object : EmojiCompat.InitCallback() {     override fun onInitialized() {         text = EmojiCompat.get().process(charSequence)     }      override fun onFailed(throwable: Throwable?) {         throwable?.let { Crashlytics.logException(throwable) }     } }) 

The above exception is logged on the Crashlytics.logException()

1 Answers

Answers 1

Issue is more related to Google Play Services and network connection. Added comments to the bug created at https://issuetracker.google.com/issues/64430424#comment8

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment