diff --git a/package.json b/package.json index 7fe21b6c32ec..4acdba1a528e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@types/minimist": "^1.1.28", "@types/node": "^6.0.34", "@types/run-sequence": "0.0.27", - "browserstacktunnel-wrapper": "^1.4.2", + "browserstacktunnel-wrapper": "^2.0.0", "conventional-changelog": "^1.1.0", "express": "^4.14.0", "firebase-tools": "^2.2.1", diff --git a/scripts/browserstack/start_tunnel.js b/scripts/browserstack/start_tunnel.js index cae1738541d5..18adf136fad2 100644 --- a/scripts/browserstack/start_tunnel.js +++ b/scripts/browserstack/start_tunnel.js @@ -34,7 +34,12 @@ var tunnel = new BrowserStackTunnel({ }); console.log('Starting tunnel on ports', PORTS.join(', ')); -tunnel.start(function(error) { + +// Emit a `newer_available` event to force an update of the Browserstack binaries (necessary due to Travis caching) +// This also starts a new tunnel after the latest binaries are available. +tunnel.emit('newer_available'); + +tunnel.once('started', function(error) { if (error) { console.error('Can not establish the tunnel', error); } else {