Flutter launchUrl - network security config settings not applied

218 views Asked by At

My network_security_config:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="system" />
            <certificates src="user" />
        </trust-anchors>
    </base-config>
</network-security-config>

And it's set to in android manifest:

<application
        android:label="my app"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher"
        android:allowBackup="false"

       android:networkSecurityConfig="@xml/network_security_config"

CA has been installed as user certificate and it's confirmed working - Chrome is able to open url without ssl errors. But I'm not able to open page in my app, with launchUrl:

await launchUrlString(url, mode:  LaunchMode.inAppWebView, webViewConfiguration: const WebViewConfiguration(enableJavaScript: true));

It throws exception:

unable to get local issuer certificate

Any ideas why CA from user store is not applied?

0

There are 0 answers