A connection to https://api.segment.io/ was leaked.
I just updated a few libraries in our Android app, particularly Okhttp3 (v3.8.1), and now I'm seeing this warning: "OkHttpClient: A connection to https://api.segment.io/ was leaked. Did you forget to close a response body?". So far I'm just seeing the warning on our Pixel XL running Android O. I know not many people are running Android O, but a few are running the preview so I'm trying to get our app compatible with a number of the changes in O. Is there any known fix to this warning? I've updated to the latest Segment version but that didn't make any difference.
It looks like a warning from Okhttp. All we do is create the global Analytics object and pass events and traits, etc to it and it does the rest. We don't provide any http client to segment, and I don't see anywhere that we would make calls to api.segment.io , so I don't know how this warning is happening. I figured the Segment android lib was using Okhttp, but if it's not, then I have no idea.
Hi, any update on this? We are also seeing this warning from the library. There's a resource leak somewhere in the Segment library.
07-31 17:12:03.920 17529-17561/XXX W/OkHttpClient: A connection to https://api.segment.io/ was leaked. Did you forget to close a response body?Reply
for the last few years the Android OS source code has used the OkHttp library so if you're just opening a connection by the default Android implementation its possible you're triggering this @SegmentDevs
I'm experiencing the same thing in a new project I've arrived at that I've upgraded to the latest Segment library.Reply