dio icon indicating copy to clipboard operation
dio copied to clipboard

ios13.3.1请求某些证书的https证书时会出现整个app卡死现象

Open ghostgzt opened this issue 6 years ago • 52 comments

New Issue Checklist

  • [x] I have searched for a similar issue in the project and found none

Issue Info

Info Value
Platform Name ios
Platform Version 13.3.1
Dio Version 3.0.9
Android Studio / Xcode Version Xcode 10.2.1
Repro rate sometimes
Repro with our demo prj e.g. does it happen with our demo project?
Demo project link e.g. link to a demo project that highlights the issue

Issue Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.

ios13.3.1请求某些ssl证书(如过期证书)的https时会出现整个app卡死现象,貌似用Flutter自带的http也会出现, 能不能弄个原生的选项,看dart的不怎么稳定啊。。。

ghostgzt avatar Mar 15 '20 13:03 ghostgzt

same, any resolve?

youyi-sizuru avatar Apr 01 '20 14:04 youyi-sizuru

用的Let's Encript证书,到期续签后IOS上卡死,折腾两天找不到问题,阿里云新申请了一个证书解决。

Lloyd666 avatar Apr 05 '20 13:04 Lloyd666

用的Let's Encript证书,到期续签后IOS上卡死,折腾两天找不到问题,阿里云新申请了一个证书解决。

主要服务器不是我的,只能解决客户端了,问题非常严重,却没人解决~

ghostgzt avatar Apr 06 '20 11:04 ghostgzt

同遇到这问题, 一直找不出原因, 排查了好久才定位到 dio 上。 也是用的Let's Encript证书, 不知有没有关系。 模拟器上无卡顿现象, 但在真机上存在, IOS 系统。

bewaterwang avatar Apr 07 '20 17:04 bewaterwang

大概不被ios信任的证书都会出现这种情况,有时卡有时又不卡,烦死了,大坑!

ghostgzt avatar Apr 07 '20 19:04 ghostgzt

@youyi-sizuru @Lloyd666 @lalawila 我不是太会用英文描述这个bug,希望你们有能力的去flutter的git那里提issue,我觉得dio是解决不了这底层bug的了~

ghostgzt avatar Apr 07 '20 19:04 ghostgzt

我的网站是Let's Encript证书, 在 IOS 上不管是 safari 还是微信 qq 内置的浏览器打开都会先卡个十秒钟。 换了个证书就好了。 所以我感觉是 IOS 系统的问题。

bewaterwang avatar Apr 11 '20 19:04 bewaterwang

我的也是,换了证书解决了,flutter网络请求都会卡死

kennenfromchina avatar Apr 21 '20 03:04 kennenfromchina

同样的问题,测试HTTPClient也是一样, 这个问题不解决,app直接废掉了。 断点时卡在 /dart:io/secure_socket.dart 的 _readSocket() _secureHandshake()

相关问题: https://github.com/dart-lang/sdk/issues/41519 https://github.com/flutter/flutter/issues/49392

CyrilHu avatar Apr 23 '20 08:04 CyrilHu

不支持http2 我使用dio_http2_adapter解决了

KClassmate avatar Apr 24 '20 09:04 KClassmate

不支持http2 我使用dio_http2_adapter解决了

HTTP/2 error: Stream error: Stream was terminated by peer (errorCode: 1).

怎样解决?

ghostgzt avatar Apr 24 '20 14:04 ghostgzt

上周跟换了dio_http2_adapter手机测试结果确实不卡,不过还是反馈卡顿,难搞

KClassmate avatar Apr 26 '20 06:04 KClassmate

上周跟换了dio_http2_adapter手机测试结果确实不卡,不过还是反馈卡顿,难搞

我们换了证书解决了,之前用的Let's Encript签发的HTTPS的证书,后来换了阿里云的,就没事儿了

kennenfromchina avatar Apr 26 '20 06:04 kennenfromchina

上周跟换了dio_http2_adapter手机测试结果确实不卡,不过还是反馈卡顿,难搞

我们换了证书解决了,之前用的Let's Encript签发的HTTPS的证书,后来换了阿里云的,就没事儿了

请问大佬,数字证书分为OV、DV、EV三种,你们换的数字证书是哪一种?

KClassmate avatar Apr 26 '20 06:04 KClassmate

遇到了 一样的 问题 有解决方案吗

janiokq avatar Apr 26 '20 07:04 janiokq

更换证书能彻底解决吗 需要跟换什么类型的 证书 更换了 证书 之后 过几天 或者本地证书过期了 这个问题 还会重现吗

janiokq avatar Apr 26 '20 07:04 janiokq

上周跟换了dio_http2_adapter手机测试结果确实不卡,不过还是反馈卡顿,难搞

我们换了证书解决了,之前用的Let's Encript签发的HTTPS的证书,后来换了阿里云的,就没事儿了

请问大佬,数字证书分为OV、DV、EV三种,你们换的数字证书是哪一种?

阿里云证书服务 我们用的:通配符 - DV SSL - 基础版 - GeoTrust

kennenfromchina avatar Apr 26 '20 08:04 kennenfromchina

简单 暴力的 方法可以 在 dio //忽略证书 fix ios 卡顿问题 (_dio.httpClientAdapter as DefaultHttpClientAdapter) .onHttpClientCreate = (client) { client.badCertificateCallback = (X509Certificate cert, String host, int port) { return true; };

// client.findProxy = (uri) { // // Change the local area network ip and port to yourself's // return "PROXY 192.168.0.103:8000"; // };

  };

janiokq avatar Apr 26 '20 08:04 janiokq

简单 暴力的 方法可以 在 dio //忽略证书 fix ios 卡顿问题 (_dio.httpClientAdapter as DefaultHttpClientAdapter) .onHttpClientCreate = (client) { client.badCertificateCallback = (X509Certificate cert, String host, int port) { return true; };

// client.findProxy = (uri) { // // Change the local area network ip and port to yourself's // return "PROXY 192.168.0.103:8000"; // };

  };

完全没用的

ghostgzt avatar Apr 26 '20 10:04 ghostgzt

我们后台服务更换证书解决,这问题真。。。

KClassmate avatar Apr 26 '20 10:04 KClassmate