flutter handshake failed; returned -1, SSL error code 1, net_error -202


1.用这个插件显示网页

webview_flutter: ^1.0.7

报错

handshake failed; returned -1, SSL error code 1, net_error -202

2.解决办法

用这个插件

flutter_inappwebview: ^4.0.0+4

具体代码

InAppWebView(
  initialUrl: _url,
  onReceivedServerTrustAuthRequest: (controller, challenge) async {
      //解决 handshake failed问题
      return ServerTrustAuthResponse(
          action: ServerTrustAuthResponseAction.PROCEED);
  },
    onLoadStop: (InAppWebViewController controller, String url) {
        loadingDismiss();
        print("网页 onLoadStop--》");
    },
)

参考 https://stackoverflow.com/questions/62038787/fluttere-webview-handshake-failed


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM