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.
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 (
) 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:
You can then access resources at
lhtransparently inside the emu
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):