Forum

gitlab, docker, lar...
 
Notifications
Clear all

gitlab, docker, laravel dusk test error: google-chrome is no longer running

1 Posty
1 Users
0 Likes
623 Widok
0
Topic starter
[1651578273.027][INFO]: Launching chrome: /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --headless --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.7VKWGi/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.jHEfuJ --window-size=1920,1080 data:,
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Failed to generate minidump.[1651578273.824][INFO]: [bbb227ba7060c51f47bd14b64322c2c9] RESPONSE InitSession ERROR 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.)
[1651578273.824][DEBUG]: Log type 'driver' lost 0 entries on destruction
[1651578273.824][DEBUG]: Log type 'browser' lost 0 entries on destruction
1 Answer
0
Topic starter

Edit tests/DuskTestCase.php

and add '--no-sandbox'  or try with "Use Docker-in-Docker with privileged mode"

example

    protected function driver()
    {
        $options = (new ChromeOptions)->addArguments(collect([
            '--window-size=1920,1080',
        ])->unless($this->hasHeadlessDisabled(), function ($items) {
            return $items->merge([
                '--disable-gpu',
                '--headless',
                '--disable-dev-shm-usage',
                '--no-sandbox'
            ]);
        })->all());

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: