nicolomantini / LinkedIn-Easy-Apply-Bot

Automate the application process on LinkedIn
Apache License 2.0
765 stars 321 forks source link

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary #110

Closed OakandRocks closed 1 year ago

OakandRocks commented 1 year ago

Check last replies

ZaneBaylon commented 1 year ago

It's definitely something to do with a driver conflict. If you've downloaded a google driver before, or are on a relatively unique OS like you said, it might just not be compatible. Are you running this from any kind of shell?

OakandRocks commented 1 year ago

Ran from a fresh Ubuntu VM, followed instructions, ran from conda env.

(myenv) garyoak@garyoak-VirtualBox:~/Desktop/linkedin/LinkedIn-Easy-Apply-Bot-master$ python3 easyapplybot.py Traceback (most recent call last): File "/home/garyoak/Desktop/linkedin/LinkedIn-Easy-Apply-Bot-master/easyapplybot.py", line 16, in <module> from webdriver_manager.chrome import ChromeDriverManager File "/home/garyoak/.local/lib/python3.10/site-packages/webdriver_manager/chrome.py", line 7, in <module> from webdriver_manager.drivers.chrome import ChromeDriver File "/home/garyoak/.local/lib/python3.10/site-packages/webdriver_manager/drivers/chrome.py", line 1, in <module> from packaging import version ModuleNotFoundError: No module named 'packaging'

OakandRocks commented 1 year ago

Installed "packaging" - now the issue is: .local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

Yes, selenium is installed (through requirements file)

OakandRocks commented 1 year ago

Full traceback:

driver = webdriver.Chrome(ChromeDriverManager().install()) Traceback (most recent call last): File "/home/garyoak/Desktop/linkedin/LinkedIn-Easy-Apply-Bot-master/easyapplybot.py", line 22, in <module> driver = webdriver.Chrome(ChromeDriverManager().install()) File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ super().__init__(DesiredCapabilities.CHROME['browserName'], "goog", File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 92, in __init__ super().__init__( File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 272, in __init__ self.start_session(capabilities, browser_profile) File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 364, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute self.error_handler.check_response(response) File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

OakandRocks commented 1 year ago

I changed line 22 to include the direct path (chromedriver_linux)

Now this:

driver = webdriver.Chrome(chrome_options = Options, executable_path=r'/home/garyoak/Desktop/linkedin/LinkedIn-Easy-Apply-Bot-master/assets/chromedriver_linux') File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ super().__init__(DesiredCapabilities.CHROME['browserName'], "goog", File "/home/garyoak/.local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 82, in __init__ if options._ignore_local_proxy: AttributeError: type object 'Options' has no attribute '_ignore_local_proxy'

OakandRocks commented 1 year ago

and if I sudo:

sudo python3 easyapplybot.py [sudo] password for garyoak: Traceback (most recent call last): File "/home/garyoak/Desktop/linkedin/LinkedIn-Easy-Apply-Bot-master/easyapplybot.py", line 13, in <module> import pyautogui File "/usr/local/lib/python3.10/dist-packages/pyautogui/__init__.py", line 249, in <module> import mouseinfo File "/usr/local/lib/python3.10/dist-packages/mouseinfo/__init__.py", line 223, in <module> _display = Display(os.environ['DISPLAY']) File "/usr/local/lib/python3.10/dist-packages/Xlib/display.py", line 80, in __init__ self.display = _BaseDisplay(display) File "/usr/local/lib/python3.10/dist-packages/Xlib/display.py", line 62, in __init__ display.Display.__init__(*(self, ) + args, **keys) File "/usr/local/lib/python3.10/dist-packages/Xlib/protocol/display.py", line 129, in __init__ raise error.DisplayConnectionError(self.display_name, r.reason) Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\

github-actions[bot] commented 1 year ago

Stale issue message