CU(E)BES

Loading...

CU(E)BES

Welcome To

WebView showing ERR_CLEARTEXT_NOT_PERMITTED although site is HTTPS

Forums Security – Questions & Answers Network Security Engineering WebView showing ERR_CLEARTEXT_NOT_PERMITTED although site is HTTPS

Viewing 2 reply threads
  • Author
    Posts

    • Standard Plus

      Replies viewable by members only


    • Standard Plus

      When you call “https://darkorbit.com/” your server figures that it’s missing “www” so it redirects the call to “http://www.darkorbit.com/” and then to “https://www.darkorbit.com/”, your WebView call is blocked at the first redirection as it’s a “http” call. You can call “https://www.darkorbit.com/” instead and it will solve the issue.


    • Standard Plus

      Add the below line in your application tag:

      android:usesCleartextTraffic="true"

      As shown below:

      <application
          ....
          android:usesCleartextTraffic="true"
          ....>

      UPDATE: If you have network security config such as: android:networkSecurityConfig=”@xml/network_security_config”

      No Need to set clear text traffic to true as shown above, instead use the below code:

      <?xml version="1.0" encoding="utf-8"?>
      <network-security-config>
          <domain-config cleartextTrafficPermitted="true">
              ....
              ....
          </domain-config>
      
          <base-config cleartextTrafficPermitted="false"/>
      </network-security-config>  

      Set the cleartextTrafficPermitted to true

3

Voices

2

Replies

Viewing 2 reply threads
  • You must be logged in to reply to this topic.