I have a question on Koin working with Ktor 2.0.x ...
# koin
m
I have a question on Koin working with Ktor 2.0.x When running tests with the new testApplication, I’m getting issues when trying to use inject<>() from Koin. this is the error:
Copy code
2022-06-15 10:43:35.834 [DefaultDispatcher-worker-1] ERROR ktor.test - unable to process request: /api/artworks?artistName=%25Picasso. Error: ErrorDto(uniqueErrorId=129ecc46-176d-407e-abca-f69350113dd0, errorMessage=class io.artbanx.services.IdService cannot be cast to class io.artbanx.services.IdService (io.artbanx.services.IdService is in unnamed module of loader 'app'; io.artbanx.services.IdService is in unnamed module of loader io.ktor.server.engine.OverridingClassLoader$ChildURLClassLoader @24f7d03c), errorCode=INTERNAL_SERVER_ERROR, timestamp=2022-06-15T10:43:35.828312)
java.lang.ClassCastException: class io.artbanx.services.IdService cannot be cast to class io.artbanx.services.IdService (io.artbanx.services.IdService is in unnamed module of loader 'app'; io.artbanx.services.IdService is in unnamed module of loader io.ktor.server.engine.OverridingClassLoader$ChildURLClassLoader @24f7d03c)