Search code examples
fluttersslwebviewchromium

Flutter webview_flutter package handshake failed


When trying to load html file using webview_flutter package it takes time until loading while printing this error then it loads the webview

E/chromium(27944): [ERROR:ssl_client_socket_impl.cc(980)] handshake failed; returned -1, SSL error code 1, net_error -101

What could trigger such an error?

Flutter and Webview versions:

Flutter (Channel stable, 3.7.11)

webview_flutter: ^4.0.2

Solution

  • By debugging the webview errors like this: (Only works on Android)

    onWebResourceError: (WebResourceError error) {
                log("RESOURCE ERROR DESCRIPTION ${error.description}");
                log("RESOURCE ERROR CODE ${error.errorCode}");
                log("RESOURCE ERROR Error Type ${error.errorType}");
                log("RESOURCE ERROR Failing URL ${error.url}");
              },
    

    I could find that the source of the errors is some UI resources in the website itself like Popper causes this error