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+

目录
相关文章
|
DataX 数据格式 Java
DataX插件编写指南
DataX 是阿里巴巴集团内被广泛使用的离线数据同步工具/平台,实现包括 MySQL、Oracle、HDFS、Hive、OceanBase、HBase、OTS、ODPS 等各种异构数据源之间高效的数据同步功能。DataX采用了框架 + 插件 的模式,目前已开源,代码托管在github。
14167 1
|
缓存 算法 搜索推荐
从O(n²)到O(n log n):深度剖析快速排序的内存优化与cache-friendly实现 🌟 Hello,我是摘星!
作为一名深耕算法优化领域多年的技术工程师,我见证了无数次关于排序算法性能讨论的激烈辩论,而快速排序(QuickSort)始终以其卓越的实践表现占据着核心地位。今天我想和大家深入探讨的,不仅仅是快速排序的基础实现,更是如何通过精妙的内存优化策略,将其从理论上的O(n²)最坏时间复杂度,提升到实际应用中稳定的O(n log n)性能表现,并实现真正的cache-friendly设计。在我的实践经验中,许多开发者对快速排序的理解还停留在基础的递归实现层面,而忽略了现代计算机体系结构下内存层次结构对算法性能的深刻影响。本文将系统地分析快速排序在内存访问模式、缓存局部性、尾递归优化等方面的核心技术要点,
513 0
从O(n²)到O(n log n):深度剖析快速排序的内存优化与cache-friendly实现 🌟 Hello,我是摘星!
|
机器学习/深度学习 人工智能 资源调度
大语言模型的核心算法——简要解析
大语言模型的核心算法基于Transformer架构,以自注意力机制为核心,通过Q、K、V矩阵动态捕捉序列内部关系。多头注意力增强模型表达能力,位置编码(如RoPE)解决顺序信息问题。Flash Attention优化计算效率,GQA平衡性能与资源消耗。训练上,DPO替代RLHF提升效率,MoE架构实现参数扩展,Constitutional AI实现自监督对齐。整体技术推动模型在长序列、低资源下的性能突破。
1599 8
|
人工智能 并行计算 机器人
未来人工智能如何重构”时间“?
时间是数学还是幻觉?从熵增到几何,从人类意识到AI智能,本文探讨时间的本质。线性、循环与拓扑模型揭示其多维可能;热力学箭头与认知局限引发哲学思辨;而AI的并行预测与信息压缩,或将重构时间本身。未来智能或不再线性行走,而是编织多维时间之网,重塑我们对存在的理解。(238字)
701 0
|
缓存 运维 监控
Redis 7.0 高性能缓存架构设计与优化
🌟蒋星熠Jaxonic,技术宇宙中的星际旅人。深耕Redis 7.0高性能缓存架构,探索函数化编程、多层缓存、集群优化与分片消息系统,用代码在二进制星河中谱写极客诗篇。
2043 3
|
Oracle 关系型数据库 数据库
Docker安装Oracle_11g数据库并配置
Docker安装Oracle_11g数据库并配置
1279 0
|
机器学习/深度学习 存储 缓存
ATB概念之:算子tiling
算子 tiling 是一种优化技术,用于提高大规模张量运算的计算效率。它通过将大任务分解为小块,优化内存使用、支持并行计算,并防止内存溢出。在ATB中,tiling data指kernel的分片参数,用于指导计算。ATB提供了三种 tiling data 搬移策略:整体搬移、多stream搬移及随kernel下发搬移,旨在优化内存拷贝任务,提高计算效率。
|
PyTorch API 算法框架/工具
AscendC从入门到精通系列(四)使用Pybind调用AscendC算子
本文介绍了如何通过Pybind11在PyTorch框架中调用自定义的Ascend C算子。首先,通过编写算子的C++实现和pybind11封装,将算子功能暴露给Python。接着,构建Python调用脚本,利用torch接口生成数据并调用封装好的算子模块。最后,通过CMake配置文件编译整个项目,实现从算子开发到测试的完整流程。
|
监控 物联网
物联网卡流量为什么不能结转
物联网卡(IoT卡)的流量通常不能结转至下个月的原因,涉及多个技术和商业层面的考虑。以下是具体的分析和解释,以及如何操作以避免流量浪费:
|
开发框架 前端开发 定位技术
Flutter框架中的插件市场及开源资源的利用方法。内容涵盖插件市场的扩展功能、时间节省与质量保证
本文深入探讨了Flutter框架中的插件市场及开源资源的利用方法。内容涵盖插件市场的扩展功能、时间节省与质量保证,常见插件市场的介绍,选择合适插件的策略,以及开源资源的利用价值与注意事项。通过案例分析和对社区影响的讨论,展示了这些资源如何促进开发效率和技术进步,并展望了未来的发展趋势。
452 11

热门文章

最新文章