Kamel: KamelConfig.Default does not load automatically with v1 beta
Steps to reproduce:
Use KMP wizard by following this link and create multiplatform project sharing UI for iOS and Android
Use version of kamel 1.0.0-beta.1 (ktor client version 2.3.8)
KamelImage(
resource = asyncPainterResource(data = "https://picsum.photos/200"),
contentDescription = null,
modifier = Modifier
.size(230.dp)
.background(color = Color.Green),
onFailure = {
Text(text = "failed")
},
onLoading = {
Text(text = "loading")
}
)
Result: KamelImage’s onFailed will be rendered
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 17 (10 by maintainers)
Commits related to this issue
- fixes #97 on iOS — committed to Kamel-Media/Kamel by luca992 4 months ago
- auto load KamelConfig.Default, fixes #97 Using ServiceLoader (jvm) and @EagerInitialization (non-jvm) — committed to Kamel-Media/Kamel by luca992 4 months ago
- auto load KamelConfig.Default, fixes #97 Using ServiceLoader (jvm) and @EagerInitialization (non-jvm) — committed to Kamel-Media/Kamel by luca992 4 months ago
I was able to duplicate it. But specifying the default config does work as it should.
@DjuroRad should be fixed in 1.0.0-beta.3
configOverride is supposed to be internal. Just fyi
Hmm strange. I couldn’t cause the same issue on android. Also,
configOverrideshould not be exposed in beta 2 anymore. But either way you should be able to specify the default config to be used with the method described in the readme.1.0.0-beta.2 should work on iOS out of the box without setting your own config
configOverrideis supposed to be set toKamelConfig.Defaultautomatically here.It sounds like it’s not actually being set automatically, I’ll look into it. And the 1.0 build is definitely still a beta. I would hope no one is setting that to be used in a wizard rather than the stable build.
Yes, I am using
kamel-image-defaultname frommedia.kamelgroup. I tried it with almost any name available.I tried with other names from your group also, added
kamel-decoder-image-bitmapjust in case. Also tried addingimplementation( "org.jetbrains.kotlin:kotlin-reflect:1.9.21")explicitly but that didn’t help eitherSorry about forgeting the stacktrace, here it is