question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to connect to older browsers on SauceLabs

See original GitHub issue

This is happening with multiple repos, all of which previously worked without issue.

  • macOS 10.15.5
  • node v12.15.0
  • karma v5.1.0
  • karma-sauce-launcher v4.1.5
  • mocha v4.1.0 (req’d for IE9 tests)
  • chai v4.2.0

Connections are made as expected when later versions of Chrome, Edge, Firefox, IE, and Safari are used (although with a deprecation warning as mentioned in #209). Easier versions of every browser fail consistently. For example, here is the console output from testing with Chrome 26 on Windows 10:

16 06 2020 11:53:18.572:INFO [karma-server]: Karma v5.1.0 server started at http://0.0.0.0:9877/
16 06 2020 11:53:18.573:INFO [launcher]: Launching browsers sl_chrome with concurrency unlimited
16 06 2020 11:53:18.583:INFO [launcher]: Starting browser chrome 26.0 (Windows 10) on SauceLabs
(node:28716) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
16 06 2020 11:54:18.589:WARN [launcher]: chrome 26.0 (Windows 10) on SauceLabs have not captured in 60000 ms, killing.
16 06 2020 11:54:18.590:ERROR [SaucelabsLauncher]: Could not quit the Saucelabs selenium connection. Failure message:
16 06 2020 11:54:18.590:ERROR [SaucelabsLauncher]: TypeError: Cannot read property 'deleteSession' of null
    at SaucelabsLauncher.<anonymous> (/Users/john/Dev/canvas-size/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:77:26)
    at Generator.next (<anonymous>)
    at /Users/john/Dev/canvas-size/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/john/Dev/canvas-size/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:4:12)
    at SaucelabsLauncher.<anonymous> (/Users/john/Dev/canvas-size/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:74:31)
    at SaucelabsLauncher.emit (events.js:223:5)
    at SaucelabsLauncher.EventEmitter.emit (domain.js:475:20)
    at SaucelabsLauncher.emitAsync (/Users/john/Dev/canvas-size/node_modules/karma/lib/events.js:52:10)
    at SaucelabsLauncher.BaseLauncher.kill (/Users/john/Dev/canvas-size/node_modules/karma/lib/launchers/base.js:61:27)
2020-06-16T16:56:51.472Z ERROR webdriver: Request failed with status 400 due to Error: Missing or invalid 'desiredCapabilities'
2020-06-16T16:56:51.473Z ERROR webdriver: Error: Missing or invalid 'desiredCapabilities'
    at getErrorFromResponseBody (/Users/john/Dev/canvas-size/node_modules/webdriver/build/utils.js:121:10)
    at WebDriverRequest._request (/Users/john/Dev/canvas-size/node_modules/webdriver/build/request.js:148:56)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async startWebDriverSession (/Users/john/Dev/canvas-size/node_modules/webdriver/build/utils.js:41:16)
    at async Function.newSession (/Users/john/Dev/canvas-size/node_modules/webdriver/build/index.js:44:23)
    at async Object.remote (/Users/john/Dev/canvas-size/node_modules/webdriverio/build/index.js:66:20)
16 06 2020 11:56:51.473:ERROR [SaucelabsLauncher]: Error: Failed to create session.
Missing or invalid 'desiredCapabilities'
    at startWebDriverSession (/Users/john/Dev/canvas-size/node_modules/webdriver/build/utils.js:45:11)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

The error descriptions read to me like errors with karma-sauce-launcher:

16 06 2020 11:54:18.590:ERROR [SaucelabsLauncher]: Could not quit the Saucelabs selenium connection. Failure message:
16 06 2020 11:54:18.590:ERROR [SaucelabsLauncher]: TypeError: Cannot read property 'deleteSession' of null
2020-06-16T16:56:51.472Z ERROR webdriver: Request failed with status 400 due to Error: Missing or invalid 'desiredCapabilities'
2020-06-16T16:56:51.473Z ERROR webdriver: Error: Missing or invalid 'desiredCapabilities'
16 06 2020 11:56:51.473:ERROR [SaucelabsLauncher]: Error: Failed to create session.
Missing or invalid 'desiredCapabilities'
    at startWebDriverSession (/Users/john/Dev/canvas-size/node_modules/webdriver/build/utils.js:45:11)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

I was able to come up with a list of browser/platform combinations that work reliably. Any browser version earlier than the ones listed below will fail to connect.

  • Chrome 75 / Windows 10
  • Edge 13 / Windows 10
  • Firefox 55 / Windows 10
  • IE10 / Windows 7
  • Safari / OS X 10.13

One thing I noticed on SauceLabs’ Platform Configurator page is an option to select either the “WebDriver (W3C) - Selenium 3/4, Webdriver.io” or “Legacy - Selenium 2/3” API.

Screen Shot 2020-06-16 at 12 38 10 PM

Perhaps the issue is related a configuration for the new API being incorrectly being sent to browser/platform combinations that are require the older API?

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jhildenbiddlecommented, Nov 1, 2020

Great to see this fixed. Thank you!

2reactions
christian-bromanncommented, Oct 20, 2020

Major dependency bump in a patch release is not that the users expect.

@web-padawan I don’t see major dependency bumps problematic as long as they don’t change the behavior of the software. In this case it actually did for people that still test on old browser that don’t support the WebDriver protocol. I see two options:

  1. apply the sauce:option capability only if provided capabilities suggest new browser
  2. revert all changes up until v4.1.4, make a new patch release, reapply changes and release as v5

What would you all suggest?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Sauce Labs Documentation
Make sure you're using the latest version of Sauce Connect Proxy, which you can download here. Using older versions may cause technical ...
Read more >
Common Error Messages | Sauce Labs Documentation
Below are some Sauce Labs automated testing common error messages and how to fix them.
Read more >
Error Messages on Sauce and What They Mean
Job does not load --. There are two common scenarios here: • Error message: "Uh oh! Some error occurred while connecting to the...
Read more >
Live Cross Browser Testing - Sauce Labs Documentation
You can run live tests of your websites on a wide variety of operating system, browser, version, and screen resolution configurations.
Read more >
Why can't my Appium Desktop access Real Devices on Sauce?
Since our Appium Desktop integration pre-dates the ability to access your real devices using the Sauce On-Demand endpoint, older versions of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found