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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to execute chromedriver using bitbucket pipeline

I am working on a windows machine and pushing my selenium scripts to bitbucket from eclipse. When bitbucket pipelines exeuctes my test scenarios, I am getting below error message: 

error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directoryAug 12, 2020 10:06:32 PM org.openqa.selenium.os.OsProcess checkForErrorSEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)

This is my chromedriver Linux path:

/opt/atlassian/pipelines/agent/build/drivers/chromedriverLinux:

Here chromedriverLinux is compatible with Linux OS. 

This is my bitbucket-pipelines.yml file

image: maven:3.6.1

pipelines:
default:
- step:
caches:
- mvn
services:
- selenium-standalone
script:
- chmod 777 /opt/atlassian/pipelines/agent/build/drivers/chromedriverLinux
- mvn test
definitions:
caches:
mvn: $HOME/.mvn
services:
selenium-standalone:
image: selenium/standalone-chrome:latest

Please help me how to resolve this issue...

2 answers

You see the error because you've committed the chrome driver into the repository and it is incomplete. Even it is for Linux, it is a binary that requires additional shared libraries, here libglib-2.0.so.0. These are not available within the maven build container.

To benefit from Bitbucket Pipelines, the chromedriver should not be put into the repository to have it available in the build container. The reason is that this is hard to manage.

Instead remove the chrome driver from the project repository and remove the chmod line.

Then I'd suggest that you create your own build container image based on the image in your pipeline (maven:3.6.1) with a Dockerfile (which is fine to commit into the repository).

You can build and test it locally first, including running the build service. This is outlined in Debug pipelines locally with Docker and supported as well by my Bitbucket Pipelines runner utility named "pipelines".

Alternatively if you'd like to do the vendoring of the chrome-driver, a static binary might already work, too. I don't know if one exists and I also would not recommend it anyway as the benefit of build containers is to not have the build dependencies within the project repository.

I am stuck on this same Issue. Were you able to figure this out yet

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍂📹 Apptoberfest demo contest roundup: vote for your favorite demos!

Hi Community! The submissions are in (and listed below) for the 🍻🍂Apptoberfest🍂🍻 Demo Competition and it’s time for you to place your votes for the best: Analytics & reporting app demo ...

267 views 7 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you