[Solved] CircleCi + Protractor => driver.version: unknown

I try to start my e2e test with protractor but when test start I have always this error

protractor test/e2e/protractor-conf.js --suite _0000_createPortal

[21:20:52] I/launcher - Running 1 instances of WebDriver

[21:20:52] I/hosted - Using the selenium server at http://localhost:4444/wd/hub

[21:20:52] E/launcher - Unable to create new service: ChromeDriverService

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'

System info: host: 'f9eabafd7a85', ip: '172.20.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-141-generic', java.version: '1.8.0_181'

Driver info: driver.version: unknown

[21:20:52] E/launcher - SessionNotCreatedError: Unable to create new service: ChromeDriverService

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'

System info: host: 'f9eabafd7a85', ip: '172.20.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-141-generic', java.version: '1.8.0_181'

Driver info: driver.version: unknown

I have tested multiple mean to update Chrome and ChromeDriver, but I have always this f**** error

Here my config
version: 2.1

jobs:
    build:
        docker:
            - image: circleci/node:11.2.0-stretch-browsers      
        working_directory: ~/repo

        steps:
            - checkout

            # Download and cache dependencies
            - restore_cache:
                keys:
                    - v1-dependencies-{{ checksum "package.json" }}
                    # fallback to using the latest cache if no exact match is found
                    - v1-dependencies-

            # Install dependencies
            - run: npm install

            - save_cache:
                paths:
                    - node_modules
                key: v1-dependencies-{{ checksum "package.json" }}

            # Build
            - run: npm run grunt-release


            - persist_to_workspace:
                # Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
                # taken to be the root directory of the workspace.
                root: ~/repo
                # Must be relative path from root
                paths:
                    - .

    test-e2e:
        docker:
            - image: circleci/node:11.2.0-stretch-browsers
        working_directory: ~/repo

        steps:
            - attach_workspace:
                at: ~/repo


            # # Install latest Chrome
            # - run: sudo ./test/e2e/install-latest-chrome.sh
            
            - run:
                name: Install latest version of Chrome
                command: |
                    sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
                    sudo sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
                    sudo apt-get update
                    sudo apt-get install google-chrome-unstable


            # # Install Chrome Dirver
            # - run: wget https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip
            # - run: unzip chromedriver_linux64.zip
            # - run: sudo cp chromedriver /usr/local/bin/chromedriver



            - run:
                name: Install latest version of ChromeDriver
                command: |
                    sudo wget https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip
                    sudo unzip chromedriver_linux64.zip
                    sudo rm chromedriver_linux64.zip
                    sudo mv chromedriver /usr/bin/
                    sudo chmod 777 /usr/bin/chromedriver
            


            # Update Webdriver manager
            - run: npm run update-webdriver


            - run:
                command: npm run start-webdriver
                background: true
            - run: sleep 5

            # - run:
            #     name: Wait for Mongo
            #     command: dockerize -wait tcp://localhost:27017 -timeout 1m
            # - run:
            #     name: Wait for Redis
            #     command: dockerize -wait tcp://localhost:6379 -timeout 1m

            - run:
                command: node main.js
                background: true
            - run:
                name: Wait for server
                command: dockerize -wait http://localhost:3000 -timeout 1m

            # Install mongo-org-tools to have mongoexport and mongoimport (need to prepare and export database)
            # - run: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
            # - run: echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
            # - run: sudo apt-get update
            # - run: sudo apt-get install mongodb-org-tools

            - run: npm run test-e2e-00-createPortal
          


    deploy_prod:
        ......


workflows:
    version: 2.1
    build_test_deploy:
        jobs:
            - build

            - test-e2e:
                requires:
                    - build

            - deploy_prod:
                requires:
                    - test
                    - test-api
                    - test-e2e
                filters:
                    branches:
                        only: master
1 Like

OK the bug come from my script.

the npm script “npm run update-webdriver” did an update on an older version.
I change this script to simply : webdriver-manager update

And instead install an unstable chrome version, I install a stable version.

Now all is OK.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.