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

Tests not working on Sauce Labs #145

Closed
Vheissu opened this issue Oct 2, 2017 · 7 comments
Closed

Tests not working on Sauce Labs #145

Vheissu opened this issue Oct 2, 2017 · 7 comments

Comments

@Vheissu
Copy link

Vheissu commented Oct 2, 2017

Previously tests were working with with SauceLabs using Karma. However, I am not sure if something has recently changed on the side of SL itself in respect to how tunnels are created for testing.

For some reasons tests just time out, I get the following:

screen shot 2017-10-02 at 11 43 35 pm

Eventually it gives up. The strange thing is tests were working just fine up until recently. All of a sudden all of my repos were failing on the SauceLabs testing part. At first I thought it was an issue with Travis or the Travis config I am using, however I cannot get SauceLabs tests to run locally either (as per screenshot).

Should this plugin still be working? I am on the latest version, but have tried prior versions and still nothing. I tried digging up information on the SauceLabs website, but couldn't find anything relating to changes.

@thomasconner
Copy link

I am experiencing the same issue here.

@Vheissu
Copy link
Author

Vheissu commented Oct 10, 2017

@thomasconner Good news, I worked out what is causing this today. I went to the extent of changing my build process and everything. I wrote up a blog post on my experience and how I solved it here: https://ilikekillnerds.com/2017/10/karma-sauce-launcher-issue-tests-timing-outnot-running-sauce-labs/

The TL;DR is remove connectOptions from your sauceLabs configuration object inside of karma.conf.js I think specifying port: 5757 is what causes the issue or possibly the whole connectOptions object is the issue (I didn't dig further after it started working).

@jdmarshall
Copy link
Contributor

I'm not clear on why, but it's documented somewhere that sauce tunnels don't forward every port. You have to pick one of the white-listed port (ranges?) or you get no traffic. Stumbled on that about 18 months ago. Let me see if I can find the relevant docs...

@robframpton
Copy link

Ran into the same timeout issue. Rolling back to karma-sauce-launcher@1.1.0 resolved the issue for me.

@thetutlage
Copy link

It's not working for me either with bare minimum config and a one test using Mocha. It is not able to make websocket connection ( check attached screenshot for that ).

Config

{
  basePath: '',
  files: [
    // some files
  ],
  logLevel: 'debug',
  port: 9876,
  customLaunchers: customLaunchers,
  reporters: ['dots', 'saucelabs'],
  frameworks: ['mocha'],
  captureTimeout: 300000,
  browserNoActivityTimeout: 300000,
  browserDisconnectTimeout: 100000,
  browserDisconnectTolerance: 1,
  browsers: Object.keys(customLaunchers),
  sauceLabs: {
    testName: 'Karma and Sauce Labs demo'
  },
  singleRun: true
}

Custom launchers

const customLaunchers = {
  sl_chrome: {
    base: 'SauceLabs',
    browserName: 'chrome',
    platform: 'OS X 10.10'
  }
}

Screenshot from saucelabs

screen shot 2017-12-15 at 9 26 53 am

@jdmarshall
Copy link
Contributor

@thetutlage

I was having websockets problems with saucelabs long before I started using karma-sauce-launcher, so my config has:

transports: ['polling'],

That may explain why we aren't experiencing the problem with 1.2.0.

Could one of you run a git bisect and figure out where the problem starts? I wonder if the dependency updates or the proxy additions are involved.

@gushiguera-rezi
Copy link

gushiguera-rezi commented Mar 5, 2020

I am seeing this issue with the latest version still (v2.0.2), was it resolved? Removing the configuration options doesn't seem to work.

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

6 participants