Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Using selenium 4.6 in Ubuntu not able to download the required driver (for chrome) instead gives IllegalStateException #11291

Closed
PriyomSaha opened this issue Nov 22, 2022 · 7 comments

Comments

@PriyomSaha
Copy link

What happened?

  • I am running the Ubuntu in Virtual Box.

  • I am running a simple browser opening visiting youtube.com.

  • When I am using WebdriverManager it works fine but when I am commenting that particular setup() it throws java.lang.IllegalStateException.

  • Using JAVA.

  • Attached the small 1 line sample code and error.

  • As I am using a Virtual Machine where can I expect the driver to physically occur ?

  • Where in linux machine does the drivers gets downloaded ? Actual path if someone can provide will try once by physically placing the driver

image
image

How can we reproduce the issue?

-Installed VM Virtual Box.
-Loaded the Ubuntu 22.10 iso into it.
-Installed java.
-Installed an preferred IDE (IntelliJ)
-Created a maven project.
-Added Selenium 4.6 as one of the dependency

Relevant log output

![image](https://user-images.githubusercontent.com/44141916/203241010-7bfec6cb-22d3-43de-ac39-ce0f87948b17.png)
![image](https://user-images.githubusercontent.com/44141916/203241267-1e66144c-3b31-4d83-a055-ceef636f83ce.png)

Operating System

Ubuntu

Selenium version

4.6

What are the browser(s) and version(s) where you see this issue?

Chrome 107

What are the browser driver(s) and version(s) where you see this issue?

Not able to fetch the driver

Are you using Selenium Grid?

No

@github-actions
Copy link

@PriyomSaha, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@bonigarcia
Copy link
Member

Thanks for reporting @PriyomSaha. I reproduced the issue in the same environment (Ubuntu 22.10 with VirtualBox). The underlying problem is that Selenium Manager (which is a CLI application) cannot be executed in this distro:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic

$ ./selenium-manager 
./selenium-manager: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

The underlying cause seems a problem in the libssl library. I managed to solve by installing the following (see source):

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb

I am not sure if we can avoid this problem for future releases of Selenium Manager, I will look into it.

@johrstrom
Copy link

johrstrom commented Nov 22, 2022

This is also affecting the ruby gem on Ubuntu 22.04. Looks like 22.04 has upgraded to libssl3, providing libssl.so.3, but this was compiled against libssl.so.1.1

Steps to replicate for me in a container:

  • apt update
  • apt install ruby
  • gem install selenium-webdriver
root@e4181aee10c4:/selenium-webdriver-4.6.1# ldd /var/lib/gems/3.0.0/gems/selenium-webdriver-4.6.1/bin/linux/selenium-manager
        linux-vdso.so.1 (0x00007ffe947ff000)
        libssl.so.1.1 => not found
        libcrypto.so.1.1 => not found
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4b195a8000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4b195a3000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4b194bc000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4b194b5000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4b1928d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4b1992d000)

@johrstrom
Copy link

I picked this up in our updates CI. 4.5.0 (the ruby gem version) worked fine, I'm finding out now because it didn't ship this binary.

I'm not sure how to ship a cross-platform binary that has dynamic libraries like that. Maybe you need rpm and deb packages that target those platform:versions (that's my first guess anyhow)?

@titusfortner
Copy link
Member

@p0deje suggested we might fix this by compiling with OPENSSL_STATIC=true

@bonigarcia
Copy link
Member

I have just submitted a PR to solve this issue. It consists on using pure TLS, as suggested by @shs96c. I tested the new binary in Ubuntu 22.10 (where the previous selenium-manager binary failed), and the new one runs nicely.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants