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 directory
Aug 12, 2020 10:06:32 PM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
This is my chromedriver Linux path:
Here chromedriverLinux is compatible with Linux OS.
This is my bitbucket-pipelines.yml file
- chmod 777 /opt/atlassian/pipelines/agent/build/drivers/chromedriverLinux
- mvn test
Please help me how to resolve this issue...
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.
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 ...
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