Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -60,4 +62,5 @@ branches:
cache:
directories:
- "$HOME/.pub-cache"
- example/.dart_tool
- example/.dart_tool/build
- example/.dart_tool/pub
5 changes: 4 additions & 1 deletion webdev/lib/src/serve/chrome.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down