Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium Failing #180

Open
antarr opened this issue Jun 30, 2023 · 1 comment
Open

Selenium Failing #180

antarr opened this issue Jun 30, 2023 · 1 comment

Comments

@antarr
Copy link

antarr commented Jun 30, 2023

I'm getting this error when running on github actions.

Selenium::WebDriver::Error::UnknownError:
            unknown error: Chrome failed to start: exited abnormally.
              (unknown error: DevToolsActivePort file doesn't exist)
              (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

.github/workflow/ci.yml

name: Tests
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true
permissions:
  contents: read
  pull-requests: write
jobs:
  rspec:
    env:
      RAILS_ENV: test
      DATABASE_URL: mysql2://root:[email protected]:3306/rails_development
      RUBYOPT: -EUTF-8
      SELENIUM_CHROME_HEADLESS: true
    runs-on: ubuntu-latest
    services:
      mysql:
        image: mysql:8.0
        env:
          MYSQL_DATABASE: rails_development
          MYSQL_ROOT_PASSWORD: password
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
    steps:
      - uses: actions/checkout@v3
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler-cache: true
      - name: Install Node
        uses: actions/setup-node@v1
        with:
          node-version: 14
      - name: Configure database
        run: |
          cp config/ci.database.yml config/database.yml
          cp config/ci.config.yml config/config.yml
          bundle exec rake db:structure:load db:migrate
 ##      - uses: browser-actions/setup-chrome@latest
 ##       with:
 ##         chrome-version: stable
      - name: Download chrome driver
        uses: nanasess/setup-chromedriver@master
      - name: Launch chrome driver
        run: |
          export DISPLAY=:99
          chromedriver --url-base=/wd/hub &
          sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
      - name: Run Rspec Tests
        run: |
          bundle exec rspec spec --format progress
      - uses: reviewdog/action-setup@v1
        with:
          reviewdog_version: latest
      - uses: aki77/delete-pr-comments-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          bodyContains: "[undercover]"
          noReply: "true"
      - name: Run Undercover via Reviewdog
        env:
          REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          git fetch --no-tags
          reviewdog -reporter=github-pr-review -runners=undercover
@nanasess
Copy link
Owner

@antarr
Is selenium-webdriver ruby binding?
What version of selenium are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants