theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 309 forks source link

SauceLabsTunnel Error: Failed to start Selenium listener #285

Closed zanona closed 10 years ago

zanona commented 10 years ago

Hey guys, I am using the same configurations as in per the tutorial however, when trying to run test with my SauceLabs free OSS account locally and I get:

$ intern-runner config=tests/intern.js 
Listening on 0.0.0.0:9000
Starting tunnel...
Using no proxy for connecting to Sauce Labs REST API.
Started scproxy on port 56202.
Starting secure remote tunnel VM...
Secure remote tunnel VM provisioned.
Tunnel ID: 99d01c76f00c4c75819f8fc2d3759322
Secure remote tunnel VM is now: running
Remote tunnel host is: maki78116.miso.saucelabs.com
Using no proxy for connecting to tunnel VM.
Starting Selenium listener...
Establishing secure TLS connection to tunnel...
Cleaning up.
Finished! Deleting tunnel.
Error: Failed to start Selenium listener (exit code 2).
Error: Failed to start Selenium listener (exit code 2).
  at reject  <../../Dropbox/Mackup/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:354:17>
  at readStartupMessage  <../../Dropbox/Mackup/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:382:12>
  at <../../Dropbox/Mackup/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:435:12>
  at Array.some  <native>
  at Socket.<anonymous>  <../../Dropbox/Mackup/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:429:21>
  at Socket.emit  <events.js:117:20>
  at Socket.<anonymous>  <_stream_readable.js:764:14>
  at Socket.emit  <events.js:92:17>
  at emitReadable_  <_stream_readable.js:426:10>
  at emitReadable  <_stream_readable.js:422:5>
$

One interesting thing is that I am also using codeship.io to automate tests on push to github repo and from their server it seems to work fine.

Is there any specific configuration I should set locally (mac) to make it work?

Thanks

vladikoff commented 10 years ago

Also experiencing this issue with latest Sauce Labs Tunnel sc tool.

neonstalwart commented 10 years ago

do you have anything listening on port 4444? i just had the same problem and fixed it by stopping my local selenium server.

zanona commented 10 years ago

@neonstalwart nothing running on 4444 unfortunately.

$ lsof -wni tcp:4444
$ 

I don't have selenium locally installed as well, if that helps.

vladikoff commented 10 years ago

@zanona Try downgrading to 2.0.1, I bet it will work

zanona commented 10 years ago

Hey guys, that persists even on 2.0.1, I have installed sc tool and apparently there is a firewall error since that is not connecting as well. I assume this issue might be with SauceLabs connect itself and not intern. I will try to get in touch with them.

Thanks for your help.

d48 commented 9 years ago

hey @zanona, did you ever find out what this issue was? I'm running intern-tutorial version 2.0.0 that uses intern version 2.1.1 and get the exact same thing above

zanona commented 9 years ago

@d48 unfortunately I haven't found the issue. Since it was on my local machine and I was fine running tests remotely, which seemed to work without problems.

d48 commented 9 years ago

thanks for the info @zanona. will post if I find anything

d48 commented 9 years ago

Just to give context, when I initially ran intern-runner, I got this error:

Listening on 0.0.0.0:9000
Starting tunnel...
Using no proxy for connecting to Sauce Labs REST API.
Started scproxy on port 57603.
Starting secure remote tunnel VM...
Secure remote tunnel VM provisioned.
Tunnel ID: 4f6deb05a2614d75acd7fdac6b2d9814
Secure remote tunnel VM is now: booting
Secure remote tunnel VM is now: running
Remote tunnel host is: maki76037.miso.saucelabs.com
Using no proxy for connecting to tunnel VM.
Starting Selenium listener...
Establishing secure TLS connection to tunnel...
Selenium listener started on port 4444.
Connection established.
Ready
SyntaxError: Unexpected token .
  at Function.vm.runInThisContext  <node_modules/intern/node_modules/istanbul/lib/hook.js:163:16>
  at <node_modules/intern/node_modules/dojo/dojo.js:760:8>
  at <fs.js:266:14>
  at Object.oncomplete  <fs.js:107:15>

And then when re-running intern-runner, I got same error as original post. I don't know the cause of the initial error in hook.js. Hopefully someone can give some insight.

d48 commented 9 years ago

@zanona I had some error in my functional test syntax. copy and pasting what they had on Step 5 made the tests run fine locally so the issue was my typing. The error was masked because when re-running intern-runner it gave me error like you noted originally. For anyone else getting this, make sure no other errors are reported initially

kmoe commented 9 years ago

I'm still getting the "Failed to start Selenium listener" error too.

kmoe commented 9 years ago

Fixed it by killing the process on port 4444.

d48 commented 9 years ago

@kmoe that's what I had to do as well as it attached to the port on the initial run and blocked it