Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running Laravel Dusk tests on multiple setup laradock #2795

Closed
florianstancioiu opened this issue Dec 14, 2020 · 7 comments
Closed

Comments

@florianstancioiu
Copy link

Description:

First off, I'm using the multiple setup laradock.
When I run php artisan dusk, I get a unknown error: net::ERR_CONNECTION_REFUSED error.
I updated the .env file with WORKSPACE_INSTALL_DUSK_DEPS set to true and the workspace has been rebuilt with no cache.
I changed the tests/DuskTestCase.php driver method to use the following options for chrome:

        [
            '--no-sandbox',
            '--disable-gpu',
            '--headless',
            '--verbose',
            '--window-size=1920,1080',
        ]

(basically I added --no-sandbox and --verbose).
If I remove the --no-sandbox option. I get a different error (it doesn't even start), I get:
Facebook\WebDriver\Exception\UnknownErrorException: unknown error: Chrome failed to start: crashed. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.),

The laravel .env variable APP_URL is set correctly.

Expected Behavior:

To run the default test successfully

Context information:

Output of git rev-parse HEAD

872c2b9eb132a49872e09923462bdf3da8cace6a

Output of docker version

Client: Docker Engine - Community
 Version:           20.10.0
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        7287ab3
 Built:             Tue Dec  8 18:59:40 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.0
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       eeddea2
  Built:            Tue Dec  8 18:57:45 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker-compose version

docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.5
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020

System info: Mac, Windows or Linux. Include which disto/version

Linux - Ubuntu
Linux glados 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce the issue:

  1. set WORKSPACE_INSTALL_DUSK_DEPS=true
  2. rebuild workspace
  3. try php artisan dusk in laradock workspace

Stacktrace & Additional info:

1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\UnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED
  (Session info: headless chrome=87.0.4280.88)

/var/www/laragenerator2/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:139
/var/www/laragenerator2/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:371
/var/www/laragenerator2/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:612
/var/www/laragenerator2/vendor/php-webdriver/webdriver/lib/Remote/RemoteExecuteMethod.php:27
/var/www/laragenerator2/vendor/php-webdriver/webdriver/lib/WebDriverNavigation.php:41
/var/www/laragenerator2/vendor/laravel/dusk/src/Browser.php:153
/var/www/laragenerator2/tests/Browser/ExampleTest.php:19
/var/www/laragenerator2/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68
/var/www/laragenerator2/tests/Browser/ExampleTest.php:21

@stale
Copy link

stale bot commented Mar 15, 2021

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Mar 15, 2021
@djohnnyboy
Copy link

has anyone was able to fix this issue ???

@stale stale bot removed the Stale label Mar 18, 2021
@omordach
Copy link

I got the same error.

Facebook\WebDriver\Exception\UnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED (Session info: headless chrome=90.0.4430.85)

ChromeDriver 90.0.4430.24
Google Chrome 90.0.4430.212

Laravel Framework 7.30.4

Docker version 20.10.6, build 370c289
docker-compose version 1.29.1, build c34c88b2

@PiotrekPKP
Copy link

Also, same error with Docker installed

@stale
Copy link

stale bot commented Nov 5, 2021

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Nov 5, 2021
@stale
Copy link

stale bot commented Nov 26, 2021

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Nov 26, 2021
@rmsite
Copy link

rmsite commented May 15, 2022

Has anyone managed to run dusk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants