I’ve tried all sorts of setups including phantomJs, selenium standalone server, and now using sauce connect to hit saucelabs. the builds work perfectly fine locally, but always time out / error when running on circle-ci. the WEIRD part is if I ssh in and run phpunit myself, it works perfectly fine. I cannot duplicate this ssh’ed in at all, they always rune fine. i’ve tried all sort of sleeps and timeout extensions to give everything as much time as needed. no luck
here is the setup:
failed build https://circleci.com/gh/acidjazz/basal/86
the actual error
1) Tests\Browser\LoginTest::testClientAdd
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http GET to /session/d18207b0747f4149a30ceb8c2fb7c73d/screenshot
Operation timed out after 120000 milliseconds with 0 bytes received
/home/ubuntu/basal/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:287
/home/ubuntu/basal/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:597
/home/ubuntu/basal/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:373
/home/ubuntu/basal/vendor/laravel/dusk/src/Browser.php:206
/home/ubuntu/basal/vendor/laravel/dusk/src/TestCase.php:158
/home/ubuntu/basal/vendor/laravel/framework/src/Illuminate/Support/Collection.php:244
/home/ubuntu/basal/vendor/laravel/dusk/src/TestCase.php:159
/home/ubuntu/basal/vendor/laravel/dusk/src/TestCase.php:92
/home/ubuntu/basal/tests/Browser/LoginTest.php:89
my circle.yml
machine:
timezone:
America/Los_Angeles
php:
version: 7.0.4
environment:
ENVIRONMENT: testing
APP_ENV: testing
APP_DEBUG: true
APP_URL: http://127.0.0.1:8000
dependencies:
pre:
- pecl install mongodb
- echo "extension=mongodb.so" > /opt/circleci/php/7.0.4/etc/conf.d/mongodb.ini
- printf "\n" | pecl install yaml-2.0.0
- echo "extension=yaml.so" > /opt/circleci/php/7.0.4/etc/conf.d/yaml.ini
- composer install --no-interaction
- npm i --prefix vendor/acidjazz/larpug/node/
- wget https://saucelabs.com/downloads/sc-4.4.4-linux.tar.gz
- tar -xzf sc-4.4.4-linux.tar.gz
test:
override:
- php ./artisan serve:
background: true
- cd sc-4.4.4-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready:
background: true
# Wait for tunnel to be ready
- while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
- ./vendor/bin/phpunit