Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Chromedriver unexpectedly exits during pipeline run

Chong Jing Hong March 3, 2022

I'm trying to run a selenium test on my pipeline but this error shows up:

WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service /root/.wdm/drivers/chromedriver/linux64/99.0.4844.51/chromedriver unexpectedly exited. Status code was: 127

This is the pipeline step:

- step:

        name: Get latest versions of libraries

        image: python:3.8.2

        script:

          - pip install selenium

          - pip install beautifulsoup4

          - pip install lxml

          - pip install webdriver-manager

          - python webscrape.py

        artifacts:

          - latest_vers.json

This is the python script:

if __name__ == '__main__':

    # s = Service("chromedriver.exe")

    # driver = webdriver.Chrome(service=s)

    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))

    driver.maximize_window()

    driver.get("https://www.npmjs.com/")

    data = get_libraries()

    latest_ver = scrape(driver, data)

    output_latest_ver(latest_ver)

1 answer

0 votes
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2022

Hi @Chong Jing Hong 

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Welcome to the Atlassian Community!

When I was searching about this issue, I found the following site, which mentions, that the selenium test might require additional drivers: https://stackoverflow.com/questions/49323099/webdriverexception-message-service-chromedriver-unexpectedly-exited-status-co

As recommended on this page, can you try to install the following applications?

apt-get install -y libglib2.0-0=2.50.3-2 \
    libnss3=2:3.26.2-1.1+deb9u1 \
    libgconf-2-4=3.2.6-4+b1 \
    libfontconfig1=2.11.0-6.7+b1

and/or

apt-get install -y chromium-browser

Please let us know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support 

Chong Jing Hong March 8, 2022

hi @Norbert C 

I tried both suggestions, and both gave errors

 

Version '2.50.3-2' for 'libglib2.0-0' was not found
Unable to locate package libnss3
Unable to locate package libgconf-2-4
Unable to locate package libfontconfig1

Unable to locate package chromium-browser

 

E: Version '2.50.3-2' for 'libglib2.0-0' was not found
E: Unable to locate package libnss3
E: Unable to locate package libgconf-2-4
E: Unable to locate package libfontconfig1
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 11, 2022

Hi @Chong Jing Hong ,

Thank you for your reply. It seems that those versions are not available within the build.

Can I ask you to try to install these packages without providing the version numbers? The command for that is:

apt-get install -y libglib2.0 libnss3 libgconf-2-4 libfontconfig1

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events