browserstack / browserstack-local-nodejs

NodeJS bindings for BrowserStack Local
https://www.browserstack.com
MIT License
71 stars 56 forks source link

Error: Could not connect to start! #31

Closed davidtheclark closed 7 years ago

davidtheclark commented 7 years ago

Given a simple use-case:

const bsLocal = new browserstack.Local();
bsLocal.start({ key: MY_BROWSERSTACK_KEY }, () => { .. })

I hit the following error:

SyntaxError: Unexpected token B in JSON at position 0
    at Object.parse (native)
    at /Users/davidclark/dev/mapbox/www.mapbox.com/node_modules/browserstack-local/lib/Local.js:50:23
    at ChildProcess.exithandler (child_process.js:197:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:498:12)

I tried logging stdout at the relevant line (https://github.com/browserstack/browserstack-local-nodejs/blob/ca7920b749ba16a0aed00ac07bf1e8f8d0005189/lib/Local.js#L50), and see this:

BrowserStackLocal v6.1

 *** Error: Could not connect to start!

Configuration Options:
-v
     Provides verbose logging
... and more of that

I am trying to follow the instructions in the README — but right now the module seems unusable. Am I doing something wrong, or is this a bug?

punitx commented 7 years ago

@davidtheclark Sorry for the late reply. Is this still an issue for you?

davidtheclark commented 7 years ago

No, I guess not! On v1.3.0 and not seeing the error.