Store: [BUG] Crash in Store 4.0 with Kotlin 1.5.0-RC
Describe the bug Application crash after update Kotlin from 1.4.32 to 1.5.0-RC, no other changes in code.
Catch Exception:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.superapplication.android.app.debug, PID: 18674
java.lang.NoSuchMethodError: No static method getHours(I)D in class Lkotlin/time/DurationKt; or its super classes (declaration of 'kotlin.time.DurationKt' appears in /data/app/~~l_eMNOPYSnv8XUlDP7ycgA==/ru.superapplication.android.app.debug-ziiU-phO368T6tA7R1CseQ==/base.apk!classes33.dex)
at com.dropbox.android.external.store4.StoreDefaults.<clinit>(StoreDefaults.kt:15)
at com.dropbox.android.external.store4.RealStoreBuilder.<init>(StoreBuilder.kt:91)
at com.dropbox.android.external.store4.StoreBuilder$Companion.from(StoreBuilder.kt:76)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 30 (13 by maintainers)
Thanks folks. I will do the release tomorrow (famous last words)
Just went live. https://repo1.maven.org/maven2/com/dropbox/mobile/store/store4/4.0.2-KT15/
Yup. It auto closed. Good callout. Snapshot is deployed
Shouldn’t this bug stay OPEN till there is a release for this fix? (SNAPSHOT builds are not a releases)
Hi friends, once we merge https://github.com/dropbox/Store/pull/273 we will have a new snapshot: 4.0.2-KT15-SNAPSHOT This version should be compatible with kotlin 1.5. I expect to have the snapshot out by end of day (EST)
There doesn’t seem to be a way to support both 1.4 and 1.5. I am going to generate a snapshot tomorrow morning… Store4k15:4.0.0-Snapshot (will figure out how to name properly).
We will then carry both versions until we can upgrade to kotlin 1.5 internally. We are currently blocked by a few third party sdks.
Thank you all for the patience, this was a learning experience for me to not leak experimental apis.
Will redo this weekend
@digitalbuddha I have the same issue with Kotlin 1.5.0 like described @bishiboosh. I think it related with Duration-type variable, in Kotlin 1.4 rawValue after compile is Double, but in 1.5 it is Long. Store compiled with 1.4.10 and when try to use Store with Kotlin 1.5 we have crash (type incompatible). My opinion, the 2 way to solve this problem:
I still seem to have the same issue, any idea why ? I have this crash :
Got wrapped up will do today.
@digitalbuddha I think removing Duration completely from the lib would be too much of an API change, I’d go with compiling Store with Kotlin 1.5 (and making it a breaking change like you first thought in #265)
https://search.maven.org/artifact/com.dropbox.mobile.store/store4/4.0.1/jar
@digitalbuddha with the release of 1.5.0 today, do you think you’d be able to release a version so we can migrate safely ?
Hi friends, we won’t be able to release until next week. We are working on fixing the codecov vulnerability prior to triggering any more releases.
Yup makes sense. I will have a fix up this week. I was contemplating dropping duration as dependency all together
On Sun, Apr 18, 2021, 3:49 AM Ihor Kushnirenko @.***> wrote:
Thanks will take a look tomorrow