Friday, 16 November 2018

Android Pie: WebView showing error for plain HTTP on some sites, even with usesClearTextTraffic="true"

We have a WebView in our android app that end users can browse to whatever site they want. Android Pie disabled plain HTTP by default, so we added usesClearTextTraffic="true" to our manifest.

This works for some sites, but not for others, like google.com! On the sites that don't work, we still get net::ERR_CLEARTEXT_NOT_PERMITTED as if we hadn't set the manifest setting.

I thought it might be related to HSTS, but in that case I would just expect the WebView to redirect to HTTPS immediately.

So the question is, why is Android WebView still unable to browse some sites by plain HTTP, even when usesClearTextTraffic is turned on in manifest?

(PS We do not have a network security config)

We are testing on Google Pixel 1XL



from Android Pie: WebView showing error for plain HTTP on some sites, even with usesClearTextTraffic="true"

No comments:

Post a Comment