I wrote in <#C01D6HTPATV|> since it had to do with...
# multiplatform
n
I wrote in #C01D6HTPATV since it had to do with jvm desktop specifically; but this channel seem to have very similar discussions: Full post https://kotlinlang.slack.com/archives/C01D6HTPATV/p1741858500964859 In short: I am unable to produce release versions (crashes) for desktop (jvm). It feels related to ProGuard and obfuscation. When I start the release version of the app I instantly get an exception, see below. I am using the supabase.kt lib which in turn uses Ktor - which seems to be the culprit. Also "provides" sounds like Dependency Injection; might be internal in the Supabase lib. Anyone that have gotten a Supabase project to a release state that can help? Also, after I've been trying to fix it I've gotten into a new issue that
packageReleaseDistributionForCurrentOS
doesn't even complete, but instead
proguardReleaseJars
fails with:
io.ktor.network.sockets.SocketBase$attachFor$1: can't find enclosing method 'io.ktor.utils.io.ChannelJob attachFor(java.lang.String,<http://io.ktor.utils.io|io.ktor.utils.io>.ByteChannel,kotlinx.atomicfu.AtomicRef,kotlin.jvm.functions.Function0)' in program class io.ktor.network.sockets.SocketBase
y
Haven't use Supabase.kt or shipped a JVM desktop app before but this error to me seems like you have multiple Ktor version in the project and they are conflicting. Can you verify you only have a single Ktor version included in the build?
🫡 1
n
I'm not terribly good at this stuff, so I apologise if I'm looking in the wrong areas. I ran the
dependencies
gradle command and looked through every line mentioning ktor (which was quite a few) and they all mentioned 3.1.1 Legend in command
Copy code
(c) - A dependency constraint, not a dependency. The dependency affected by the constraint occurs elsewhere in the tree.
(*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation.
Examples in the output:
Copy code
+--- io.ktor:ktor-client-websockets:3.1.1
+--- io.ktor:ktor-websockets:{strictly 3.1.1} -> 3.1.1 (c)
+--- io.ktor:ktor-server-cio:3.1.1
|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1 (*)
|    +--- io.ktor:ktor-server-core:3.1.1 (*)
So I got a nice mix; but only 3.1.1 I am adding
ktor 3.1.1
per instructions; and I am using
Supabase 3.1.2
which targets 3.1.1 (requires 3.1.1 or higher)