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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium fails to start #80

Closed
neochine opened this issue Mar 18, 2024 · 1 comment
Closed

Chromium fails to start #80

neochine opened this issue Mar 18, 2024 · 1 comment

Comments

@neochine
Copy link

neochine commented Mar 18, 2024

  File "/usr/local/lib/python3.11/dist-packages/botasaurus-4.0.3-py3.11.egg/botasaurus/decorators.py", line 651, in wrapper_browser
    current_result = run_task(data_item, False, 0)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/botasaurus-4.0.3-py3.11.egg/botasaurus/decorators.py", line 531, in run_task
    driver = create_selenium_driver(options, desired_capabilities)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/botasaurus-4.0.3-py3.11.egg/botasaurus/create_driver_utils.py", line 236, in create_selenium_driver
    driver = AntiDetectDriver(
             ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/botasaurus-4.0.3-py3.11.egg/botasaurus/anti_detect_driver.py", line 40, in __init__
    super().__init__(executable_path=chromedriver_path, options=chrome_options, *args, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
    super().__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "/usr/local/lib/python3.11/dist-packages/selenium/webdriver/chromium/webdriver.py", line 92, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/dist-packages/selenium/webdriver/remote/webdriver.py", line 272, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.11/dist-packages/selenium/webdriver/remote/webdriver.py", line 364, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.11/dist-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x5624c8b59cc2 <unknown>
#1 0x5624c8ae13a3 <unknown>
#2 0x5624c8872371 <unknown>
#3 0x5624c8899c2c <unknown>
#4 0x5624c88958ec <unknown>
#5 0x5624c88dae54 <unknown>
#6 0x5624c88d19b3 <unknown>
#7 0x5624c88a02fc <unknown>
#8 0x5624c88a15f7 <unknown>
#9 0x5624c8b17271 <unknown>
#10 0x5624c8b2e4e8 <unknown>
#11 0x5624c8b2dcbb <unknown>
#12 0x5624c8b2ed55 <unknown>
#13 0x5624c8b18e03 <unknown>
#14 0x5624c8b2f12d <unknown>
#15 0x5624c8b0845a <unknown>
#16 0x5624c8b4e238 <unknown>
#17 0x5624c8b4e357 <unknown>
#18 0x5624c8b698bb <unknown>
#19 0x7f8fa28d13ec <unknown>
#20 0x7f8fa2951a4c <unknown>

 chromedriver --version
ChromeDriver 110.0.5481.0 (e9b8480c8f45332fce750122e1a76fa2dbe5c02c-refs/heads/main@{#1084023})
root@kali-linux:~/Temp/Botasaurus/test# chromium --version
Chromium 110.0.5481.0
root@kali-linux:~/Temp/Botasaurus/test#
from botasaurus import *

@browser
def scrape_heading_task(driver: AntiDetectDriver, data):
    driver.get('http://google.com')
    from ptpython.repl import embed
    embed(globals(), locals())

if __name__ == "__main__":
    # Initiate the web scraping task
    scrape_heading_task()
root@kali-linux:~# which chromium
/usr/bin/chromium
root@kali-linux:~# which chromedriver
/usr/bin/chromedriver

I have manually edited botasaurus code such that it uses non download chromium/chromedriver. Neither original botasaurus nor edited botasaurus works
image

@Chetan11-dev
Copy link
Contributor

We have released v4, which solves many bugs and adds awesome feautres like UI Run. I suggest using it and let me know if this issue reoccurs, to do so, please run the following commands:

python -m pip install bota botasaurus_api botasaurus_driver bota botasaurus-proxy-authentication botasaurus_server --upgrade

Then read the documentation at https://github.com/omkarcloud/botasaurus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants