saket / unfurl

Generate link previews, inspired by Slack.
Apache License 2.0
267 stars 11 forks source link

Caffeine internally invokes `java.lang.System#getLogger` which crashes on Android #4

Closed msfjarvis closed 2 months ago

msfjarvis commented 2 months ago

Observed this after upgrading to Unfurl v2, works fine on v1.7.0.

FATAL EXCEPTION: main
Process: dev.msfjarvis.claw.android.debug, PID: 8166
java.lang.NoSuchMethodError: No static method getLogger(Ljava/lang/String;)Ljava/lang/System$Logger; in class Ljava/lang/System; or its super classes (declaration of 'java.lang.System' appears in /apex/com.android.art/javalib/core-oj.jar)
    at com.github.benmanes.caffeine.cache.Caffeine.<clinit>(Caffeine.java:142)
    at com.sksamuel.aedile.core.CacheBuilderKt.cacheBuilder(CacheBuilder.kt:20)
    at me.saket.unfurl.internal.NullableLruCache.<init>(NullableLruCache.kt:9)
    at me.saket.unfurl.internal.RealUnfurler.<init>(RealUnfurler.kt:19)
    at me.saket.unfurl.UnfurlerKt.Unfurler(Unfurler.kt:14)
    at me.saket.unfurl.UnfurlerKt.Unfurler$default(Unfurler.kt:8)
saket commented 2 months ago

Serves me right for not testing the update on android. Let me replace the library.

saket commented 2 months ago

Fixed in https://github.com/saket/unfurl/releases/tag/2.1.0. Can you please give it a try?

msfjarvis commented 2 months ago

v2.1.0 works fine, thanks!