Skip to end of metadata
Go to start of metadata

Android 9.0

Google has made a change to their Emulators that blocks our ability to modify the Android OS in order to support endpoints without certs using Sauce Connect. While Chrome browser tests using http webpages over Sauce Connect will work, as should other browsers; the OS will block any other app that tries to use unencrypted endpoints, unless the developers apply the overrides mentioned below. Information on the Google changes to Android can be found here:

https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

What this means is that SC tests running customer-developed apps that access unencrypted remote endpoints won't work out of the box the way they do on Emulators of Android 8 and earlier.

Chrome tests:

  • Accessing `localhost` domains over Sauce Connect tunnels won’t work, but there’s a workaround:

Workaround

You can workaround the localhost (lh) issue by doing this:

  • Add an entry in your local machine's hosts file such as:

    lh  127.0.0.1
  • Add the following to the sauce connect startup flags:

    --tunnel-domains lh

    You can then access resources at lh transparently inside the emu

App tests:

  • Apps will no longer be able to connect to unencrypted endpoints by default; this is a Google design decision.

  • To bypass this, customers have to adjust the network security config or the Android Manifest files in their apps using the options in the link above.

Example for allowing connections to a specific domain or set of domains in your app (taken from google’s documentation, link above):

<network-security-config>
       <domain-config cleartextTrafficPermitted="true">
       <domain includeSubdomains="true">insecure.example.com</domain>

       <domain includeSubdomains="true">insecure.cdn.example.com</domain>
       </domain-config>
</network-security-config>




  • No labels