Is there any way right now to use Ktor 1.4 with Ko...
# ktor
j
Is there any way right now to use Ktor 1.4 with Kotlin/Native? https://youtrack.jetbrains.com/issue/KTOR-915 seems to indicate you can work around by forcing use of
1.3.8-native-mt-1.4.0-rc
of kotlinx coroutines but that's not working for me here at least.
r
I was able to get a bare-bones call working if I use
1.3.9-native-mt
and don't use
Logger
.
j
thanks @russhwolf , that worked for me here as well.....just curious....how did you determine that was related?
r
I was trying to update https://github.com/russhwolf/multiplatform-hello last night. Started trying to pare different things down when I saw it wasn't working
Didn't merge yet, but if you want to play around, the
1.4.0
branch fails the api client test and crashes when running the app, but the
1.4.0-workarounds
branch works
This weekend I want to throw up a minimal sample of the logger issue and log a ticket since that part isn't captured by the existing tickets
👍 1
🙏 1
j
It's strange.....with logging removed some of my queries aren't returning any results....I'm using http://api.citybik.es/v2/ and it works for some cities and not others (but works for all if logging is enabled!)
but of course without logging it's hard to know what's going on 🙂
😬 1
just to confuse matters....this is only an issue on Android....works fine (without logging) on iOS and macOS
(am now btw using CIO for all platforms, other than JS)
r
I haven't touched CIO yet. Since it's apparently Http-only right now, your issue could be around Android trying to enforce https.
j
I had to switch to http endpoint for that reason
seemingly native-mt stuff only works with CIO
replace 10.0.2.2 with the domain you're trying to hit
j
it is working (on Android) for some of the http requests though (and all of them as mentioned if I enable logging)
fwiw changes now pushed to https://github.com/joreilly/BikeShare
r
oh yeah in that case 🤷
j
@russhwolf hmm, so what I had above was with Android also using CIO.....if I go back to Android using default (based on having
io.ktor:ktor-client-android
dependency) then I do need that security config. Do you know if that's a new requirement.....had thought I'd been connecting to http endpoints previously without needing that?
r
I think it’s a couple years back
I haven’t looked at those docs in a while
j
ah, just looked at https://github.com/joreilly/PeopleInSpace again (which uses http endpoint) and see that I'm using
android:usesCleartextTraffic="true"
for that
r
Oh maybe that’s better and I just keep copy/pasting the same old config without knowing about it
j
not sure tbh....hadn't even remembered adding that in there 🙂
those last set of updates have been merged to BikeShare repo now