Get help with testing, discuss unit testing strategies etc.


Post by chauncey-garrett »

Hello,

I've recently run into an issue where webdriver fails to launch and the connection to Sauce Labs is abruptly interrupted. I've been unable to track down the root cause of this error since the error seems to be machine specific -- everything works fine on a different machine with the same setup. In addition to the error code 5 below, the browser in Sauce Labs displays the error "Bad Connection SSL dirty connection close" leading me to believe that something is wrong with the Sauce Connect proxy.

I've opened a ticket with Sauce Labs and they've requested that I turn on verbose logging for Sauce Connect. Is there any way to do so when using the --saucelabs option for webdriver? Switching to --saucelabs_ and starting sc separately would require a non-trivial amount of work. Also, is there a way to set the sc log file location using the webdriver command?

Here's output from the logs:
[DEBUG] --host set to https://automation_jenkins:SAUCELABS_API_KEY@ondemand.saucelabs.com:80/wd/hub
[DEBUG] Dispatcher start
[DEBUG] Runner setup: a Siesta.Launcher.Runner.WebDriverNodeJS.SauceLabs
Launching local tunnel to SauceLabs: automation_jenkins
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Sauce Connect 4.4.5, build 3472 1cbd9ed -dirty
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Using CA certificate bundle /etc/ssl/certs/ca-certificates.crt.
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Using CA certificate verify path /etc/ssl/certs.
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Starting up; pid 46
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Command line arguments: /app/src/vendor/siesta/bin//binary/saucelabs/linux64/bin/sc -u automation_jenkins -k **** -t redacted.com --tunnel-identifier 2713491776335726 --no-proxy-caching
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Log file: /tmp/sc-2713491776335726.log
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Pid file: /tmp/sc_client-2713491776335726.pid
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Timezone: UTC GMT offset: 0h
[DEBUG] Tunnel sdtout: 1 May 19:13:31 - Using no proxy for connecting to Sauce Labs REST API.
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - ***********************************************************
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - A newer version of Sauce Connect (build 3525) is available!
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - Download it here:
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - https://saucelabs.com/downloads/sc-4.4.6-linux.tar.gz
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - ***********************************************************
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - Started scproxy on port 33098.
[DEBUG] Tunnel sdtout: 1 May 19:13:32 - Please wait for 'you may start your tests' to start your tests.
[DEBUG] Tunnel sdtout: 1 May 19:13:51 - Provisioned tunnel:3bf22ec9673a45ae8fc5cdfed117faef
[DEBUG] Tunnel sdtout: 1 May 19:13:51 - Using no proxy for connecting to tunnel VM.
[DEBUG] Tunnel sdtout: 1 May 19:13:51 - Starting Selenium listener...
[DEBUG] Tunnel sdtout: 1 May 19:13:51 - Establishing secure TLS connection to tunnel...
[DEBUG] Tunnel sdtout: 1 May 19:13:51 - Selenium listener started on port 4445.
[DEBUG] Tunnel sdtout: 1 May 19:13:52 - Sauce Connect is up, you may start your tests.
[DEBUG] Dispatcher setup starting
[DEBUG] Trying to create a WebDriver instance for browser: chrome
[DEBUG] WebDriver instantiated successfully
[ERROR] Can't find Siesta on the harness page - page loading failed?
[DEBUG] Page close started: 1
[ERROR] Setup failed: Error: Error while opening harness page: 5
[DEBUG] Recevied results for all tests in the suite, proceeding to finalization
Closing SauceLabs tunnel
[DEBUG] Closing SauceLabs tunnel forcefully

Post by chauncey-garrett »

Forgot to mention that I'm using v4.3.0 of Siesta.

Post by nickolay »

Hi,

I've seen a similar problem when my harness page was not available through the tunnel - like, harness is on "https://local/someproject/tests/index.html" and domain "local" was not listed in the tunneled domains (3rd arg of --saucelabs or -t option of the bin/sc).

To enable the logging you'll have to modify the "bin/siesta-launcher-all.js". Find these lines:
                args.push('-u', sl.userName);
                args.push('-k', sl.key);
And add after them, something like:
                args.push('--log-file', "file/location");
Hope this helps.

Post by chauncey-garrett »

Hello again,

I've actually been patching in support for setting the sauce connect log file location for the past couple of releases. Could you provide official support for this?

Thanks!

Post by nickolay »

Hi!

Yes, added to master, for 4.4.2 (release this week)

Post Reply