14

I am running the BrowserStackTunnel.jar by the grunt plugin grunt-exec

(Have been using node's child_process.exec, but same results)

with the command java -jar BrowserStackTunnel.jar -force APIKEY localhost,8000,false

What the Java file actualy does is connecting via ssh to an Amazon instance of Browserstack and opening a port on 45691, the website of browserstack is polling that port on localhost where the Java application serves a small snippet containing the params passed.

If i run the command from the CLI it works fine and i see the port beeing open on netstat. In the browserstack website i get the success screen.

But if i run the command from grunt-exec it shows only the SYN request.

The output to the command line is the same, both show success

I am not so sure what is causing this. I am running on windows7, node v0.10.12, grunt-cli v0.1.9, grunt v0.4.1 and grunt exec v0.4.2

Any idea what is causing this or how to debug it? I thought about a permission problem, but i am kind of clueless

pfried
  • 4,520
  • 2
  • 35
  • 64

3 Answers3

1

Have you tried using the Browserstack Chrome Plugin? It was launched this january and allows you to test local files without running the cli tunnel.

Guilherme Rodrigues
  • 2,728
  • 1
  • 15
  • 22
1

I had the same problem and I realized, better if I use the BrowserStackLocal binary files for creating a tunel. I solved a quite complex configuration here: Ember.js - CircleCI - BrowserStack

BrowserStackLocal files are here: http://www.browserstack.com/local-testing (Binaries)

Community
  • 1
  • 1
Zoltan
  • 4,800
  • 1
  • 33
  • 39
  • the only downside is see is that it is only linux 64bit, but its okay for us since we do have our CI server on linux – pfried Aug 13 '14 at 12:23
  • 1
    There is 4 version of this binary: OS X (Lion, Mountain Lion, Mavericks), Linux 32-bit, Linux 64-bit, Windows. So, if you need 32 bit version, or would like to play on your mac or windows machine, could work. Give it a try. – Zoltan Aug 13 '14 at 21:08
-2

As soon as the child process is created, grunt moves on to the next command. If there is nothing, the grunt process terminates and takes the child with it.

Try adding a grunt-contrib-watch task after the grunt-exec call. It should keep the grunt process alive, and the child process with it.

Simon
  • 1