Sauce Lab Android Emulator not connecting to internet

27 Views Asked by At

As the title states, I use a pac file which allows us to use the Sauce Connect Proxy. This is what our pac file looks like

function FindProxyForURL(url, host) { 
   if ( shExpMatch(host, "*.api.testobject.com/sc/rest/v1") || 
        shExpMatch(host, "*.saucelabs.com") || 
        shExpMatch(host, "basejumper.apple.com") || 
        shExpMatch(host, "saucelabs.com")) { 
        return "DIRECT"; } 
   return "PROXY localhost:32036";}

These is our sc log file that we get:

2023-12-28 14:10:09.963 [84535] [CLI] [info] Secure remote tunnel provisioned. Tunnel ID: aa81ca0f749447a783fbbb907fb5d20b
2023-12-28 14:10:09.964 [84535] [CLI] [info] Tunnel server name: maki3054.miso.saucelabs.com.
2023-12-28 14:10:09.964 [84535] [CLI] [info] Using no proxy for connecting to tunnel server.
2023-12-28 14:10:09.967 [84535] [CLI] [info] Added CA certificate /private/etc/ssl/cert.pem.
2023-12-28 14:10:10.186 [84535] [CLI] [info] Starting tunnel certificate validation.
2023-12-28 14:10:11.568 [84535] [CLI] [info] Reached a trusted CA. Certificate chain is verified.
2023-12-28 14:10:11.569 [84535] [CLI] [info] Establishing secure TLS connection to tunnel...
2023-12-28 14:10:11.583 [84535] [EVDNS] [warn] Added nameserver 10.110.183.86:53 as 0x12b909da0
2023-12-28 14:10:11.584 [84535] [EVDNS] [warn] Added nameserver 10.110.183.87:53 as 0x12ba04710
2023-12-28 14:10:11.820 [84535] [CLI] [info] Selenium listener disabled.
2023-12-28 14:10:12.760 [84535] [PROXY] [warn] 127.0.0.1:52860 (127.0.0.1) <- 200 saucelabs.com:443
2023-12-28 14:10:12.821 [84535] [CLI] [info] Connection state has changed: previous: INIT, actual: CONNECTED.
2023-12-28 14:10:12.821 [84535] [CLI] [info] Sauce Connect is up, you may start your tests.
2023-12-28 14:10:13.082 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:42.374 [84535] [PROXY] [warn] 127.0.0.1:52914 (10.100.33.53) <- 502 127.0.0.53:853 (27 bytes)
2023-12-28 14:10:42.436 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:42.438 [84535] [PROXY] [warn] 127.0.0.1:52917 (10.100.33.53) <- 204 connectivitycheck.gstatic.com
2023-12-28 14:10:42.622 [84535] [PROXY] [warn] 127.0.0.1:52916 (10.100.33.53) <- 200 142.250.72.132:443
2023-12-28 14:10:43.175 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:43.254 [84535] [PROXY] [warn] 127.0.0.1:52923 (10.100.33.53) <- 204 www.google.com
2023-12-28 14:10:44.402 [84535] [PROXY] [warn] 127.0.0.1:52928 (10.100.33.53) <- 204 connectivitycheck.gstatic.com
2023-12-28 14:10:44.611 [84535] [PROXY] [warn] 127.0.0.1:52926 (10.100.33.53) <- 200 142.250.72.132:443
2023-12-28 14:10:44.806 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:44.873 [84535] [PROXY] [warn] 127.0.0.1:52930 (10.100.33.53) <- 204 www.google.com
2023-12-28 14:10:47.107 [84535] [PROXY] [warn] 127.0.0.1:52934 (10.100.33.53) <- 204 connectivitycheck.gstatic.com
2023-12-28 14:10:47.126 [84535] [PROXY] [warn] 127.0.0.1:52935 (10.100.33.53) <- 502 [2607:f8b0:4007:814::2004]:443 (43 bytes)
2023-12-28 14:10:47.188 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:47.456 [84535] [PROXY] [warn] 127.0.0.1:52938 (10.100.33.53) <- 200 142.250.72.132:443
2023-12-28 14:10:47.664 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:47.731 [84535] [PROXY] [warn] 127.0.0.1:52941 (10.100.33.53) <- 204 www.google.com
2023-12-28 14:10:48.301 [84535] [PROXY] [warn] 127.0.0.1:52942 (10.100.33.53) <- 200 142.250.141.188:5228
2023-12-28 14:10:48.646 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:48.708 [84535] [PROXY] [warn] 127.0.0.1:52946 (10.100.33.53) <- 502 [2607:f8b0:4023:c0d::bc]:5228 (42 bytes)
2023-12-28 14:10:48.772 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:48.844 [84535] [PROXY] [warn] 127.0.0.1:52948 (10.100.33.53) <- 200 firebaseinstallations.googleapis.com:443
2023-12-28 14:10:49.303 [84535] [PROXY] [warn] 127.0.0.1:52951 (10.100.33.53) <- 200 64.233.171.188:443
2023-12-28 14:10:49.331 [84535] [PROXY] [warn] 127.0.0.1:52955 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:49.405 [84535] [PROXY] [warn] 127.0.0.1:52958 (10.100.33.53) <- 200 youtubei.googleapis.com:443
2023-12-28 14:10:49.410 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:49.417 [84535] [PROXY] [warn] 127.0.0.1:52960 (10.100.33.53) <- 200 i.ytimg.com:443
2023-12-28 14:10:49.544 [84535] [PROXY] [warn] 127.0.0.1:52965 (10.100.33.53) <- 200 firebaseinstallations.googleapis.com:443
2023-12-28 14:10:49.588 [84535] [PROXY] [warn] 127.0.0.1:52968 (10.100.33.53) <- 200 ssl.gstatic.com:443
2023-12-28 14:10:49.723 [84535] [PROXY] [warn] 127.0.0.1:52971 (10.100.33.53) <- 200 www.googleapis.com:443
2023-12-28 14:10:49.757 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:49.834 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:49.874 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.018 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.038 [84535] [PROXY] [warn] 127.0.0.1:52974 (10.100.33.53) <- 200 142.251.40.42:443
2023-12-28 14:10:50.107 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.131 [84535] [PROXY] [warn] 127.0.0.1:52977 (10.100.33.53) <- 200 www.googletagmanager.com:443
2023-12-28 14:10:50.145 [84535] [PROXY] [warn] 127.0.0.1:52989 (10.100.33.53) <- 502 [2607:f8b0:4003:c15::bc]:443 (41 bytes)
2023-12-28 14:10:50.168 [84535] [PROXY] [warn] 127.0.0.1:52979 (10.100.33.53) <- 200 www.googleapis.com:443
2023-12-28 14:10:50.205 [84535] [PROXY] [warn] 127.0.0.1:52987 (10.100.33.53) <- 200 mobiledataplan-pa.googleapis.com:443
2023-12-28 14:10:50.212 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.220 [84535] [PROXY] [warn] 127.0.0.1:52983 (10.100.33.53) <- 200 www.googleadservices.com:443
2023-12-28 14:10:50.246 [84535] [PROXY] [warn] 127.0.0.1:52985 (10.100.33.53) <- 200 android.apis.google.com:443
2023-12-28 14:10:50.334 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.354 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.435 [84535] [PROXY] [warn] 127.0.0.1:52995 (10.100.33.53) <- 200 youtubei.googleapis.com:443
2023-12-28 14:10:50.465 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.467 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.514 [84535] [PROXY] [warn] 127.0.0.1:52997 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:50.516 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.536 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.538 [84535] [PROXY] [warn] 127.0.0.1:53001 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:50.581 [84535] [PROXY] [warn] 127.0.0.1:53006 (10.100.33.53) <- 200 www.googleapis.com:443
2023-12-28 14:10:50.583 [84535] [PROXY] [warn] 127.0.0.1:53004 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:50.620 [84535] [PROXY] [warn] 127.0.0.1:53017 (10.100.33.53) <- 502 127.0.0.53:853 (27 bytes)
2023-12-28 14:10:50.656 [84535] [PROXY] [warn] 127.0.0.1:53014 (10.100.33.53) <- 200 firebaseinstallations.googleapis.com:443
2023-12-28 14:10:50.683 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.697 [84535] [PROXY] [warn] 127.0.0.1:53012 (10.100.33.53) <- 200 ad.doubleclick.net:443
2023-12-28 14:10:50.702 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.702 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.702 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.702 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.704 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.739 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.791 [84535] [PROXY] [warn] 127.0.0.1:53020 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:50.816 [84535] [PROXY] [warn] 127.0.0.1:53023 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:50.818 [84535] [PROXY] [warn] 127.0.0.1:53026 (10.100.33.53) <- 204 connectivitycheck.gstatic.com
2023-12-28 14:10:50.923 [84535] [PROXY] [warn] 127.0.0.1:53041 (10.100.33.53) <- 200 www.google.com:443
2023-12-28 14:10:50.927 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.928 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.980 [84535] [PROXY] [warn] 127.0.0.1:53040 (10.100.33.53) <- 200 www.gstatic.com:443
2023-12-28 14:10:50.986 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:50.987 [84535] [PROXY] [warn] 127.0.0.1:53042 (10.100.33.53) <- 200 142.250.141.188:5228
2023-12-28 14:10:51.008 [84535] [PROXY] [error] cannot close write side of CONNECT tunnel
2023-12-28 14:10:51.013 [84535] [PROXY] [warn] 127.0.0.1:53032 (10.100.33.53) <- 200 firebaseinstallations.googleapis.com:443
2023-12-28 14:10:51.024 [84535] [PROXY] [warn] 127.0.0.1:53027 (10.100.33.53) <- 200 142.250.72.134:443
2023-12-28 14:10:51.034 [84535] [PROXY] [warn] 127.0.0.1:53052 (10.100.33.53) <- 200 mobiledataplan-pa.googleapis.com:443
2023-12-28 14:10:51.042 [84535] [PROXY] [warn] 127.0.0.1:53033 (10.100.33.53) <- 200 142.250.217.142:443
2023-12-28 14:10:51.042 [84535] [PROXY] [warn] 127.0.0.1:53031 (10.100.33.53) <- 200 172.217.12.138:443


When running with a pac file it seems as though the emulator cannot connect to the inernet which blocks my abiity to use my webview in my app. Without the pac file I am able to see the webview load. I need a pac file to capture the har file for the testing that I am doing.

I have tried to look at what may be blocking our services from working with a pac file, but I am a bit unfamiliar with networking. I believe my pac file needs to redirect another service or i need to whitelist something, but I am unsure of what to do.

0

There are 0 best solutions below