Skip to content

Fails for latest stable Chrome 119 (119.0.6045.105) #243

Closed

Description

@kunalherkal

Fails with following error:

CHROME_VERSION=119
VERSION=119.0.6045.105
Downloading https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json...
Installing ChromeDriver 119.0.6045.105 for linux64
Downloading https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip
https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip...
Error: The process '/runner/_work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh' failed with exit code 3

Action usage:

    - name: Set up chromedriver
      uses: nanasess/setup-chromedriver@v2

Activity

  1. changed the title [-]Fails for latest stable Chrome (119.0.6045.105)[/-] [+]Fails for latest stable Chrome 119 (119.0.6045.105)[/+] on Nov 1, 2023
  2. robacarp commented on Jan 17, 2024

    @robacarp

    I ran into this issue when running my job with a container definition like this:

    jobs:
      test:
        runs-on: ubuntu-latest
        container:
          image: ruby:3.2.2

    But when I ran it without the container and installed ruby manually, it had no problem:

    jobs:
      test:
        runs-on: ubuntu-latest
        container:
          image: ruby:3.2.2
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
          - uses: ruby/setup-ruby@v1
            with:
              bundler-cache: true

    I suspect the issue is, the ruby container is missing some dependency that the scripts herein depend upon.

  3. nanasess commented on Jan 18, 2024

    @nanasess
    Owner

    @robacarp Thanks for the valuable report, I will test it with container: image: ruby

  4. nanasess commented on May 31, 2026

    @nanasess
    Owner

    Hi @kunalherkal and @robacarp — thanks for the report, and special thanks for narrowing it down to the container: case; that was the key clue.

    Root cause. Running inside a container image hits two problems:

    1. apt-key was removed in Debian 12 ("bookworm") and later. The action's built-in Chrome-install path uses apt-key, so it fails with apt-key: command not found on bookworm-based images (ruby:latest, node:slim, debian:*-slim, etc.). Older bullseye-based images like ruby:3.2.2 still ship apt-key, which is why behavior differed across images.
    2. Minimal images are missing prerequisites the action assumes on a hosted runner (git, sudo, gnupg, unzip, …).

    Workaround. Prepare the container yourself before calling the action. Three things are required:

    1. Install the prerequisites before actions/checkout (checkout itself needs git, which slim images don't ship).
    2. Install Google Chrome yourself using the modern signed-by keyring scheme (instead of the removed apt-key).
    3. Pass chromeapp: google-chrome-stable — the action checks dpkg -s <chromeapp>, so it must match the installed package name, not the google-chrome binary alias. Otherwise the check misses and the action falls back to the broken apt-key path.
    jobs:
      test:
        runs-on: ubuntu-latest
        container:
          image: ruby:3.2.2
        steps:
          - name: Install container prerequisites
            run: |
              apt-get update
              apt-get install -y --no-install-recommends \
                git sudo gnupg ca-certificates curl unzip jq wget
    
          - name: Install Google Chrome
            run: |
              wget -q -O- https://dl.google.com/linux/linux_signing_key.pub \
                | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg
              echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" \
                > /etc/apt/sources.list.d/google-chrome.list
              apt-get update
              apt-get install -y google-chrome-stable
    
          - uses: actions/checkout@v4
    
          - uses: nanasess/setup-chromedriver@v2
            with:
              chromeapp: google-chrome-stable
    
          - run: chromedriver --version

    What's been added. This is now documented in the README under Usage in a Container, and a CI workflow (container-test.yml, added in #453) continuously verifies it across ruby:3.2.2, ruby:latest, elixir:slim, node:slim, and debian:stable-slim — all green.

    Note this documents and tests the workaround; the action itself still relies on the host having these prerequisites (its behavior is unchanged for now). Modernizing the action's own apt path (apt-key → signed-by) is tracked separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions