launcher fails to start Sauce Connect
See original GitHub issueEvery time I try to run a test using Karma and this launcher agains SL, I get the following message:
INFO [karma]: Karma v0.12.28 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome (Windows 8.1) on SauceLabs
ERROR [launcher.sauce]: Can not start Chrome (Windows 8.1)
Failed to start Sauce Connect:
Could not start Sauce Connect. Exit code 1 signal: null
Finished in 0 secs / 0 secs
My karma.conf.js
file looks like:
"use strict";
var label,
files = require("./misc/files");
module.exports = function (config) {
config.set({
/**
* Autowatch
*/
autoWatch: true,
/**
*
* Browsers
*
* Chrome
* ChromeCanary
* PhantomJS
* Firefox
* Opera
* Internet Explorer
* Safari
*
*/
browsers: [
"PhantomJS"
],
/**
* Browser Config
*/
browserDisconnectTimeout: 15 * 1000,
browserDisconnectTolerance: 2,
browserNoActivityTimeout: 60 * 1000,
/**
* Client
*/
client: {
mocha: {
reporter: "html",
ui: "bdd"
}
},
/**
* Custom Browsers
*/
customLaunchers: {
"SL_Android_4.0": {
base: "SauceLabs",
browserName: "Android",
platform: "Linux",
version: "4.0"
},
"SL_Android_4.1": {
base: "SauceLabs",
browserName: "Android",
platform: "Linux",
version: "4.1"
},
"SL_Android_4.2": {
base: "SauceLabs",
browserName: "Android",
platform: "Linux",
version: "4.2"
},
"SL_Android_4.3": {
base: "SauceLabs",
browserName: "Android",
platform: "Linux",
version: "4.3"
},
"SL_Android_4.4": {
base: "SauceLabs",
browserName: "Android",
platform: "Linux",
version: "4.4"
},
"SL_Android_5.0": {
base: "SauceLabs",
browserName: "Android",
platform: "Linux",
version: "5.0"
},
"SL_Chrome": {
base: "SauceLabs",
browserName: "Chrome",
platform: "Windows 8.1"
},
"SL_Chrome_Linux": {
base: "SauceLabs",
browserName: "Chrome",
platform: "Linux"
},
"SL_Chrome_OSX": {
base: "SauceLabs",
browserName: "Chrome",
platform: "OS X 10.10"
},
"SL_Firefox": {
base: "SauceLabs",
browserName: "Firefox",
platform: "Windows 8.1"
},
"SL_Firefox_Linux": {
base: "SauceLabs",
browserName: "Firefox",
platform: "Linux"
},
"SL_Firefox_OSX": {
base: "SauceLabs",
browserName: "Firefox",
platform: "OS X 10.10"
},
"SL_IE_9": {
base: "SauceLabs",
browserName: "Internet Explorer",
platform: "Windows 7",
version: "9"
},
"SL_IE_10": {
base: "SauceLabs",
browserName: "Internet Explorer",
platform: "Windows 8",
version: "10"
},
"SL_IE_11": {
base: "SauceLabs",
browserName: "Internet Explorer",
platform: "Windows 8.1",
version: "11"
},
"SL_IOS_6": {
base: "SauceLabs",
browserName: "iPhone",
platform: "OS X 10.8",
version: "6.1"
},
"SL_IOS_7": {
base: "SauceLabs",
browserName: "iPhone",
platform: "OS X 10.9",
version: "7.1"
},
"SL_IOS_8": {
base: "SauceLabs",
browserName: "iPhone",
platform: "OS X 10.10",
version: "8.1"
},
"SL_Opera": {
base: "SauceLabs",
browserName: "opera",
platform: "Windows 7"
},
"SL_Opera_Linux": {
base: "SauceLabs",
browserName: "opera",
platform: "Linux"
},
"SL_Safari_5": {
base: "SauceLabs",
browserName: "Safari",
platform: "OS X 10.6",
version: "5"
},
"SL_Safari_6": {
base: "SauceLabs",
browserName: "Safari",
platform: "OS X 10.8",
version: "6"
},
"SL_Safari_7": {
base: "SauceLabs",
browserName: "Safari",
platform: "OS X 10.9",
version: "7"
},
"SL_Safari_8": {
base: "SauceLabs",
browserName: "Safari",
platform: "OS X 10.10",
version: "8"
}
},
/**
* Files
*/
files: [].concat(
files.test.unit.dependencies,
files.src,
files.test.unit.src
),
/**
* Frameworks
*/
frameworks: [
"mocha",
"sinon-chai"
],
/**
*
* Logging
*
* config.LOG_DISABLE
* config.LOG_ERROR
* config.LOG_WARN
* config.LOG_INFO
* config.LOG_DEBUG
*
*/
logLevel: config.LOG_INFO,
/**
* Plugins
*/
plugins: [
"karma-chrome-launcher",
"karma-firefox-launcher",
"karma-ie-launcher",
"karma-mocha",
"karma-mocha-reporter",
"karma-phantomjs-launcher",
"karma-safari-launcher",
"karma-sinon-chai",
"karma-sauce-launcher"
],
/**
* Port
*/
port: 9876,
/**
* Preprocessors
*/
preprocessors: {},
/**
* Reporters
*/
reporters: [
"mocha"
],
/**
* SauceLabs
*/
sauceLabs: {
testName: "Angular VScroller UNIT",
startConnect: true
}
});
if (process.env.TRAVIS)
{
label = "TRAVIS #" + process.env.TRAVIS_BUILD_NUMBER + " (" + process.env.TRAVIS_BUILD_ID + ")";
config.captureTimeout = 0;
config.logLevel = config.LOG_DEBUG;
config.transports = [
"websocket"
];
config.sauceLabs.build = label;
config.sauceLabs.startConnect = false;
config.sauceLabs.recordScreenshots = true;
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
}
};
The SAUCE_USERNAME
and SAUCE_ACCESS_KEY
are available as env variables so the launcher should be able to start SC using those, but it fails every time and I cannot seem to figure out the cause of it.
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Troubleshooting | Sauce Labs Documentation
Below are some tips to help troubleshoot Sauce Connect Proxy. Make sure you're using the latest version of Sauce Connect Proxy, which you...
Read more >sauce-connect-launcher - npm
A library to download and launch Sauce Connect. ... Start using sauce-connect-launcher in your project by running `npm i ...
Read more >saucelabs - Unable to start sauce connect with proxy
Now if I use browsermobproxy, and try to start sauce connect, it fails with error >sc -u userName -k token -i tunnelName --proxy ......
Read more >sauce-connect-launcher-update 1.3.2 vulnerabilities - Snyk
A library to download and launch Sauce Connect. ... This does not include vulnerabilities belonging to this package's dependencies.
Read more >[JENKINS-31376] Sauce connect intermmentantly fails to launch
Since upgrading Jenkins and sauce-ondemand we are having mostly failures with sauce connect launching. Occasionally sauce does launch ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rolandjitsu @sbichenko –
I had the same error. So it says the sc binary exited with an error; unhelpfully it doesn’t tell you what the error was. You can find it out yourself by running sc manually:
logLevel
toconfig.LOG_DEBUG
in karma.conf.js and trying again. It’ll print something likeDEBUG [launcher.sauce]: Starting sc with args: -u XXXXXXXX -k XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX --tunnel-identifier karma1438354495 --readyfile /tmp/sc-launcher-readyfile
node_modules/karma-sauce-launcher/node_modules/sauce-connect-launcher/sc/sc-4.3.8-linux/bin/sc
(probably with a slightly different version)<path_to_sc> -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY --tunnel-identifier test --readyfile /tmp/sc-launcher-readyfile
This’ll then show you the actual reason sc is failing. (For me it was another runaway sc process that was already using the same port).
Closing this due to inactivity, feel free to re-open if this is still an issue.