browserstack / nightwatch-browserstack

Selenium examples for Nightwatch and BrowserStack Automate
https://www.browserstack.com
77 stars 62 forks source link

Running local example hang #11

Open blanchecarstens03 opened 7 years ago

blanchecarstens03 commented 7 years ago

Good Day

We are running the following command behind a private firewall, which means we sometimes experience SSL cert issues.

NODE_TLS_REJECT_UNAUTHORIZED=0 BROWSERSTACK_ACCESS_KEY=XXX npm run local
> nightwatch-browserstack@0.1.0 local /home/vagrant/projects/nightwatch-browserstack
> ./scripts/local.runner.js -c conf/local.conf.js

Connecting local
/home/vagrant/.browserstack/BrowserStackLocal

The command does not respond and just hangs. Please advise how we go about debugging this so we can resolve and progress.

We look forward to hearing back from you soonest. Regards Blanché

blanchecarstens03 commented 7 years ago

As a follow-up to my initial issue we did some debugging.

We ran the following command

NODE_TLS_REJECT_UNAUTHORIZED=0 /home/vagrant/.browserstack/BrowserStackLocal -d start -logFile /home/vagrant/projects/nightwatch-browserstack/local.log XXX

The "hanging issue" persists.....

ujwalp1994 commented 7 years ago

Hey,

Could you please share your BrowserStack email ID at support@browserstack.com? It will help us debug the issue.

Thanks. :)

blanchecarstens03 commented 7 years ago

Blanche.carstens@allangray.co.za

On 10 Nov 2016 15:16, "ujwalp1994" notifications@github.com wrote:

Hey,

Could you please share your BrowserStack email ID at support@browserstack.com? It will help us debug the issue.

Thanks. :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/browserstack/nightwatch-browserstack/issues/11#issuecomment-259687099, or mute the thread https://github.com/notifications/unsubscribe-auth/ASVOVjkZozVqeQbhyNCLX0blDHy_Yq60ks5q8xkcgaJpZM4KsUbn .

blanchecarstens03 commented 7 years ago

Hi We are using the examples exactly as is from - https://github.com/browserstack/nightwatch-browserstack

Logs:

BrowserStackLocal v6.5

BrowserStackLocal v6.5

*\ Error: Could not connect to www.browserstack.com!

To test an internal server, run: ./BrowserStackLocal --key Example: ./BrowserStackLocal --key DsVSdoJPBi2z44sbGFx1

To test HTML files, run: ./BrowserStackLocal --key --folder Example: ./BrowserStackLocal --key DsVSdoJPBi2z44sbGFx1 --folder /Applications/MAMP/htdocs/example/

home/vagrant/projects/nightwatch-browserstack/scripts/local.runner.js:16 if (error) throw error; ^ LocalError: Could not connect to www.browserstack.com! at /home/vagrant/projects/nightwatch-browserstack/node_modules/browserstack-local/lib/Local.js:61:20 at ChildProcess.exithandler (child_process.js:193:7) at emitTwo (events.js:100:13) at ChildProcess.emit (events.js:185:7) at maybeClose (internal/child_process.js:827:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

ujwalp1994 commented 7 years ago

Hey Blanché,

Are you still facing this issue?

brendanorourke commented 7 years ago

I was unable to reproduce the error on my end; however, the error:

Could not connect to www.browserstack.com!

Generally implies firewall and/or proxy configurations are necessary to allow outbound connections to *.browserstack.com on ports 80,443.

Please ensure that these are properly configured to allow the above. Details on the mechanics of the local connection can be found here.

To demonstrate how to route the local connection through a proxy, I’ve created a fork here. Just update ./conf/local.conf.js with the proxy details, and see ./scripts/local.runner.js for how they are passed.

If you’re still running into issues and are able to provide more detail surrounding the network from which you’re running the tests, please include those in an e-mail to support@browserstack.com.