drupalextension icon indicating copy to clipboard operation
drupalextension copied to clipboard

Update from 4.1.0 to 4.2.1, getting error "Unable to create new service"

Open ptmkenny opened this issue 3 years ago • 0 comments

After updating from 4.1.0 to 4.2.1, I'm getting the following error:

  ╳  Could not open connection: Unable to create new service: GeckoDriverService
  ╳  Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
  ╳  System info: host: '99c84240a43f', ip: '172.20.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.102.1-microsoft-standard-WSL2', java.version: '1.8.0_292'
  ╳  Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException)

This is puzzling because I'm using chrome, not firefox.

Here's the command I'm using to test:

/app/vendor/bin/behat /app/tests/behat/features/ -c /app/tests/behat/behat-lando-selenium.yml --tags '@ci' --format pretty --out std --format html --out /app/tests/reports --profile profile_chrome

And here's the content of behat-lando-selenium.yml:

#
# behat.yml file for testing on lando with selenium.
#
default:
  suites:
    default:
      paths:
        - "%paths.base%/features/ci"
        - "%paths.base%/features/site_audit"
      contexts:
        - FeatureContext
        - CustomDrupalFeatureContext
        - CustomMinkContext
        - Drupal\DrupalExtension\Context\DrushContext
        - Drupal\DrupalExtension\Context\MessageContext
        - Drupal\DrupalExtension\Context\RawDrupalContext
        - FailAid\Context\FailureContext
        - emuse\BehatHTMLFormatter\Context\ScreenshotContext:
            # "assets" needs to be within the reports output_path
            screenshotDir: /app/tests/reports/assets/screenshots
      formatters:
        html:
          # Where to put the HTML report
          output_path: /app/tests/reports
  extensions:
    emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension:
      name: html
      renderer: Twig
      print_args: true
      print_outp: true
      loop_break: true
    FailAid\Extension:
      output:
        url: true
        status: false
        tags: true
        feature: true
        context: true
        screenshot: true # Use with BehatHTMLFormatter to get giant screenshots.
        driver: true
        rerun: true
        debugBarSelectors: true
      screenshot:
        directory: /app/tests/reports/assets/screenshots
        hostUrl: https://example.lndo.site/
        mode: png
        autoClean: true
        size: 1280x6400
    Drupal\MinkExtension:
      # https://github.com/jhedstrom/drupalextension/issues/486
      ajax_timeout: 15
      # Default configuration has this commented out so it can be overidden.
      base_url: http://example.lndo.site/
      browser_name: chrome
      # For file uploads.
      files_path: /app/submodules/behat-media/behat-test-files
      sessions:
        default:
          goutte:
            guzzle_parameters:
              verify: false
    Drupal\DrupalExtension:
      blackbox: ~
      api_driver: 'drush'
      drush:
        root: '/app/vendor/bin/drush'
        alias: ''
      region_map:
        content: "#page-content"
      selectors:
        message_selector: '.message'

profile_chrome:
  extensions:
    Drupal\MinkExtension:
      browser_name: chrome
      sessions:
        javascript:
          selenium2:
            browser: chrome
            wd_host: http://seleniumchromedriver:4444/wd/hub
            capabilities:
              marionette: null
              browserName: chrome
              browser: chrome
              chrome:
                # https://stackoverflow.com/questions/48450594/selenium-timed-out-receiving-message-from-renderer/52340526
                switches:
                  - "start-maximized" # https://stackoverflow.com/a/26283818/1689770
                  - "automation" # https://stackoverflow.com/a/43840128/1689770
                  - "--no-sandbox" # https://stackoverflow.com/a/50725918/1689770
                  - "--disable-infobars" # //https://stackoverflow.com/a/43840128/1689770
                  - "--disable-dev-shm-usage" # https://stackoverflow.com/a/50725918/1689770
                  - "--disable-browser-side-navigation" # https://stackoverflow.com/a/49123152/1689770
                  - "--disable-gpu"  # https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc
                  - "--disable-web-security"
                  - "--disable-extensions"
                  - "--dns-prefetch-disable"

I'm not sure what's wrong because this exact configuration works fine on 4.1.0.

ptmkenny avatar Jun 10 '22 14:06 ptmkenny