" Timed out waiting for driver server to start." error when run Selenium Java tests

I need to run Selenium Java tests with Maven.
My config.yml is :


version: 2.1

jobs:
  # Below is the definition of your job to build and test your app, you can rename and customize it as you want.
  Run On DEV Login:
    docker:
      - image: cimg/openjdk:11.0
    steps:
      # Checkout the code as the first step.
      - checkout

      # Use mvn clean and package as the standard maven build phase
      - run:
          name: Build
          command: mvn -B -DskipTests clean package
      # Then run your tests!
      - run:
          name: Test
          command: mvn test -Denv=DEV -DtestngXML='login.xml' 
      - store_test_results:
          path: target/surefire-reports
      - store_artifacts:
          path: target/surefire-reports

  Run On DEV SignUp:
    docker:
      - image: cimg/openjdk:11.0
    steps:
      # Checkout the code as the first step.
      - checkout

      # Use mvn clean and package as the standard maven build phase
      - run:
          name: Build
          command: mvn -B -DskipTests clean package
      # Then run your tests!
      - run:
          name: Test
          command: mvn test -Denv=DEV -DtestngXML='signUp.xml' 
      - store_test_results:
          path: target/surefire-reports
      - store_artifacts:
          path: target/surefire-reports

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
  test: # This is the name of the workflow, feel free to change it to better match your workflow.
    # Inside the workflow, you define the jobs you want to run.
    jobs:
      - Run On DEV Login
      - Run On DEV SignUp

But I have got errors:

og.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: '912db0d61cad', ip: '192.168.48.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.13.0-1021-aws', java.version: '11.0.13'
Driver info: driver.version: ChromeDriver
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /home/circleci/.cache/selenium/chromedriver/linux64/101.0.4951.41/chromedriver
/home/circleci/.cache/selenium/chromedriver/linux64/101.0.4951.41/chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
May 02, 2022 7:32:50 AM org.openqa.selenium.os.OsProcess checkForError

My ChromeDriver settings:

        ChromeOptions options = new ChromeOptions();
        options.addArguments("--window-size=1920,1080");
        options.addArguments("--start-maximized");
        options.addArguments("--headless");
        options.addArguments("--disable-gpu");

Could you, please, help me resolve this issue?

HI There, facing the same issue Do you find any working solution for this?

Hello

You can rerun any job with SSH to run a command to help identify where the issue is occurring.

Please see our guide below:

Would it be possible to try one of our browser openjdk images which you can search for using the link below:

I would also recommend removing any caching to check if it stops the issue from occurring.

If the issue is still ongoing please feel to update me and I will be happy to continue to investigate.

If possible can you please post a link to a build.

Kind Regards
Owen Oliver