UnsupportedOperationException
emouawad opened this issue · comments
val expiringCache = ExpirableCache(cache)
expiringCache.getWithSource(DeviceDetailsFetcher(), timeLimit = CACHE_PERIOD)
java.lang.UnsupportedOperationException: This function has a reified type parameter and thus can only be inlined at compilation time, not called directly.
at kotlin.jvm.internal.Intrinsics.throwUndefinedForReified(Intrinsics.java:207)
at kotlin.jvm.internal.Intrinsics.throwUndefinedForReified(Intrinsics.java:201)
at kotlin.jvm.internal.Intrinsics.reifiedOperationMarker(Intrinsics.java:211)
at com.github.kittinunf.result.Result$Companion.of(Result.kt:244)
at com.github.kittinunf.fuse.core.CacheImpl._get(Cache.kt:74)
at com.github.kittinunf.fuse.core.CacheImpl.getWithSource(Cache.kt:63)
at com.github.kittinunf.fuse.core.scenario.ExpirableCache.getWithSource-8Mi8wO0(ExpirableCache.kt:67)
at com.github.kittinunf.fuse.core.scenario.ExpirableCache.getWithSource-8Mi8wO0$default(ExpirableCache.kt:51)
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
implementation 'com.github.kittinunf.fuse:fuse-android:1.2.2'
This code is being used in a background service (Work Manager) - and only happens on First start (Fresh Installation) - maybe a concurrency? is it maybe because the cache hasn't been created yet?
Based on the throwUndefinedForReified
it looks like that it is something to do with compiler ... do you think it is possible that this is a Kotlin version error. I can try to update this project Kotlin to the latest one.
I have updated the library to new version (1.6.20 with all supported libraries). Will release this soon.