Closed thomi137 closed 2 years ago
Just as an update. Found out that the problem seems to lie with the php version in sail. It uses 8.1.6 where this issue occurs. A problem with Ubuntu 22.04 moving its OpenSSL version. Still. I could go to php 8.2, but the tests still do not run because the selenium server is not started and the autoloader does not seem to find Laravel\Dusk\Browser.
I can run sail artisan dusk:install
just fine. However, when I run sail dusk
I get the below:
$ sail dusk ~/Sites/example-app
PHPUnit 9.5.24 #StandWithUkraine
E 1 / 1 (100%)
Time: 01:20.197, Memory: 22.00 MB
There was 1 error:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\SessionNotCreatedException: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'cefd4c64ab3a', ip: '172.23.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.16'
Driver info: driver.version: unknown
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'cefd4c64ab3a', ip: '172.23.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.16'
Driver info: driver.version: unknown
/var/www/html/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:125
/var/www/html/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:372
/var/www/html/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:131
/var/www/html/tests/DuskTestCase.php:46
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:219
/var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php:243
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:220
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:98
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:66
/var/www/html/tests/Browser/ExampleTest.php:21
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
Wondering if this has anything to do with the v7 release of Dusk...
I can run Dusk normally on a non-Sail Laravel app so moving this issue to the Sail repo.
I managed to get it to work for me with the Apple Silicon one: https://laravel.com/docs/9.x/sail#selenium-on-apple-silicon
If you need further help please try a support channel:
Description:
Following the instructions, I get
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000126:SSL routines::unexpected eof while reading
at vendor/laravel/dusk/src/Console/ChromeDriverCommand.php:226 222▕ if ($this->option('proxy')) { 223▕ $streamOptions['http'] = ['proxy' => $this->option('proxy'), 'request_fulluri' => true]; 224▕ } 225▕ ➜ 226▕ return trim(file_get_contents($this->latestVersionUrl, false, stream_context_create($streamOptions))); 227▕ } 228▕ 229▕ /* 230▕ Detect the installed Chrome / Chromium major version.
28 artisan:37 Illuminate\Foundation\Console\Kernel::handle()
Steps To Reproduce:
run artisan dusk:install
Working on macOS 13