chrome not reachable - session not created: Chrome failed to start: exited normally

113 views Asked by At

I'm getting following error when trying to run tests using nightwatch on docker container (amazon linux 2): ** Docker Image**: public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:5.0

Error
agent_1  |      Response 500 POST /session (2109ms)
agent_1  |    {
agent_1  |      value: {
agent_1  |        error: 'session not created',
agent_1  |        message: 'session not created: Chrome failed to start: exited normally.\\n' +
agent_1  |          '  (chrome not reachable)\\n' +
agent_1  |          '  (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)',
agent_1  |        stacktrace: ''
agent_1  |      }
agent_1  |   }

I have already installed latest version of chrome before running tests. My nightwatch.conf.js file contains following options for chrome:

chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
          //
          // w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
          w3c: true,
          args: [
            '--headless',
            '--no-sandbox',
            '--silent',
            'disable-gpu',
            '--disable-blink-features=AutomationControlled',
            '--start-maximized',
            '--disable-dev-shm-usage',
            '--remote-debugging-port=9222'
          ]
        }
      },
    },

I have also tried running docker with --privileged option. Everything is working fine if i'm running my tests outside of docker container.

0

There are 0 answers