Closed
Description
Hi,
We're using com.auth0:auth0:1.0.0
and com.auth0:auth0-spring-security-api:1.0.0-rc2
inside a spring-boot 1.5.1.RELEASE
application. When calling the Auth0 API, we occasionally see a log warning that apparently emanates from okhttp3
:
2017-02-27T08:05:05.453 WARN okhttp3.OkHttpClient - A connection to https://[our-issuer-id].auth0.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
Looking it up it seems the possible cause is that the body of the request needs to be explicitly closed when the response code is not 200. See square/okhttp#2311.
Thanks!
Activity
lbalmaceda commentedon Feb 27, 2017
Hi @shiloa,
We fixed that in #38. You'll see it in the next release.
Cheers,
shiloa commentedon Feb 27, 2017
thanks @lbalmaceda.
AlphaJuliettOmega commentedon Apr 19, 2021
@lbalmaceda how do I know if there was a regression on this issue or if it's a new issue?
I don't know how to reproduce or get more info but I'm seeing this in my logging:
And I can't find much about this anywhere else (I'm using React-native-intercom 18, upgrade to 19 didn't change it)
lbalmaceda commentedon Apr 19, 2021
I'm not sure. Since then, we wrapped the access to the response body both when parsing a 2xx (here) or an error response (here). With what version of the
Auth0-Java
SDK are you seeing this?benwaffle commentedon May 10, 2021
I am also seeing this in 1.29.0
lbalmaceda commentedon May 11, 2021
@benwaffle can you share steps to reproduce this? any other detail that can help us understand your usage?