OkHttpClient leak

1,647 views
Skip to first unread message

Javier Ramis

unread,
Jun 13, 2018, 3:08:53 PM6/13/18
to Google Mobile Ads SDK Developers
I'm testing admob mediation with my emulator and sometimes i receive a log like this in Android Studio:

"W/OkHttpClient: A connection to https://googleads.g.doubleclick.net/ was leaked. Did you forget to close a response body?"

Any idea? This can lead to a mem leak?


mobileadssdk-a...@google.com

unread,
Jun 13, 2018, 3:46:29 PM6/13/18
to Javier Ramis, Google Mobile Ads SDK Developers
Hi Javier,

Thanks for reaching out to us. Are you able to reproduce the issue with our sample apps on the latest version of the SDK? And, can you please provide the following information for us to look into the issue:
  • Charles log with SSL proxy enabled
  • Complete Device logs
Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/54a2a743-cec5-4973-9ae4-ea72630c61a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitry

unread,
Sep 15, 2018, 3:09:46 AM9/15/18
to Google Mobile Ads SDK Developers
Same messages here. My setup is pretty simple - I have 2 ids and if one of them fails to load, I make a new AdView with another id and try to load that one instead. Whenever I do it, I see the following. Looks like 100% reproducing rate.

09-15 09:56:03.171 18039-18039/com...... I/System.out: ad not loaded at level 0
    Trying to load ad with id ca-app-pub-...../.....
    make ad with id ca-app-pub-...../.....
09-15 09:56:03.184 18039-18039/com...... D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
09-15 09:56:03.191 18039-18039/com...... I/Ads: Starting ad request.
    SDK version: afma-sdk-a-v13280019.12451000.1
09-15 09:56:03.192 18039-18039/com...... I/Ads: Use AdRequest.Builder.addTestDevice(".....") to get test ads on this device.
09-15 09:56:03.194 18039-18039/com...... W/Ads: Not retrying to fetch app settings
09-15 09:56:03.246 18039-18158/com...... W/OkHttpClient: A connection to https://googleads.g.doubleclick.net/ was leaked. Did you forget to close a response body?

mobileadssdk-a...@google.com

unread,
Sep 17, 2018, 3:55:09 AM9/17/18
to Dmitry, Google Mobile Ads SDK Developers
 Hi Dmitry,

Thank you for the details provided.

For testing purposes, I created this modifed BannerExample app to try to reproduce the behavior you've described but I don't see the warning logs you've captured and I was able to load test ads successfully. Is the modified sample app almost similar to what you are doing? Could you provide to us a copy of the test project you are working on so we can test it on our end? You may provide to us the information privately using Reply privately to author option.

Regards,
Ivan Bautista
Mobile Ads SDK Team





--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Dmitry

unread,
Sep 17, 2018, 4:45:15 AM9/17/18
to Google Mobile Ads SDK Developers
Hi Ivan

I sent you a slightly modified example. Please, confirm receiving.

Best Regards,
Dmitry

mobileadssdk-a...@google.com

unread,
Sep 18, 2018, 12:25:43 AM9/18/18
to Dmitry, Google Mobile Ads SDK Developers
Hi Dmitry,

Thank you for testing it out with the modified sample app and for getting back to us privately with more details.

I tested again with the modified sample app and applied the changes you've specified privately and I was able to reproduce the "OkHttpClient" warning log. That said, I was also able to reproduce the warning log one time in one of the sample apps without changing anything. Thus, given that the replicability is intermittent, I suppose this may not be specific for the behavior or scenario you have described.

Given this information, i will double check this with the rest of the team and I'll get back to you for any feedback.

Regards,
Ivan Bautista
Mobile Ads SDK Team

To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Dmitry

unread,
Sep 18, 2018, 12:52:17 AM9/18/18
to Google Mobile Ads SDK Developers
Hi Javier

Thank you for the info. I just noticed that it seemed to happen more often when ad was not loaded and often showed several such warnings which made it more noticeable. But may be it depends on ads \ ad sources.

Hope you will fix it.

Best Regards,
Dmitry


On Wednesday, June 13, 2018 at 10:08:53 PM UTC+3, Javier Ramis wrote:
Message has been deleted

Javier Ramis

unread,
Oct 1, 2018, 7:24:03 PM10/1/18
to Google Mobile Ads SDK Developers
Hi Dmitry,

Javier it's me, the author of this topic :P but it's Ivan who is helping us. Thanks both for investigating this problem, i forgot to reply. Hope you can find a fix soon.

Regards!

mobileadssdk-a...@google.com

unread,
Oct 1, 2018, 11:33:12 PM10/1/18
to Javier Ramis, Google Mobile Ads SDK Developers
Hi everyone,

The team is still looking into this. Rest assured that I will get back in this thread for any feedback from the team.

Regards,
Ivan Bautista
Mobile Ads SDK Team



--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Dmitry

unread,
Nov 25, 2018, 8:00:35 AM11/25/18
to Google Mobile Ads SDK Developers
Hi Ivan

I can also add that I see similar logs when I load Interstitial ads with non-zero floor.

A connection to https://googleads.g.doubleclick.net/ was leaked. Did you forget to close a response body?

Best Regards,
Dmitry

mobileadssdk-a...@google.com

unread,
Nov 26, 2018, 3:53:39 PM11/26/18
to Dmitry, Google Mobile Ads SDK Developers
Hello Dmitry, 

I'm Ivan's colleague assisting on his behalf. Our team was able to take a look at the issue and confirm that the issue is not specific to our SDK. You may check this related post which might be helpful for you. 

Let me know if you have any other questions. 

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Dmitry

unread,
Nov 27, 2018, 1:58:33 AM11/27/18
to Google Mobile Ads SDK Developers
Hello Bharani

Ok, thank you for the information!

Best Regards,
Dmitry
Reply all
Reply to author
Forward
0 new messages