webfp / tor-browser-selenium

Tor Browser automation with Selenium.
MIT License
528 stars 101 forks source link

Process unexpectedly closed with status 255 #202

Closed jaroslawjanas closed 8 months ago

jaroslawjanas commented 8 months ago
Traceback (most recent call last):
  File "/home/voter/agherman-voter/main.py", line 7, in <module>
    with TorBrowserDriver(tbb_dir, tor_cfg=cm.USE_STEM) as driver:
  File "/home/voter/.local/lib/python3.10/site-packages/tbselenium/tbdriver.py", line 103, in __init__
    super(TorBrowserDriver, self).__init__(
  File "/home/voter/.local/lib/python3.10/site-packages/selenium/webdriver/firefox/webdriver.py", line 67, in __init__
    super().__init__(command_executor=executor, options=options)
  File "/home/voter/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
    self.start_session(capabilities)
  File "/home/voter/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
  File "/home/voter/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
    self.error_handler.check_response(response)
  File "/home/voter/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 255
import tbselenium.common as cm
from tbselenium.tbdriver import TorBrowserDriver
from tbselenium.utils import launch_tbb_tor_with_stem

tbb_dir = "/home/voter/tor-browser/"
tor_process = launch_tbb_tor_with_stem(tbb_path=tbb_dir)
with TorBrowserDriver(tbb_dir, tor_cfg=cm.USE_STEM) as driver:
    driver.load_url("https://check.torproject.org")

tor_process.kill()

Tor /home/voter/tor-browser/ Geckodriver 0.31 PATH set Nothing running on :9050

The setup instructions are horrible btw. :thumbsup:

gunesacar commented 8 months ago

The setup instructions are horrible btw. 👍

PRs are welcome, unhelpful comments like these are not.