Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled IllegalStateException in DatadogInterceptor #1049

Closed
neugartf opened this issue Sep 20, 2022 · 2 comments · Fixed by #1080
Closed

Unhandled IllegalStateException in DatadogInterceptor #1049

neugartf opened this issue Sep 20, 2022 · 2 comments · Fixed by #1080
Labels
bug Something isn't working

Comments

@neugartf
Copy link

Describe what happened
Hey peeps!

We are seeing quite a number of crashes that are indirectly triggered by the interceptor.
See attached stack trace:

Fatal Exception: java.lang.IllegalStateException: closed
       at okio.RealBufferedSource.request(RealBufferedSource.kt:203)
       at okio.PeekSource.read(PeekSource.kt:50)
       at okio.RealBufferedSource.request(RealBufferedSource.kt:206)
       at okhttp3.Response.peekBody(Response.kt:197)
       at com.datadog.android.DatadogInterceptor.getBodyLength(DatadogInterceptor.kt:255)
       at com.datadog.android.DatadogInterceptor.handleResponse(DatadogInterceptor.kt:230)
       at com.datadog.android.DatadogInterceptor.onRequestIntercepted(DatadogInterceptor.kt:191)
       at com.datadog.android.tracing.TracingInterceptor.handleResponse(TracingInterceptor.kt:341)
       at com.datadog.android.tracing.TracingInterceptor.interceptAndTrace(TracingInterceptor.kt:215)
       at com.datadog.android.tracing.TracingInterceptor.intercept(TracingInterceptor.kt:148)
       at com.datadog.android.DatadogInterceptor.intercept(DatadogInterceptor.kt:174)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
       ...

Steps to reproduce the issue:
We aren't able to reproduce this.

Describe what you expected:
No crash 🤷.

Additional context

  • okhttp3 = '4.10.0'
  • datadog = '1.13.0'
@neugartf neugartf added the bug Something isn't working label Sep 20, 2022
@xgouchet
Copy link
Member

Hi @neugartf , and thanks for reporting this. We'll try and fix this asap. If you come across more details on the context where this happens, please let us know

@neugartf
Copy link
Author

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants