skip to Main Content

I was using VirtualBox for development when i had a windows pc. Later i bought a Macbook M1 and installed the DDEV instead of VirtualBox.
In my old development virtualbox, i installed selenium and chromedriver in Virtualbox. With this setup i could run Codeception Tests.

Since i’m using DDEV for development, i tired to install Selenium-chromedriver with following tutorials:

https://dev.to/tomasnorre/codeception-ddev-selenium-docker-36kk

https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/Testing/ProjectTesting.html

My docker-compose.selenium.yaml File

version: '3.6'
services:
 selenium:
   container_name: ddev-${DDEV_SITENAME}-chrome
   image: selenium/standalone-chrome:latest
   environment:
     - VIRTUAL_HOST=$DDEV_HOSTNAME
     - HTTP_EXPOSE=4444
   external_links:
     - ddev-router:$DDEV_HOSTNAME

codeception.yaml File

# suite config
suites:
   acceptance:
       actor: AcceptanceTester
       path: .
       modules:
           enabled:
               - WebDriver:
                   url: http://test.ddev.site
                   host: ddev-test-chrome
                   browser: chrome
               - HelperAcceptance

I get following Error when i try to execute a Test in ddev ssh with php vendor/bin/codecept run tests/FirstCest.php


  [FacebookWebDriverExceptionSessionNotCreatedException] 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.1.1', revision: 'e8fcc2cecf'
System info: host: '4916a3762177', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.76-linuxkit', java.version: '11.0.13'
Driver info: driver.version: unknown
Build info: version: '4.1.1', revision: 'e8fcc2cecf'
System info: host: '4916a3762177', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.76-linuxkit', java.version: '11.0.13'
Driver info: driver.version: unknown

Is it possible, that the errors are related to M1-Chip or am i doing something wrong?

2

Answers


  1. The selenium/standalone-chrome image is not built for arm64 (Mac M1). In fact, the chrome package it probably derives from is not available at all for arm64.

    However, the chromium package is available for arm64. You may be able to use justinribeiro/chrome-headless:chromium, which is built for arm64.

    Also, take a look at https://github.com/drud/ddev-contrib/tree/master/docker-compose-services/headless-chrome, which has been updated to use the arm64 chromium image.

    Login or Signup to reply.
  2. This error message…

    Build info: version: '4.1.1', revision: 'e8fcc2cecf'
    System info: host: '4916a3762177', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.76-linuxkit', java.version: '11.0.13'
    Driver info: driver.version: unknown
    

    …implies that the ChromeDriver version wasn’t detected.

    Presumably the main issue is the incompatibility between the version of the binaries you are using.


    Solution

    Ensure that:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search