dambakk
02/13/2025, 9:57 AMFATAL EXCEPTION: DefaultDispatcher-worker-2
Process: no.norsktipping.android.maestro.debug, PID: 21534
java.lang.NoSuchMethodError: No virtual method milliseconds-UwyO8pc(J)J in class Lkotlin/time/Duration$Companion; or its super classes (declaration of 'kotlin.time.Duration$Companion' appears in /data/app/~~OmkWAYIviJY1rc00zUAm8A==/no.norsktipping.android.maestro.debug-mJDZvG7ZQHYio7dbAEFP4Q==/base.apk!classes40.dex)
at dk.shape.danskespil.foundation.repository.GamesCachingKt.refreshJob(Unknown Source:6)
at dk.shape.danskespil.foundation.repository.GamesCachingKt.access$refreshJob(Unknown Source:0)
I suspect that it might have something to do with some of our dependencies using another version of kotlin, that is binary incompatible with ours. We use kotlin 2.0.21. Anyone knows if I'm on the right track? Is this a known issue? Is there anything I can do? When removing Arrow from the project the crash disappears.Alejandro Serrano.Mena
02/13/2025, 10:00 AMkotlin-stdlib
between both?dambakk
02/13/2025, 10:07 AM| | \--- io.arrow-kt:arrow-optics:2.0.1
| | \--- io.arrow-kt:arrow-optics-android:2.0.1
| | +--- io.arrow-kt:arrow-core:2.0.1
| | | \--- io.arrow-kt:arrow-core-android:2.0.1
| | | +--- io.arrow-kt:arrow-atomic:2.0.1
| | | | \--- io.arrow-kt:arrow-atomic-android:2.0.1
| | | | +--- org.jetbrains.kotlin:kotlin-stdlib -> 2.1.0 (*)
| | | | +--- org.codehaus.mojo:animal-sniffer-annotations:1.24
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.0 (c)
| | | +--- io.arrow-kt:arrow-annotations:2.0.1
| | | | \--- io.arrow-kt:arrow-annotations-android:2.0.1
| | | | +--- org.codehaus.mojo:animal-sniffer-annotations:1.24
| | | | +--- org.jetbrains.kotlin:kotlin-stdlib -> 2.1.0 (*)
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.0 (c)
| | | +--- org.jetbrains.kotlin:kotlin-stdlib -> 2.1.0 (*)
| | | +--- org.codehaus.mojo:animal-sniffer-annotations:1.24
| | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.0 (c)
| | +--- org.jetbrains.kotlin:kotlin-stdlib -> 2.1.0 (*)
| | +--- org.codehaus.mojo:animal-sniffer-annotations:1.24
| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.0 (c)
and the sdk that crashes uses 1.9.0
| | +--- dk.shape.games.norsk-tipping-oddsen:norsk-tipping-oddsen-android-fataar:2.0.0
| | | +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.0 -> 2.0.21 (*)
| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.0 -> 2.1.0 (*)
| | | +--- org.jetbrains.kotlin:kotlin-reflect:1.9.0 -> 2.0.21 (*)
| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.9.0 (*)
| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.5.2 -> 1.9.0
| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0 (*)
| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0 (*)
| | | | +--- org.reactivestreams:reactive-streams:1.0.3
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.1.0 (*)
| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.5.2 -> 1.9.0
| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0 (*)
| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0 (*)
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.1.0 (*)
| | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0 -> 1.9.20 (*)
| | | +--- org.jetbrains:annotations:20.1.0 -> 23.0.0
| | | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0 -> 1.7.3 (*)
...but I'm not sure 🙂 Please guide me if this is not what we are looking for 🙂Alejandro Serrano.Mena
02/13/2025, 10:17 AMmilliseconds-UwyO8pc(J)J
is a public name for their value classes unboxed functions, and these may have changedAlejandro Serrano.Mena
02/13/2025, 10:18 AM1.9.0
to be used instead of 2.1.0
, maybe this would not break anything in Arrow (although it would be better if the SDK was updated to compile against 2.1.0, I understand this might be difficult)dambakk
02/13/2025, 10:59 AMdambakk
02/13/2025, 11:00 AMAlejandro Serrano.Mena
02/13/2025, 11:02 AMAlejandro Serrano.Mena
02/13/2025, 11:02 AMdambakk
02/13/2025, 1:49 PMconfigurations.all {
resolutionStrategy.force("org.jetbrains.kotlin:kotlin-stdlib:1.9.0")
}
But, since it crashes when calling code from the sdk (which uses kotlin 1.9.0), how does forcing Arrow (which is not called anywhere near that sdk) to kotlin 1.9.0 mitigate that crash? How can Arrow break code in another module? Will all dependencies in all modules end up using the same kotlin binary when compiled or something? 🤔Alejandro Serrano.Mena
02/13/2025, 4:39 PMAlejandro Serrano.Mena
02/13/2025, 4:40 PMdambakk
02/14/2025, 6:44 AMdambakk
02/14/2025, 9:37 AMimplementation(libs.arrow.optics) {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
}
(which I guess was what you tried to make me do yesterday which I didn't catch 🥲)Alejandro Serrano.Mena
02/14/2025, 9:44 AM