Open joshski opened 6 years ago
Looking at the code, there seems to be a commented out bit that waits for evidence that the tunnel is actually started
I face this issue too. Getting around it locally by re-running the test is fine. But this has become a bigger problem for me since now I am trying to use Browserstack Local on TeamCity servers.
My work around was to use Pify. We use Typescript and async/awaits in our code.
if (capabilities['browserstack.local']) {
process.env.TARGET_URL = process.env.TEST_URL;
await pify(bsLocal.start.bind(bsLocal))({key: accessKey, verbose: 'true'});
info('Local session started, launching driver now');
} else {
// process.env.TARGET_URL = 'URL';
info('Normal Session Started');
}
The first time I run
./features/run/browserstack-memory
I see an error like thisWebDriverError: [browserstack.local] is set to true but local testing through BrowserStack is not connected.
...however the
browserstack-local-nodejs
package has started a local tunnel (and left it running, which seems broken too!):The second run passes. So it looks to me like browserstack-local calls it's callback before it's actually ready, or something.