Codeception: Updating codeception to latest version and running the test I get this exeception.[Facebook\WebDriver\Exception\SessionNotCreatedException] Unable to create new service: GeckoDriverService

What are you trying to achieve?

I am trying to run the test on Chrome and Firefox browser using selenium standalone server.

What do you get instead?

This is the output from my console.

[Facebook\WebDriver\Exception\SessionNotCreatedException] Unable to create new service: GeckoDriverService
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'krupa.local', ip: '192.168.0.100', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_111'
Driver info: driver.version: unknown  
     

Provide test source code if related This is my Sample cept file -

<?php
    $I = new AcceptanceTester($scenario);
    $I->wantTo('perform actions and see result');
    $I->amOnPage('/');
    $I->wait(10);
?>

Details

  • Codeception version: 2.3.6
  • PHP Version: 5.6.3
  • Operating System: Mac OSx
  • Installation type: Composer
  • List of installed packages (composer show)
antecedent/patchwork               2.1.5   Method redefinition (monkey-patc...
bacon/bacon-string-utils           1.1.0   BaconStringUtils contain utitili...
behat/gherkin                      v4.4.5  Gherkin DSL parser for PHP 5.3
codeception/codeception            2.3.6   BDD-style testing framework
composer/ca-bundle                 1.0.8   Lets you find a path to the syst...
composer/composer                  1.5.2   Composer helps you declare, mana...
composer/semver                    1.4.2   Semver library that offers utili...
composer/spdx-licenses             1.1.6   SPDX licenses list and validatio...
dg/mysql-dump                      v1.4.0  MySQL database dump.
doctrine/inflector                 v1.1.0  Common String Manipulations with...
doctrine/instantiator              1.0.5   A small, lightweight utility to ...
facebook/webdriver                 1.4.1   A PHP client for Selenium WebDriver
guzzlehttp/guzzle                  6.3.0   Guzzle is a PHP HTTP client library
guzzlehttp/promises                v1.3.1  Guzzle promises library
guzzlehttp/psr7                    1.4.2   PSR-7 message implementation tha...
hautelook/phpass                   0.3.3   Portable PHP password hashing fr...
illuminate/contracts               v5.4.36 The Illuminate Contracts package.
illuminate/support                 v5.4.36 The Illuminate Support package.
justinrainbow/json-schema          5.2.4   A library to validate a json sch...
lucatume/codeception-setup-local   1.0.3   Flexible local setup for Codecep...
lucatume/wp-browser                1.21.18 WordPress extension of the PhpBr...
lucatume/wp-browser-commons        1.2.8.2 Common libraries of the WP-Brows...
mikemclin/laravel-wp-password      2.0.0   Laravel package that checks and ...
mustache/mustache                  v2.12.0 A Mustache implementation in PHP.
myclabs/deep-copy                  1.6.1   Create deep copies (clones) of y...
nb/oxymel                          v0.1.0  A sweet XML builder
paragonie/random_compat            v2.0.11 PHP 5.x polyfill for random_byte...
phpdocumentor/reflection-common    1.0.1   Common reflection classes used b...
phpdocumentor/reflection-docblock  3.2.2   With this component, a library c...
phpdocumentor/type-resolver        0.3.0   
phpspec/prophecy                   v1.7.2  Highly opinionated mocking frame...
phpunit/php-code-coverage          4.0.8   Library that provides collection...
phpunit/php-file-iterator          1.4.2   FilterIterator implementation th...
phpunit/php-text-template          1.2.1   Simple template engine.
phpunit/php-timer                  1.0.9   Utility class for timing
phpunit/php-token-stream           1.4.11  Wrapper around PHP's tokenizer e...
phpunit/phpunit                    5.7.22  The PHP Unit Testing framework.
phpunit/phpunit-mock-objects       3.4.4   Mock Object library for PHPUnit
psr/container                      1.0.0   Common Container Interface (PHP ...
psr/http-message                   1.0.1   Common interface for HTTP messages
psr/log                            1.0.2   Common interface for logging lib...
ramsey/array_column                1.1.3   Provides functionality for array...
rmccue/requests                    v1.7.0  A HTTP library written in PHP, f...
sebastian/code-unit-reverse-lookup 1.0.1   Looks up which function or metho...
sebastian/comparator               1.2.4   Provides the functionality to co...
sebastian/diff                     1.4.3   Diff implementation
sebastian/environment              2.0.0   Provides functionality to handle...
sebastian/exporter                 2.0.0   Provides the functionality to ex...
sebastian/global-state             1.1.1   Snapshotting of global state
sebastian/object-enumerator        2.0.1   Traverses array structures and o...
sebastian/recursion-context        2.0.0   Provides functionality to recurs...
sebastian/resource-operations      1.0.0   Provides a list of PHP built-in ...
sebastian/version                  2.0.1   Library that helps with managing...
seld/cli-prompt                    1.0.3   Allows you to prompt for user in...
seld/jsonlint                      1.6.1   JSON Linter
seld/phar-utils                    1.0.1   PHAR file format utilities, for ...
stecman/symfony-console-completion 0.7.0   Automatic BASH completion for Sy...
symfony/browser-kit                v3.3.10 Symfony BrowserKit Component
symfony/config                     v3.3.10 Symfony Config Component
symfony/console                    v3.3.10 Symfony Console Component
symfony/css-selector               v3.3.10 Symfony CssSelector Component
symfony/debug                      v3.3.10 Symfony Debug Component
symfony/dependency-injection       v3.3.10 Symfony DependencyInjection Comp...
symfony/dom-crawler                v3.3.10 Symfony DomCrawler Component
symfony/event-dispatcher           v3.3.10 Symfony EventDispatcher Component
symfony/filesystem                 v2.8.28 Symfony Filesystem Component
symfony/finder                     v3.3.10 Symfony Finder Component
symfony/polyfill-mbstring          v1.5.0  Symfony polyfill for the Mbstrin...
symfony/process                    v2.8.28 Symfony Process Component
symfony/translation                v3.3.10 Symfony Translation Component
symfony/yaml                       v3.3.10 Symfony Yaml Component
webmozart/assert                   1.2.0   Assertions to validate method in...
wp-cli/autoload-splitter           v0.1.5  Composer plugin for splitting a ...
wp-cli/cache-command               v1.0.3  Manage object and transient caches.
wp-cli/checksum-command            v1.0.3  Verifies file integrity by compa...
wp-cli/config-command              v1.1.5  Manage the wp-config.php file.
wp-cli/core-command                v1.0.3  Download, install, update and ma...
wp-cli/cron-command                v1.0.3  Manage WP-Cron events and schedu...
wp-cli/db-command                  v1.2.1  Perform basic database operation...
wp-cli/entity-command              v1.1.0  Manage WordPress core entities.
wp-cli/eval-command                v1.0.3  Execute arbitrary PHP code.
wp-cli/export-command              v1.0.3  Export WordPress content to a WX...
wp-cli/extension-command           v1.1.3  Manage WordPress plugins and the...
wp-cli/import-command              v1.0.4  Import content from a WXR file.
wp-cli/language-command            v1.0.4  Manage language packs.
wp-cli/media-command               v1.1.0  Import new attachments or regene...
wp-cli/mustangostang-spyc          0.6.3   A simple YAML loader/dumper clas...
wp-cli/package-command             v1.0.5  Manage WP-CLI packages.
wp-cli/php-cli-tools               v0.11.7 Console utilities for PHP
wp-cli/rewrite-command             v1.0.3  Manage rewrite rules.
wp-cli/role-command                v1.0.3  Manage user roles and capabilities.
wp-cli/scaffold-command            v1.0.8  Generate code for post types, ta...
wp-cli/search-replace-command      v1.0.4  Search/replace strings in the da...
wp-cli/server-command              v1.0.7  Launch PHP's built-in web server...
wp-cli/shell-command               v1.0.3  Opens an interactive PHP console...
wp-cli/super-admin-command         v1.0.3  Lists, adds, or removes super ad...
wp-cli/widget-command              v1.0.3  Manage widgets and sidebars.
wp-cli/wp-cli                      v1.3.0  A command line interface for Wor...
xamin/handlebars.php               v0.10.4 Handlebars processor for php
  • Suite configuration:
# paste suite config here
class_name: AcceptanceTester
modules:
    enabled:
        - \Helper\Acceptance
        - WPWebDriver
    config:
        WPWebDriver:
            browser: 'firefox'
            url: 'http://demo.rtmedia.io/'
            adminUsername: ''
            adminPassword: ''
            adminPath: '/wp-admin'

NOTE : Same issue happens with chrome driver.

Chrome Driver version - 2.33 Gecko Driver version - 0.18

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (6 by maintainers)

Most upvoted comments

I am using the recent Codeception 2.3.6 with the recent Selenium Standalone Server 3.6.0 and the recent ChromeDriver 2.33 by setting the ChromeDriver path explicitly in the corresponding parameter when starting Selenium Standalone Server, e.g.

java -Dwebdriver.chrome.driver=./chromedriver.exe -jar selenium-server-standalone-3.6.0.jar

As @Naktibalda said, try to set the correct absolute or relative path to the ChromeDriver file.

@kjnanda you are using Linux also? Try to modify your localhost line with : 127.0.0.1 localhost you have 1270 instead of 127 (maybe it will work)

Also you can erase your Chromedriver and use these commands to install it again: wget -N http://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip -P ~/ unzip ~/chromedriver_linux64.zip -d ~/ rm ~/chromedriver_linux64.zip sudo mv -f ~/chromedriver /usr/local/bin/chromedriver sudo chown root:root /usr/local/bin/chromedriver sudo chmod 0755 /usr/local/bin/chromedriver

Adding below entry in my hosts file resolved this issue for me. Thanks @dianaolaru 127.0.0.1 localhost

I’m having the same problmem: [Facebook\WebDriver\Exception\SessionNotCreatedException] Unable to create new service: ChromeDriverService Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z' System info: host: 'diana-Altex', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-97-generic', java.version: '1.8.0_144' Driver info: driver.version: unknown

I tried to run all the selenium versions from 3.4 to 3.5.3 and I get the same error. If I try on firefox I get the same error. And If I try with 3.3 selenium version I get the error: [Facebook\WebDriver\Exception\UnknownServerException] Unable to find a free port

I’m using ubuntu, so I think I don’t need to set the path… I don’t know what to do anymore… please help