Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to Saucelabs - "Sauce Connect could not establish a connection" #157

Open
apgemini opened this issue May 31, 2020 · 1 comment

Comments

@apgemini
Copy link

Hi There,

Seeing this error message "Sauce Connect could not establish a connection" while trying to run TestCafe tests on Saucelabs.
I could be missing something at my end but want to get help as this module is throwing the error.

I have also reached out to Saucelabs support. Sauce credentials are valid and i am printing them out as shown below via console.log(). [Please ignore other redundant console statements]

Using [email protected] version.

$ testcafe "saucelabs:[email protected]:macOS 10.14" ./test/functional/tests/items/test.js
Using locally installed version of TestCafe.
The "src", "browsers" options from the configuration file will be ignored.
username --->> xxxxxxxxxx
accessKey --->> xxxxx-xxxxx-xxxx-xxxxx-xxxxxxxxx
OPTION 0
LOGGER --->> function () {}
OPTION END
username --->> xxxxxxxxxx
accessKey --->> xxxxx-xxxxx-xxxx-xxxxx-xxxxxxxxx
OPTION 0
LOGGER --->> function () {}
OPTION END
username --->> xxxxxxxxxx
accessKey --->> xxxxx-xxxxx-xxxx-xxxxx-xxxxxxxxx
OPTION 0
LOGGER --->> function () {}
OPTION END
username --->> xxxxxxxxxx
accessKey --->> xxxxx-xxxxx-xxxx-xxxxx-xxxxxxxxx
OPTION 0
LOGGER --->> function () {}
OPTION END
ERROR Error: 31 May 15:03:23 - Sauce Connect could not establish a connection.
    at handleError (/Users/atestuser/global_repo/testpp/apptest/node_modules/sauce-connect-launcher/lib/sauce-connect-launcher.js:410:17)
    at /Users/atestuser/global_repo/testpp/apptest/node_modules/sauce-connect-launcher/lib/sauce-connect-launcher.js:517:11
    at /Users/atestuser/global_repo/testpp/apptest/node_modules/lodash/lodash.js:4905:15
    at baseForOwn (/Users/atestuser/global_repo/testpp/apptest/node_modules/lodash/lodash.js:2990:24)
    at /Users/atestuser/global_repo/testpp/apptest/node_modules/lodash/lodash.js:4874:18
    at Function.forEach (/Users/atestuser/global_repo/testpp/apptest/node_modules/lodash/lodash.js:9342:14)
    at /Users/atestuser/global_repo/testpp/apptest/node_modules/sauce-connect-launcher/lib/sauce-connect-launcher.js:515:9
    at arrayEach (/Users/atestuser/global_repo/testpp/apptest/node_modules/lodash/lodash.js:516:11)
    at Function.forEach (/Users/atestuser/global_repo/testpp/apptest/node_modules/lodash/lodash.js:9342:14)
    at Socket.<anonymous> (/Users/atestuser/global_repo/testpp/apptest/node_modules/sauce-connect-launcher/lib/sauce-connect-launcher.js:503:7)

Appreciate any help.

@redbugz
Copy link

redbugz commented Sep 7, 2020

I had a similar error. I added some debug messages and it might be shell escaping? I am using zsh, and when I take the command line that is generated from the logs and run it manually on zsh I get an error because of escaping. When I use bash, it seems to work.

Command line arguments: /path/to/app/node_modules/sauce-connect-launcher/sc/sc-4.6.2-linux/bin/sc -u **** -k **** --tunnel-identifier *** --direct-domains *.google.com,*.gstatic.com,*.googleapis.com --readyfile /tmp/sc-launcher-readyfile -x https://saucelabs.com/rest/v1 

Particularly the unescaped direct-domains, in zsh those cause an error because they don't match a file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants