DevExpress / testcafe-browser-provider-saucelabs

This is the Sauce Labs browser provider plugin for TestCafe.
https://devexpress.github.io/testcafe/
MIT License
32 stars 41 forks source link

The environment you requested was unavailable. for saucelabs:internet explorer@11.285:Windows 10 #39

Closed jwineman closed 5 years ago

jwineman commented 5 years ago

When I run the following npm command:

NODE_ENV=production INTERCOM_APP_ID=none npm run build && testcafe \"saucelabs:internet explorer@11.285:Windows 10\" ./src/__e2e__/tests/**/*.test.js -c 4 --app=\"npm run start\" --app-init-delay 2000"

with testcafe-browser-provider-saucelabs 1.6.1 I get:

Error: [init({"tunnelIdentifier":1553099764562,"idleTimeout":1000,"browserName":"internet explorer","version":"11.285","platform":"windows 10","prerun":"sauce-storage:disable-intranet-compatibility-mode-in-ie.bat"})] The environment you requested was unavailable.
Sauce could not start your job. For more information on what happened, please visit https://app.saucelabs.com/tests/eb0aebcca74d4d6e9fc0b8feab7844d1
    at /home/travis/build/crucible-risk/front-end/node_modules/wd/lib/webdriver.js:138:15
    at Request._callback (/home/travis/build/crucible-risk/front-end/node_modules/wd/lib/http-utils.js:89:7)
    at Request.self.callback (/home/travis/build/crucible-risk/front-end/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/travis/build/crucible-risk/front-end/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/travis/build/crucible-risk/front-end/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)

This same command had worked a few months ago, any idea on root cause?

danielfigueiredo commented 5 years ago

I started to have the same error today. All browsers in this list throws this error now, even with a paid saucelabs account:

  'saucelabs:chrome@63.0:Windows 10'
  'saucelabs:safari@11.1:macOS 10.13
  'saucelabs:firefox@52.0:Windows 10'
  'saucelabs:internet explorer@11.285:Windows 10'
  'saucelabs:MicrosoftEdge@17.17134:Windows 10
  'saucelabs:iPhone 6s Plus Simulator@10.3'
  'saucelabs:Samsung Galaxy S7 GoogleAPI Emulator@8.1'
  'saucelabs:Google Pixel GoogleAPI Emulator@7.0'
  'saucelabs:chrome@41.0:linux'
danielfigueiredo commented 5 years ago

These are all things available through

./node_modules/.bin/testcafe --list-browsers saucelabs or https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/

AndreyBelym commented 5 years ago

I can't reproduce the problem. Sometimes Saucelabs can return this error if it is overloaded. You can contact Saucelabs support and provide this error message.

jwineman commented 5 years ago

Hi @AndreyBelym,

Originally I opened a support ticket with SauceLabs and the last response was:

John,

We currently don't have official support for TestCafe. But here are some articles I found on how to set up TestCafe to place tests on Sauce Laba platforms:
https://www.devexpress.com/Support/Center/Question/Details/T119616/testcafe-how-to-use-saucelabs
https://github.com/DevExpress/testcafe-browser-provider-saucelabs
https://devexpress.github.io/testcafe/documentation/recipes/running-tests-using-travis-ci-and-sauce-labs.html

Regards,

TJ

Previously they had asked about opening the tunnel in verbose mode:

Can you start a Sauce Connect Tunnel with the -v tag and send those logs as well?
Thanks,

TJ

If I see this error in the future are you aware of a way to modify the plugin to open the tunnel in verbose mode so we can debug further with them?

jwineman commented 5 years ago

I sent saucelabs support this thread and they replied with the following:

Unfortunately this is not an issue of Sauce Labs being overloaded, exactly.  What appears to be happening is that you are attempting to run four tests at once, but your concurrency limit is set at two.​​

The tests are attempting to start but can not because they are in queue, then, by the time they are able to run, the test that had opened the tunnel closes the tunnel.  They are pulled out of the queue and start, but there is no active tunnel to run them on.  The solution to this is to set up your tests to run a maximum of two tests at a time rather than four at once.  You could also increase your concurrency by upgrading your plan.

Let me know if this helps. Below I give some examples of the tests that are attempting to share a tunnel. 

Thanks,

TJ

It looks like I can't pass -c 4 when the account only allows two tests at a time. I havent been able to test yet though.

richardxia commented 5 years ago

I'd like to reopen the discussion in this thread since my SauceLabs runs have been failing since the same day that this ticket was opened, and it definitely isn't due to concurrency because I'm not setting it to anything and my account has a limit of 5.

I can actually provide a lot of information because this is an open source repo, and the source code and the builds on Travis CI are public.

https://github.com/ShelterTechSF/askdarcel-web/pull/683 is an example of a pull request which is failing, where the Travis CI build logs show the following error message from running testcafe:

> testcafe "saucelabs:Chrome@beta:Windows 10" "--quarantine-mode" "--skip-js-errors" "--assertion-timeout" "50000" "--page-load-timeout" "15000" "--selector-timeout" "15000" "testcafe/config.js" "testcafe/editResource.js" "testcafe/home.js" "testcafe/listings.js" "testcafe/newResource.js" "testcafe/service.js"
Error: [init({"name":"all","build":"build-2083.1","tunnelIdentifier":1554181232300,"idleTimeout":1000,"browserName":"chrome","version":"beta","platform":"windows 10"})] The environment you requested was unavailable.
    at /home/travis/build/ShelterTechSF/askdarcel-web/node_modules/wd/lib/webdriver.js:134:15
    at Request._callback (/home/travis/build/ShelterTechSF/askdarcel-web/node_modules/wd/lib/http-utils.js:88:7)
    at Request.self.callback (/home/travis/build/ShelterTechSF/askdarcel-web/node_modules/wd/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/travis/build/ShelterTechSF/askdarcel-web/node_modules/wd/node_modules/request/request.js:1081:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/travis/build/ShelterTechSF/askdarcel-web/node_modules/wd/node_modules/request/request.js:1001:12)
    at Object.onceWrapper (events.js:313:30)

I have been able to reproduce this locally as well, and I figured out a way to patch the saucelabs-connect library in my node_modules/ directory to enable verbose logging. I did two things:

  1. In https://github.com/AlexanderMoskovkin/saucelabs-connector/blob/acb62206791a3b307c646ca7a641ab8be107d495/src/index.js#L61-L67, I added verboseDebugging: true, which is actually the option that passes the --verbose flag to Sauce Connect.
  2. In https://github.com/AlexanderMoskovkin/saucelabs-connector/blob/acb62206791a3b307c646ca7a641ab8be107d495/src/index.js#L56, I changed tunnelLogging to default to true, which enabled writing the logs to a file named something like sc_1554183192256.log.

With these two manual patches to the library, I was able to run testcafe and receive the following error message:

> ShelterTech@1.0.0 testcafe /usr/src/app
> testcafe "--skip-js-errors" "saucelabs:Chrome@beta:Windows 10" "--skip-js-errors" "./testcafe/config.js" "./testcafe/editResource.js" "./testcafe/home.js" "./testcafe/listings.js" "./testcafe/newResource.js" "./testcafe/service.js"

⠴
Error: [init({"tunnelIdentifier":1554183192256,"idleTimeout":1000,"browserName":"chrome","version":"beta","platform":"windows 10"})] The environment you requested was unavailable.
    at /usr/src/app/node_modules/wd/lib/webdriver.js:134:15
    at Request._callback (/usr/src/app/node_modules/wd/lib/http-utils.js:88:7)
    at Request.self.callback (/usr/src/app/node_modules/wd/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/src/app/node_modules/wd/node_modules/request/request.js:1081:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/src/app/node_modules/wd/node_modules/request/request.js:1001:12)
    at Object.onceWrapper (events.js:313:30)

This created a log file (sc_1554183192256.log) with the following info:

2019-04-02 05:33:12.298 [34] Sauce Connect 4.5.3, build 4602 4b3da11 
2019-04-02 05:33:12.299 [34] ***********************************************************
2019-04-02 05:33:12.299 [34] Note: logging in verbose mode.
2019-04-02 05:33:12.300 [34] ***********************************************************
2019-04-02 05:33:12.300 [34] Using CA certificate bundle /etc/ssl/certs/ca-certificates.crt.
2019-04-02 05:33:12.300 [34] Using CA certificate verify path /etc/ssl/certs.
2019-04-02 05:33:12.300 [34] Trying to autodetect proxy settings
2019-04-02 05:33:12.301 [34] Starting client
2019-04-02 05:33:12.301 [34] Starting up; pid 34
2019-04-02 05:33:12.304 [34] Command line arguments: /usr/src/app/node_modules/sauce-connect-launcher/sc/sc-4.5.3-linux/bin/sc -u sheltertech-richard -k **** --tunnel-identifier 1554183192256 --direct-domains *.google.com,*.gstatic.com,*.googleapis.com --verbose --logfile sc_1554183192256.log --readyfile /tmp/sc-launcher-readyfile 
2019-04-02 05:33:12.307 [34] Log file: sc_1554183192256.log
2019-04-02 05:33:12.308 [34] Pid file: /tmp/sc_client-1554183192256.pid
2019-04-02 05:33:12.308 [34] Timezone: UTC GMT offset: 0h
2019-04-02 05:33:12.308 [34] Using no proxy for connecting to Sauce Labs REST API.
2019-04-02 05:33:12.535 [34] REST call https://saucelabs.com/versions.json -> 200 OK took 226ms
2019-04-02 05:33:12.536 [34] PROXY *** scproxy started ***
2019-04-02 05:33:12.544 [34] PROXY found DNS server 127.0.0.11
2019-04-02 05:33:12.554 [34] PROXY setting rate limit read=0 write=0
2019-04-02 05:33:12.587 [34] Started scproxy on port 37609.
2019-04-02 05:33:12.587 [34] Please wait for 'you may start your tests' to start your tests.
2019-04-02 05:33:12.702 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels?full=1 -> 200 OK took 115ms
2019-04-02 05:33:12.742 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels?full=1 -> 200 OK took 38ms
2019-04-02 05:33:12.802 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels?full=1 -> 200 OK took 60ms
2019-04-02 05:33:19.386 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels -> 200 OK took 6616ms
2019-04-02 05:33:19.415 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 28ms
2019-04-02 05:33:20.449 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 33ms
2019-04-02 05:33:21.485 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 34ms
2019-04-02 05:33:22.514 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 27ms
2019-04-02 05:33:23.539 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 24ms
2019-04-02 05:33:24.564 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 24ms
2019-04-02 05:33:25.592 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 26ms
2019-04-02 05:33:26.625 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 33ms
2019-04-02 05:33:27.655 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 29ms
2019-04-02 05:33:28.688 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 31ms
2019-04-02 05:33:29.714 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 25ms
2019-04-02 05:33:30.740 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 24ms
2019-04-02 05:33:30.741 [34] Secure remote tunnel VM provisioned.
2019-04-02 05:33:30.741 [34] Tunnel ID: ca86c8f22df940dda7269effdce7dd94
2019-04-02 05:33:30.741 [34] KGP host IP 162.222.75.25 KGP host name maki81218.miso.saucelabs.com 
2019-04-02 05:33:30.741 [34] Using no proxy for connecting to tunnel VM.
2019-04-02 05:33:30.742 [34]  *** libsauceconnect started ***
2019-04-02 05:33:30.750 [34] Starting Selenium listener...
2019-04-02 05:33:30.750 [34] Establishing secure TLS connection to tunnel...
2019-04-02 05:33:30.751 [34] MAIN using system DNS servers
2019-04-02 05:33:30.756 [34] [EVDNS] Added nameserver 127.0.0.11:53 as 0x7f470c00d460
2019-04-02 05:33:30.762 [34] MAIN created client listener on port 4445
2019-04-02 05:33:30.772 [34] MAIN connecting to maki81218.miso.saucelabs.com - 162.222.75.25:443
2019-04-02 05:33:30.815 [34] MAIN connecting to KGP server maki81218.miso.saucelabs.com took 35 ms
2019-04-02 05:33:30.856 [34] KGP -> announcement metadata={"username":"sheltertech-richard","access_key":"****"}
2019-04-02 05:33:30.859 [34] KGP <- announcement 55 bytes, metadata: {"last_seen_seq": 0}
2019-04-02 05:33:30.860 [34] KGP <- last seen seq no. from announcement 0
2019-04-02 05:33:30.877 [34] KGP <- conn=0 seq=1 ack=0 ctrl=0 len=1
2019-04-02 05:33:30.878 [34] KGP -> keepalive ack conn=0 seq=1 ack=0 ctrl=0 len=1
2019-04-02 05:33:31.001 [34] Selenium listener started on port 4445.
2019-04-02 05:33:31.864 [34] KGP -> keepalive conn=0 seq=1 ack=0 ctrl=0 len=1
2019-04-02 05:33:31.877 [34] KGP <- conn=0 seq=2 ack=0 ctrl=0 len=1
2019-04-02 05:33:31.882 [34] KGP -> keepalive ack conn=0 seq=2 ack=0 ctrl=0 len=1
2019-04-02 05:33:31.886 [34] KGP <- conn=0 seq=1 ack=0 ctrl=0 len=1
2019-04-02 05:33:32.006 [34] Sauce Connect is up, you may start your tests.
2019-04-02 05:33:32.006 [34] Connection established.
2019-04-02 05:33:32.040 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94/connected -> 200 OK took 34ms
2019-04-02 05:33:32.858 [34] KGP -> keepalive conn=0 seq=2 ack=0 ctrl=0 len=1
2019-04-02 05:33:32.873 [34] KGP <- conn=0 seq=2 ack=0 ctrl=0 len=1
2019-04-02 05:33:32.913 [34] KGP <- conn=0 seq=3 ack=0 ctrl=0 len=1
2019-04-02 05:33:32.917 [34] KGP -> keepalive ack conn=0 seq=3 ack=0 ctrl=0 len=1
2019-04-02 05:33:33.753 [34] KGP <- conn=2147483649 seq=1 ack=0 ctrl=0 len=0
2019-04-02 05:33:33.762 [34] PROXY 127.0.0.1:46666 -> connection established
2019-04-02 05:33:33.762 [34] CHANNEL 2147483649 created new channel
2019-04-02 05:33:33.769 [34] CHANNEL -> 2147483649 sent 0 bytes
2019-04-02 05:33:33.774 [34] KGP <- conn=2147483649 seq=2 ack=0 ctrl=0 len=270
2019-04-02 05:33:33.787 [34] CHANNEL -> 2147483649 sent 270 bytes
2019-04-02 05:33:33.792 [34] CHANNEL 2147483649 connected to ext server
2019-04-02 05:33:33.800 [34] PROXY 127.0.0.1:46666 HTTP header 'User-Agent': 'curl/7.35.0'
2019-04-02 05:33:33.805 [34] PROXY 127.0.0.1:46666 HTTP header 'Accept': '*/*'
2019-04-02 05:33:33.807 [34] PROXY 127.0.0.1:46666 HTTP header 'Host': 'localhost:8888'
2019-04-02 05:33:33.808 [34] PROXY 127.0.0.1:46666 HTTP header 'Via': '1.1 maki81218 (squid/4.0.24)'
2019-04-02 05:33:33.808 [34] PROXY 127.0.0.1:46666 HTTP header 'Cache-Control': 'max-age=0'
2019-04-02 05:33:33.810 [34] PROXY 127.0.0.1:46666 HTTP header 'Connection': 'keep-alive'
2019-04-02 05:33:33.812 [34] PROXY 127.0.0.1:46666 HTTP header 'X-SL-Tunnel-ID': 'ca86c8f22df940dda7269effdce7dd94'
2019-04-02 05:33:33.814 [34] PROXY 127.0.0.1:46666 HTTP header 'X-SL-Chef-IP': '127.0.0.1'
2019-04-02 05:33:33.816 [34] PROXY 127.0.0.1:46666 connecting to URI http://localhost:8888/debug/vars host localhost:8888
2019-04-02 05:33:33.818 [34] PROXY resolved 'localhost' to '127.0.0.1'
2019-04-02 05:33:33.820 [34] PROXY 127.0.0.1:46666 (127.0.0.1) -> HEAD http://localhost:8888/debug/vars (270 bytes)
2019-04-02 05:33:33.822 [34] PROXY 127.0.0.1:46666 (127.0.0.1) <- localhost:8888 connection established
2019-04-02 05:33:33.829 [34] CHANNEL <- 2147483649 read 103 bytes
2019-04-02 05:33:33.838 [34] KGP -> packet conn=2147483649 seq=1 ack=2 ctrl=0 len=103
2019-04-02 05:33:33.857 [34] KGP -> keepalive conn=0 seq=3 ack=2 ctrl=0 len=1
2019-04-02 05:33:33.871 [34] KGP <- conn=2147483649 seq=3 ack=1 ctrl=0 len=269
2019-04-02 05:33:33.881 [34] CHANNEL -> 2147483649 sent 269 bytes
2019-04-02 05:33:33.887 [34] KGP <- conn=0 seq=4 ack=1 ctrl=0 len=1
2019-04-02 05:33:33.887 [34] KGP -> keepalive ack conn=0 seq=4 ack=3 ctrl=0 len=1
2019-04-02 05:33:33.888 [34] KGP <- conn=0 seq=3 ack=1 ctrl=0 len=1
2019-04-02 05:33:33.888 [34] PROXY 127.0.0.1:46666 HTTP header 'User-Agent': 'curl/7.35.0'
2019-04-02 05:33:33.895 [34] PROXY 127.0.0.1:46666 HTTP header 'Accept': '*/*'
2019-04-02 05:33:33.897 [34] PROXY 127.0.0.1:46666 HTTP header 'Host': 'localhost:8888'
2019-04-02 05:33:33.898 [34] PROXY 127.0.0.1:46666 HTTP header 'Via': '1.1 maki81218 (squid/4.0.24)'
2019-04-02 05:33:33.901 [34] PROXY 127.0.0.1:46666 HTTP header 'Cache-Control': 'max-age=0'
2019-04-02 05:33:33.903 [34] PROXY 127.0.0.1:46666 HTTP header 'Connection': 'keep-alive'
2019-04-02 05:33:33.905 [34] PROXY 127.0.0.1:46666 HTTP header 'X-SL-Tunnel-ID': 'ca86c8f22df940dda7269effdce7dd94'
2019-04-02 05:33:33.907 [34] PROXY 127.0.0.1:46666 HTTP header 'X-SL-Chef-IP': '127.0.0.1'
2019-04-02 05:33:33.914 [34] PROXY 127.0.0.1:46666 connecting to URI http://localhost:8888/debug/vars host localhost:8888
2019-04-02 05:33:33.919 [34] PROXY 127.0.0.1:46666 (127.0.0.1) -> GET http://localhost:8888/debug/vars (269 bytes)
2019-04-02 05:33:33.933 [34] CHANNEL <- 2147483649 read 4096 bytes
2019-04-02 05:33:33.937 [34] KGP -> packet conn=2147483649 seq=2 ack=3 ctrl=0 len=4096
2019-04-02 05:33:33.941 [34] CHANNEL <- 2147483649 read 686 bytes
2019-04-02 05:33:33.944 [34] KGP -> packet conn=2147483649 seq=3 ack=3 ctrl=0 len=686
2019-04-02 05:33:34.860 [34] KGP -> keepalive conn=0 seq=4 ack=3 ctrl=0 len=1
2019-04-02 05:33:34.883 [34] KGP <- conn=0 seq=4 ack=3 ctrl=0 len=1
2019-04-02 05:33:34.889 [34] KGP <- conn=0 seq=5 ack=3 ctrl=0 len=1
2019-04-02 05:33:34.893 [34] KGP -> keepalive ack conn=0 seq=5 ack=3 ctrl=0 len=1
2019-04-02 05:33:35.863 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 120ms
2019-04-02 05:33:35.862 [34] KGP -> keepalive conn=0 seq=5 ack=3 ctrl=0 len=1
2019-04-02 05:33:35.880 [34] KGP <- conn=0 seq=6 ack=3 ctrl=0 len=1
2019-04-02 05:33:35.885 [34] KGP -> keepalive ack conn=0 seq=6 ack=3 ctrl=0 len=1
2019-04-02 05:33:35.892 [34] KGP <- conn=0 seq=5 ack=3 ctrl=0 len=1
2019-04-02 05:33:36.863 [34] KGP -> keepalive conn=0 seq=6 ack=3 ctrl=0 len=1
2019-04-02 05:33:36.882 [34] KGP <- conn=0 seq=7 ack=3 ctrl=0 len=1
2019-04-02 05:33:36.887 [34] KGP -> keepalive ack conn=0 seq=7 ack=3 ctrl=0 len=1
2019-04-02 05:33:36.892 [34] KGP <- conn=0 seq=6 ack=3 ctrl=0 len=1
2019-04-02 05:33:37.866 [34] KGP -> keepalive conn=0 seq=7 ack=3 ctrl=0 len=1
2019-04-02 05:33:37.883 [34] KGP <- conn=0 seq=8 ack=3 ctrl=0 len=1
2019-04-02 05:33:37.890 [34] KGP -> keepalive ack conn=0 seq=8 ack=3 ctrl=0 len=1
2019-04-02 05:33:37.897 [34] KGP <- conn=0 seq=7 ack=3 ctrl=0 len=1
2019-04-02 05:33:38.867 [34] KGP -> keepalive conn=0 seq=8 ack=3 ctrl=0 len=1
2019-04-02 05:33:38.885 [34] KGP <- conn=0 seq=9 ack=3 ctrl=0 len=1
2019-04-02 05:33:38.890 [34] KGP -> keepalive ack conn=0 seq=9 ack=3 ctrl=0 len=1
2019-04-02 05:33:38.896 [34] KGP <- conn=0 seq=8 ack=3 ctrl=0 len=1
2019-04-02 05:33:39.873 [34] KGP -> keepalive conn=0 seq=9 ack=3 ctrl=0 len=1
2019-04-02 05:33:39.886 [34] KGP <- conn=0 seq=10 ack=3 ctrl=0 len=1
2019-04-02 05:33:39.892 [34] KGP -> keepalive ack conn=0 seq=10 ack=3 ctrl=0 len=1
2019-04-02 05:33:39.898 [34] KGP <- conn=0 seq=9 ack=3 ctrl=0 len=1
2019-04-02 05:33:40.771 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 28ms
2019-04-02 05:33:40.874 [34] KGP -> keepalive conn=0 seq=10 ack=3 ctrl=0 len=1
2019-04-02 05:33:40.887 [34] KGP <- conn=0 seq=11 ack=3 ctrl=0 len=1
2019-04-02 05:33:40.892 [34] KGP -> keepalive ack conn=0 seq=11 ack=3 ctrl=0 len=1
2019-04-02 05:33:40.901 [34] KGP <- conn=0 seq=10 ack=3 ctrl=0 len=1
2019-04-02 05:33:41.875 [34] KGP -> keepalive conn=0 seq=11 ack=3 ctrl=0 len=1
2019-04-02 05:33:41.891 [34] KGP <- conn=0 seq=12 ack=3 ctrl=0 len=1
2019-04-02 05:33:41.897 [34] KGP -> keepalive ack conn=0 seq=12 ack=3 ctrl=0 len=1
2019-04-02 05:33:41.904 [34] KGP <- conn=0 seq=11 ack=3 ctrl=0 len=1
2019-04-02 05:33:42.879 [34] KGP -> keepalive conn=0 seq=12 ack=3 ctrl=0 len=1
2019-04-02 05:33:42.891 [34] KGP <- conn=0 seq=13 ack=3 ctrl=0 len=1
2019-04-02 05:33:42.895 [34] KGP -> keepalive ack conn=0 seq=13 ack=3 ctrl=0 len=1
2019-04-02 05:33:42.906 [34] KGP <- conn=0 seq=12 ack=3 ctrl=0 len=1
2019-04-02 05:33:43.853 [34] KGP -> keepalive conn=0 seq=13 ack=3 ctrl=0 len=1
2019-04-02 05:33:43.860 [34] KGP <- conn=0 seq=14 ack=3 ctrl=0 len=1
2019-04-02 05:33:43.866 [34] KGP -> keepalive ack conn=0 seq=14 ack=3 ctrl=0 len=1
2019-04-02 05:33:43.874 [34] KGP <- conn=0 seq=13 ack=3 ctrl=0 len=1
2019-04-02 05:33:44.856 [34] KGP -> keepalive conn=0 seq=14 ack=3 ctrl=0 len=1
2019-04-02 05:33:44.866 [34] KGP <- conn=0 seq=15 ack=3 ctrl=0 len=1
2019-04-02 05:33:44.873 [34] KGP -> keepalive ack conn=0 seq=15 ack=3 ctrl=0 len=1
2019-04-02 05:33:44.897 [34] KGP <- conn=0 seq=14 ack=3 ctrl=0 len=1
2019-04-02 05:33:45.736 [34] REST call https://saucelabs.com/rest/v1/sheltertech-richard/tunnels/ca86c8f22df940dda7269effdce7dd94 -> 200 OK took 28ms
2019-04-02 05:33:45.858 [34] KGP <- conn=0 seq=16 ack=3 ctrl=0 len=1
2019-04-02 05:33:45.859 [34] KGP -> keepalive ack conn=0 seq=16 ack=3 ctrl=0 len=1
2019-04-02 05:33:45.862 [34] KGP -> keepalive conn=0 seq=15 ack=3 ctrl=0 len=1
2019-04-02 05:33:45.883 [34] KGP <- conn=0 seq=15 ack=3 ctrl=0 len=1
2019-04-02 05:33:46.851 [34] KGP -> keepalive conn=0 seq=16 ack=3 ctrl=0 len=1
2019-04-02 05:33:46.874 [34] KGP <- conn=0 seq=17 ack=3 ctrl=0 len=1
2019-04-02 05:33:46.879 [34] KGP -> keepalive ack conn=0 seq=17 ack=3 ctrl=0 len=1
2019-04-02 05:33:46.892 [34] KGP <- conn=0 seq=16 ack=3 ctrl=0 len=1
2019-04-02 05:33:47.852 [34] KGP -> keepalive conn=0 seq=17 ack=3 ctrl=0 len=1
2019-04-02 05:33:47.861 [34] KGP <- conn=0 seq=18 ack=3 ctrl=0 len=1
2019-04-02 05:33:47.868 [34] KGP -> keepalive ack conn=0 seq=18 ack=3 ctrl=0 len=1
2019-04-02 05:33:47.879 [34] KGP <- conn=0 seq=17 ack=3 ctrl=0 len=1
2019-04-02 05:33:48.867 [34] KGP -> keepalive conn=0 seq=18 ack=3 ctrl=0 len=1
2019-04-02 05:33:48.870 [34] KGP <- conn=0 seq=19 ack=3 ctrl=0 len=1
2019-04-02 05:33:48.872 [34] KGP -> keepalive ack conn=0 seq=19 ack=3 ctrl=0 len=1
2019-04-02 05:33:48.896 [34] KGP <- conn=0 seq=18 ack=3 ctrl=0 len=1
2019-04-02 05:33:49.828 [34] Got signal terminated
2019-04-02 05:33:49.862 [34] KGP <- conn=0 seq=20 ack=3 ctrl=0 len=1
2019-04-02 05:33:49.870 [34] KGP -> keepalive ack conn=0 seq=20 ack=3 ctrl=0 len=1
2019-04-02 05:33:49.871 [34] KGP -> keepalive conn=0 seq=19 ack=3 ctrl=0 len=1
2019-04-02 05:33:49.905 [34] KGP <- conn=0 seq=19 ack=3 ctrl=0 len=1

I'm not exactly sure what's going on, but based on the stack trace from testcafe, I don't think there's an issue with Sauce Connect, and I think there's something strange with how WebDriver is interacting with SauceLabs.

richardxia commented 5 years ago

And sorry if this isn't the best place to record this information. I've also filed a support ticket to SauceLabs, and I can report back here if I hear about a solution.

richardxia commented 5 years ago

The feedback I got from SauceLabs was to specify a specific version of Chrome, such as "73.0", instead of targeting "beta" because oftentimes the beta channels will break compatibility with Selenium/WebDriver. Setting the version to "73.0" fixed the issue for me, but I'd like to target a rolling version that is stable so that we stay current with the latest browser releases.

According to the SauceLabs docs, it should be possible to use the strings "latest", "latest-1", "latest-2" to target the latest stable releases of Chrome or Firefox. However, when I try using one of those strings, I get the following message, which I think is coming from TestCafe itself:

ERROR Unable to find the browser. "saucelabs:Chrome@latest-1:Windows 10" is not a browser alias or path to an executable file.

I'll file a separate ticket about being able to select the "latest" browser versions.

AndreyBelym commented 5 years ago

@jwineman thank you for sharing this information, I will try to reproduce it on my side.

@richardxia yes, I guess incompatibilities between a new browser version and an older WebDriver can cause such issues. This provider uses wd.js under the hood. Maybe we should add a clear troubleshooting message that if a problem can be reproduced with wd.js, it's on the WebDriver/SauceLabs side?

jwineman commented 5 years ago

Follow up - This issue was resolved for me by removing -c=4. We only pay for one saucelabs connection so it was erroring trying to create four I guess.

AlexSkorkin commented 5 years ago

@jwineman,

Thank you for the update. I'm happy to hear that you have figured out how to resolve the issue.

doup commented 4 years ago

I was having an issue and noticed that the session was actually starting in Sauce Labs but it had an error. If that's the case you can check the error in the Metadata tab, Error key. In my case I had a wrong screen resolution.

Also, if your region is Europe you'll need to set: SAUCE_API_HOST="eu-central-1.saucelabs.com".