Circle CI 2.0 Chromedriver error

I’m getting the following chromedriver error in our tests while trying to migrate to 2.0. This number seems to change every test so it appears to be CircleCi Related.

unknown error: Devtools port number file contents <37329> were in an unexpected format

Please find our Circle.yml below:

# This configuration was automatically generated from a CircleCI 1.0 config.
# It should include any build commands you had along with commands that CircleCI
# inferred from your project structure. We strongly recommend you read all the
# comments in this file to understand the structure of CircleCI 2.0, as the idiom
# for configuration has changed substantially in 2.0 to allow arbitrary jobs rather
# than the prescribed lifecycle of 1.0. In general, we recommend using this generated
# configuration as a reference rather than using it in production, though in most
# cases it should duplicate the execution of your original 1.0 config.
version: 2
jobs:
build:
working_directory: ~/virtuosolearning/virtuoso
parallelism: 3
shell: /bin/bash --login
# CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
environment:
...
# In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages.
# In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images.
# The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job.
# We have selected a pre-built image that mirrors the build environment we use on
# the 1.0 platform, but we recommend you choose an image more tailored to the needs
# of each job. For more information on choosing an image (or alternatively using a
# VM instead of a container) see https://circleci.com/docs/2.0/executor-types/
# To see the list of pre-built images that CircleCI provides for most common languages see
# https://circleci.com/docs/2.0/circleci-images/
docker:
- image: circleci/ruby:2.3.3-node-browsers # ...with this image as the primary container; this is where all `steps` will run
environment: # environment variables for primary container
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
PGHOST: 127.0.0.1
PGUSER: circleci-demo-ruby
RAILS_ENV: test
- image: circleci/postgres:9.5-alpine # database image
environment: # environment variables for database
POSTGRES_USER: virtuoso
POSTGRES_DB: virtuoso
POSTGRES_PASSWORD: ""
steps:
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
- run:
name: Which bundler?
command: bundle -v

- restore_cache:
keys:
- rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
- rails-demo-bundle-v2-

- run:
name: Bundle Install
command: bundle check || bundle install

# Store bundle cache
- save_cache:
key: rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:5432 -timeout 1m

- run: |-
mkdir -p config && echo 'test:
adapter: postgresql
encoding: unicode
database: virtuoso
pool: 5
username: virtuoso
host: localhost
' > config/database.yml

- run:
name: Database setup
command: bin/rails db:schema:load --trace

- restore_cache:
keys:
- asset-cache-v1-{{ arch }}-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- asset-cache-v1-{{ arch }}-{{ .Branch }}
- asset-cache-v1

- run: bundle exec rake assets:precompile

- save_cache:
key: asset-cache-v1-{{ arch }}-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- public/assets
- tmp/cache/assets/sprockets
# Save dependency cache
# - save_cache:
# key: v1-dep-{{ .Branch }}-{{ epoch }}
# paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
# - vendor/bundle
# - ~/virtualenvs
# - ~/.m2
# - ~/.ivy2
# - ~/.bundle
# - ~/.go_workspace
# - ~/.gradle
# - ~/.cache/bower
# The following line was run implicitly in your 1.0 builds based on what CircleCI inferred about the structure of your project. In 2.0 you need to be explicit about which commands should be run. In some cases you can discard inferred commands if they are not relevant to your project.
# - run:
# command: bundle exec rake db:create db:schema:load --trace
# environment:
# RAILS_ENV: test
# RACK_ENV: test
# Test
# This would typically be a build job when using workflows, possibly combined with build
# The following line was run implicitly in your 1.0 builds based on what CircleCI inferred about the structure of your project. In 2.0 you need to be explicit about which commands should be run. In some cases you can discard inferred commands if they are not relevant to your project.
- run:
command: |
bundle exec rspec --profile 10 \
--out test_results/rspec.xml \
--format Fuubar \
--color \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)

# bundle exec rspec --format Fuubar --color --format progress spec

environment:
RAILS_ENV: test
RACK_ENV: test
# This is based on your 1.0 configuration file or project settings
- run: bundle exec rake RAILS_ENV=test visual_regression:post_to_spectre
# Deployment
# Your existing circle.yml file contains deployment steps.
# The config translation tool does not support translating deployment steps
# since deployment in CircleCI 2.0 are better handled through workflows.
# See the documentation for more information 
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
- store_test_results:
path: test_results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results

How did you solve this?

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