Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Laravel Dusk cannot access Chromedriver on Alpine

A December 24, 2021

I was trying to set up Laravel Dusk on Alpine. It works properly on the local without selenium driver just run only 2 thing

  • Install chromium and chromium-chromedriver
  • Run /usr/bin/chromedriver
  • Run php artisan serve
  • Run php artisan dusk

Next, configure the same with bitbucket-pipelines.yml

script:
- apk add --update --no-cache libzip git mysql-client chromium chromium-chromedriver
- apk add --update --no-cache --virtual .build-deps $PHPIZE_DEPS libxml2-dev jpeg-dev libzip-dev
- docker-php-ext-install bcmath pcntl opcache zip pdo_mysql
- pecl install redis && docker-php-ext-enable redis
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- cp configs/env.pipelines code/.env
- cd code
- composer install -vvv
- php artisan key:generate
- php artisan fixer:fix --dry-run
- php artisan insights --no-interaction
- ./vendor/bin/phpstan analyze app/ --memory-limit=2G
- ./vendor/bin/phpunit -vvv
- /usr/bin/chromedriver &
- php artisan serve --no-reload &
- curl -vk http://localhost:9515
- curl -vk http://localhost:8000/sorry
- php artisan dusk
services:
- database
- redis

I've found pipelines can connect to http://127.0.0.1:8000, but cannot connect to http://127.0.0.1:9515 (Chromedriver)

+ php artisan dusk
Warning: TTY mode requires /dev/tty to be read/writable.
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.
[ Fri Dec 24 21:04:00 2021 ] 127.0.0.1:59748 Closing
EE 2 / 2 (100%)
Time:
00:01.178, Memory: 22.00 MB
There were 2 errors:
1) Tests\Browser\SorryTest::testSorryPageShouldContainValidInfoInThai
Facebook\WebDriver\Exception\UnknownErrorException:
unknown error: net::ERR_NAME_NOT_RESOLVED
(Session info: headless chrome=93.0.4577.82)

Anyone please help or suggest to me. 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events