The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing


External Resources

More Info

Page tree
Skip to end of metadata
Go to start of metadata

Android 7.1 and Above

Google has made a change to their Emulators that blocks our ability to modify some versions of 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. 

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.

Applicable Android OSs are called out for each section that follows.

Chrome tests

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

NOTE: The workaround is applicable to Android 7.1 and above.  


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

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

  • 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.

NOTE: The workaround is applicable to Android 9.0.  


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):

       <domain-config cleartextTrafficPermitted="true">
       <domain includeSubdomains="true"></domain>

       <domain includeSubdomains="true"></domain>

  • No labels