From bd774d39cabff21638c2e428d89a3881698b34f1 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 24 Apr 2019 11:07:41 -0700 Subject: [PATCH 1/3] Use correct ChromeDriver --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 537bd2c78..cc54062fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,12 @@ before_install: - "export CHROMEDRIVER_BINARY=/usr/bin/google-chrome" - "export CHROMEDRIVER_ARGS=--no-sandbox" - "/usr/bin/google-chrome --version" + - "export CHROME_LATEST_VERSION=$(/usr/bin/google-chrome --version | cut -d' ' -f3 | cut -d'.' -f1)" + - "export CHROME_DRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_LATEST_VERSION)" - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - - "wget http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip" - - unzip chromedriver_linux64.zip + - "wget https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip" + - "unzip chromedriver_linux64.zip" - "export PATH=$PATH:$PWD" jobs: From aee49f159a1f6789941334437f1cc0fe7fb585dd Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 24 Apr 2019 12:15:57 -0700 Subject: [PATCH 2/3] Don't save chrome profile cache --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc54062fc..cb8c2bce6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,4 +62,5 @@ branches: cache: directories: - "$HOME/.pub-cache" - - example/.dart_tool + - example/.dart_tool/build + - example/.dart_tool/pub From 66dc17b6c3ee8867ab776e499ac0466067bd8e73 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 24 Apr 2019 12:18:18 -0700 Subject: [PATCH 3/3] add chrome timeout --- webdev/lib/src/serve/chrome.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webdev/lib/src/serve/chrome.dart b/webdev/lib/src/serve/chrome.dart index 87a4aac36..096725da5 100644 --- a/webdev/lib/src/serve/chrome.dart +++ b/webdev/lib/src/serve/chrome.dart @@ -87,7 +87,10 @@ class Chrome { await process.stderr .transform(utf8.decoder) .transform(const LineSplitter()) - .firstWhere((line) => line.startsWith('DevTools listening')); + .firstWhere((line) => line.startsWith('DevTools listening')) + .timeout(Duration(seconds: 60), + onTimeout: () => + throw Exception('Unable to connect to Chrome DevTools.')); return _connect(Chrome._( port,