--doctor is a command line utility that you can use to diagnose issues with Sauce Connect Proxy. This topic describes the errors that --doctor will detect, and how to resolve them.

ErrorResolution

failed to fetch PAC file ...: ...

Indicates the specified PAC file couldn't be downloaded. This may be caused by an incorrect URL, or a network mis-configuration. To troubleshoot this type of issue, try to download the PAC file manually from the machine running Sauce Connect with Curl or another HTTP client.

To debug the PAC file you can create one locally and pass it to Sauce Connect Proxy using the --pac option like this:

 $sc --pac file:///path/to/pacfile.js In Windows, remember to add the drive to the path like this:  $ sc --pac file:///C:\\path\to\pacfile.js
failed to fetch or empty PAC file ...The connection to the remote server was successfull but the PAC file was empty or missing.

both --proxy and --pac are used

Using both may work, but this is unsupported by Sauce Labs and should only be used if directed by the Saucelabs support.

invalid REST URL ...

The URL specified in the -x option is invalid.

failed to find proxy via PAC for ...

The PAC file was downloaded successfully, but no proxy was found for this host. This may be the result of an incorrect PAC file: make sure a proxy is specified for all the hosts.

can't resolve 'saucelabs.com'/... tunnel hostname(s) via any DNS server

To troubleshoot this issue, use dig or host to resolve the domain and verify it is correct:

connecting via <proxy> to http://<url>: <error> or connecting to http://<url>: <error>

The URL isn't accessible. If you see this error after other errors in the logs, try to fix the previous errors first.

Please refer to the libcurl errors manual to troubleshoot this issue.