fluttercommunity / fluttercommunity/flutter_webview_plugin

SSL error

Open
#298 21 comments 3 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Java
Stars
1.5k
Forks
938
PR merge metrics
No merged PRs in 30d

Description

Hay,

i'm having a xamp server on a machine with a self signed certificate.
I need to login to the website but because of the ssl the website is white.

`
@override
void initState() {
super.initState();
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.onHttpError.skip(1000);
flutterWebviewPlugin.launch("https url to website", hidden: true, allowFileURLs: true, appCacheEnabled: true,withJavascript: true, withLocalStorage: true, withZoom: true);

flutterWebviewPlugin.onHttpError.skip(1000);

flutterWebviewPlugin.onStateChanged((state) async){
flutterWebviewPlugin.evalJavascript("document.getElementById(\"name\").innerText = \"username\"");
flutterWebviewPlugin.evalJavascript("document.getElementById(\"password\").innerText = \"pw\"");
flutterWebviewPlugin.evalJavascript("document.getElementById(\"loginbutton\").invokeMember(\"click\")");
var test = flutterWebviewPlugin.evalJavascript("document.getElementById(\"errorbox\").innerText");
};

flutterWebviewPlugin.dispose();
flutterWebviewPlugin.close();
}
`

Is there a way to catch up the ssl error "Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found." and ignore it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.