Hi everyone, I’ve been having a lot of issues usin...
# ktor
e
Hi everyone, I’ve been having a lot of issues using Ktor auto reload in a basic sample project and was wondering if anyone is having the same experience? My current issue is that after the project reloads, when making a request I get a JobCancellationException and an empty response back. I’m using ContentNegotiation and Jackson to return json, and I’ve noticed that call.respondText seems to continue working fine - seems like it might be a problem within ContentNegotiation? I’ve reproduced the buggy behaviour on 3.3.0 and 3.2.x, but 3.1.3 works as expected. Unfortunately this makes auto reload unusable. Does anyone have any ideas to resolve this problem / know of any open issues that might be related?
a
Ktor 3.2 and 3.3 have some issues with hot reloading. See the docs on Hot Reloading what the causes and solutions can be. Suspending modules helped for me.
e
I have read the new docs about the regressions, I only have a single module defined through configuration which according to the docs should be okay. I haven’t tried making my modules suspending, I could give that a go.
a
Yeah that is the most important step
e
Thanks for the tips, though unfortunately no luck with suspending modules either :( I also tried providing the (suspending) module directly to
embeddedServer
and that didn’t make any difference either. So just to confirm, hot reload is generally working fine for everyone in 3.3 apart from the documented regressions? I haven’t been able to get it to work at all. In that case I might see if I can isolate a minimal case and raise a ticket.
👍 1
I've isolated my issue to
ktor-serialization-jackson
and raised https://youtrack.jetbrains.com/issue/KTOR-8923 with the details.
👍 1