Request failed with status 500 due to Error: Sauce could not start your job
See original GitHub issue[//]: # NOTE: This repository only maintains packages that are listed in the Readme. Please make sure that your issue is directly caused by one of these packages and if not file an issue in the correct 3rd party package repository.
Environment (please complete the following information):
- WebdriverIO version:– V 6.4.6
- Mode:–WDIO Testrunner
- If WDIO Testrunner, running sync/async: --sync
- Node.js version: – 10.19.0
- NPM version: – 6.13.4
- Browser name and version: – chrome latest
- Platform name and version: – Windows 10
- Additional wdio packages used (if applicable): “@wdio/cli”: “6.4.6”, “@wdio/local-runner”: “6.4.6”, “@wdio/mocha-framework”: “6.4.0”, “@wdio/spec-reporter”: “6.4.0”, “@wdio/sync”: “6.4.6”, “@wdio/sauce-service”: “6.4.6”, “wdio-chromedriver-service”: “6.0.4”,
Config of WebdriverIO
exports.config = {
suites: {
DriversPageTest: [
'./test/specs/driversPageTest.js'
]
},
user: process.env.SAUCELABS_USERNAME,
key: process.env.SAUCELABS_KEY,
region: 'eu',
services: [
['sauce', {
sauceConnect: true,
sauceConnectOpts: {
logfile: './target/Screenshots/sc-test.log',
proxy: 'HOST:PORT'
}
}]
],
maxInstances: 10,
capabilities: [{
browserName: 'chrome',
browserVersion: 'latest',
platformName: 'Windows 10',
'sauce:options': {
screenResolution: '1920x1080',
name: process.env.SUITE,
idleTimeout: 1000,
}
}],
disableWebdriverScreenshotsReporting: false,
sync: true,
logLevel: 'error',
coloredLogs: true,
bail: 0,
baseUrl: process.env.BASEURL,
waitforTimeout: 30000,
connectionRetryTimeout: 90000,
connectionRetryCount: 5,
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
timeout: 300000,
},
before: function (capabilities, specs) {
global.screenshotPath = `./target/Screenshots/${Date.now()}.png`
global.assert = chai.assert;
browser.setWindowSize(1920, 1080)
browser.url('/explore.internallogin')
browser.deleteAllCookies()
loginPage.loginToBetty()
try {
header.navigateTo("Transportation", "Planning")
} catch (err) {
loginPage.acceptCookies()
header.navigateTo("Transportation", "Planning")
}
header.navigateTo("Transportation", "Master-Data")
browser.switchToFrame(0)
}
}
Describe the bug I’m trying to use Sauce Labs secure tunnels but sometimes the test fails with no reason. They are triggered by jenkins and for the most of the time they run successfully, but sometimes they fail with an error that I attached below. This is just random and it looks like the tunnel could not be opened. This only happens when I add sauceConnect: true option to the config file.
To Reproduce I cannot say exactly when this happens. It is just random. It just fails from time to time and from what I analyzed it does not seem to be related with other tests running in the same time. The problem is that the log file is not generated when it fails for this reason so I cannot add it here.
[Include code or an example repository that can easily be set up]
Expected behavior The expected behavior if that the tests always runs successfully and it does not fail randomly even before it starts.
Log Log files are not generated when it fails with this error. Jenkins logs look like:
[0-0] RUNNING in chrome - /test/specs/driversPageTest.js
[0-0] 2020-09-29T11:19:02.349Z ERROR webdriver: Request failed with status 500 due to Error: Sauce could not start your job. For more information on what happened, please visit https://app.eu-central-1.saucelabs.com/tests/12e83b030bac4a558f699c9aa2b87652
[0-0] 2020-09-29T11:19:02.351Z ERROR webdriver: Error: Sauce could not start your job. For more information on what happened, please visit https://app.eu-central-1.saucelabs.com/tests/12e83b030bac4a558f699c9aa2b87652
at getErrorFromResponseBody (/home/jenkins/agent/workspace/smokeTestsDAN-DriversPageTest/DAN_ui_automation/node_modules/webdriver/build/utils.js:121:10)
at WebDriverRequest._request (/home/jenkins/agent/workspace/smokeTestsDAN-DriversPageTest/DAN_ui_automation/node_modules/webdriver/build/request.js:149:56)
at process._tickCallback (internal/process/next_tick.js:68:7)
[0-0] 2020-09-29T11:19:02.352Z ERROR @wdio/runner: Error: Failed to create session.
Sauce could not start your job. For more information on what happened, please visit https://app.eu-central-1.saucelabs.com/tests/12e83b030bac4a558f699c9aa2b87652
at startWebDriverSession (/home/jenkins/agent/workspace/smokeTestsDAN-DriversPageTest/DAN_ui_automation/node_modules/webdriver/build/utils.js:45:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
[0-0] Error: Failed to create session.
Sauce could not start your job. For more information on what happened, please visit https://app.eu-central-1.saucelabs.com/tests/12e83b030bac4a558f699c9aa2b87652
[0-0] FAILED in chrome - /test/specs/driversPageTest.js
Additional context Add any other context about the problem here.
Please use the correct markdown
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (10 by maintainers)
No fix found. The problem still exists and I’m using the latest wdio.
Hardening browser.url (url) with a try / catch and a 2nd shot did not make any difference. Both attempts failed. It’s not a transient error in this case.
However, we think the root cause is the URL behind the firewall is whitelisted on my local machine, but not on the Docker instance. So it’s an issue on my side.