Closed Vaibhav-214 closed 1 month ago
You need to use coil-network-ktor2
if you're using Ktor 2. coil-network-ktor3
will only work with Ktor 3.
Okay, I think this should be mentioned in the documentation, I couldn't find it in the migrating to coil 3.x docs.
Describe the bug The dependency - io.coil-kt.coil3:coil-network-ktor3 version: 3.0.0-alpha09 causes Ktor HttpClient to crash and even the description of the crash doesn't pin points to the coil library, so once someone adds multiple libraries at once its hard to figure out what was causing the issue.
To Reproduce 1.keep this library[coil-network-ktor3] in the dependencies 2.Make a network request using Ktor http client in android or ios (I am using kotlin multiplatform)
Logs/Screenshots Error on android: java.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/plugins/HttpTimeout;
Error on ios: Uncaught Kotlin exception: kotlin.native.internal.IrLinkageError: Can not get instance of singleton 'Plugin': No class found for symbol 'io.ktor.client.plugins/HttpTimeout.Plugin|null[0]'
Version Ktor version - 2.1.12 coil-network-ktor3 version - 3.0.0-alpha09