RN Exception: OkHttp--IllegalStateException: closed

简介: 异常java.lang.IllegalStateException: closedat okio.RealBufferedSink.write(RealBufferedSink.

异常

java.lang.IllegalStateException: closed
at okio.RealBufferedSink.write(RealBufferedSink.java:39)
at okio.ForwardingSink.write(ForwardingSink.java:35)
at com.facebook.react.modules.network.ProgressRequestBody$1.write(ProgressRequestBody.java:58)
at okio.RealBufferedSink.flush(RealBufferedSink.java:216)
at com.facebook.react.modules.network.ProgressRequestBody.writeTo(ProgressRequestBody.java:48)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:47)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.facebook.react.modules.network.NetworkingModule$1.intercept(NetworkingModule.java:186)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.access$100(RealCall.java:33)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:120)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
img_4581beee33430699b7eaab124b275454.png
异常.png

问题原因:

OkHttp内部bug

解决方法:

1). 全局异常
2). 修改OkHttp版本为3.5.0+

目录
相关文章
|
Web App开发 前端开发
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
786 0
|
网络安全
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://xxxx.svc.cluster.local:8080/xxxx": Connection reset; nested exception is java.net.SocketException: Connection reset 什么原因导致得
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "xxxx.svc.cluster.local:8080/xxxx ": Connection reset; nested exception is java.net.SocketException: Connection reset 什么原因导致得
2160 0
|
5月前
|
Java Spring
【已解决】Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception .lang.NullPointerEx
【已解决】Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception .lang.NullPointerEx
80 0
|
Java 容器
RestTemplate报错I/O error on POST request for "http://crmjob.xxx.xxx.com/removeJob": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out问题处理
讲述RestTemplate报错I/O error on POST request for "http://crmjob.xxx.xxx.com/removeJob": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out处理方案
|
6月前
|
Java Maven Spring
SpringBoot运行出现 Lookup method resolution failed; nested exception is java.lang.IllegalStateException
SpringBoot运行出现 Lookup method resolution failed; nested exception is java.lang.IllegalStateException
1641 0
|
前端开发 Cloud Native Java
已解决‘Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPoint
已解决‘Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPoint
161 0
Failed to start bean ‘documentationPluginsBootstrapper nested exception is java.lang.NullPointerE
Failed to start bean ‘documentationPluginsBootstrapper nested exception is java.lang.NullPointerE
62 0
|
Web App开发 JavaScript
Chrome浏览器控制台Unchecked runtime.lastError: The message port closed before a response was received.解决
大家好,今天和大家分享一报错的解决方法 在使用vue开发时使用Chrome运行的时候出现了一个报错,当时什么都没有写就报错了,就找了一下这个问题,后来发现是因为迅雷拓展的问题,下面就一起来看看如何解决这个问题。
|
Java 关系型数据库 MySQL
10. 成功解决:io.netty.channel.ChannelPipelineException: ***Handler is not a @Sharable handler, so can't be added or removed multiple times.
使用 SpringBoot 集成 Netty 时,报如下错误:io.netty.channel.ChannelPipelineException: ***Handler is not a @Sharable handler, so can't be added or removed multiple times.
598 0
|
存储
IDEA中Push到Gitee报:Invocation failed Server returned invalid Response. java.lang.RuntimeException: Inv
IDEA中Push到Gitee报:Invocation failed Server returned invalid Response. java.lang.RuntimeException: Inv
490 1
IDEA中Push到Gitee报:Invocation failed Server returned invalid Response. java.lang.RuntimeException: Inv