Android Ktor Client making infinite calls

43 Views Asked by At

I'm making a kotlin multiplatform app, and recently when I opened my network inspector I noticed that my app is making a request to www.google.com every second without stop, each request is 20kb so if the user is using 5g it would be a problem.

First I thought the cause was kamelImage because of image loading errors and retries, but after removing it (for test purposes) or even changing the defaultKamel it still happens.

Below is a print of my network inspector and call stack, I noticed that the user agent is Ktor.

How do I find the origin of this request loop? Ps: this calls does not appear in my logcat which is strange because my ktorClient has a logger and the other calls that I make in the app are there.

network inspector enter image description here

call stack

Edit 1: I removed ktor implementation from gradle and it stopped. This is the implementation I removed:

io.ktor:ktor-client-android

I tried to change to this, but same thing happens (even if I dont create any HTTPClient for use):

io.ktor:ktor-client-okhttp
0

There are 0 best solutions below