0

I am having issues trying to get browserstack-local to work having followed documentation on their site.

In my beforeLaunch I have:

console.log("Connecting local");
return new Promise(function(resolve, reject){
    exports.bs_local = new browserstack.Local();
    exports.bs_local.start({'key': exports.config.capabilities['browserstack.key'] }, function(error) {
        if (error) return reject(error);
        console.log('Connected. Now testing...');

        resolve();
    });
});

When attempting to run my protractor script, I get the following error:

Connecting local
C:\Users\rparker\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js
:155
                throw e;
                ^

Error: spawn UNKNOWN
    at exports._errnoException (util.js:1018:11)
    at ChildProcess.spawn (internal/child_process.js:319:11)
    at exports.spawn (child_process.js:378:9)
    at Object.exports.execFile (child_process.js:143:15)
    at C:\Users\rparker\Documents\GitHub\interACT\node_modules\browserstack-loca
l\lib\Local.js:33:34
    at LocalBinary.binaryPath (C:\Users\rparker\Documents\GitHub\interACT\node_m
odules\browserstack-local\lib\LocalBinary.js:83:7)
    at Local.getBinaryPath (C:\Users\rparker\Documents\GitHub\interACT\node_modu
les\browserstack-local\lib\Local.js:228:19)
    at Local.start (C:\Users\rparker\Documents\GitHub\interACT\node_modules\brow
serstack-local\lib\Local.js:28:10)
    at C:\Users\rparker\Documents\GitHub\interACT\test\protractor-ie.conf.js:34:
24
    at beforeLaunch (C:\Users\rparker\Documents\GitHub\interACT\test\protractor-
ie.conf.js:32:12)

I don't think I have missed out any steps, can anyone suggest what may me up?

Thanks

mindparse
  • 6,115
  • 27
  • 90
  • 191
  • Could you confirm that there are no other running instances of BrowserStackLocal? Alternatively, you can add the "--force" option while creating the Local Testing connection. The code snippet is "bs_local_args = { 'key': '', 'force': 'true' }". This will terminate any previous running instance of the binary while starting a new one. – Mukesh Tiwari May 25 '17 at 12:10
  • Thanks I actually have a support ticket open with browserstack where they said the same thing. I tried with the force flag but it made no difference, still getting same error – mindparse May 25 '17 at 12:19

0 Answers0