joshhighet / ransomwatch

the transparent ransomware claim tracker 🥷🏼🧅🖥️
https://ransomwatch.telemetry.ltd
The Unlicense
924 stars 141 forks source link

BUG: geckodriver "local variable 'driver' referenced before assignment" #91

Closed icepaule closed 1 year ago

icepaule commented 1 year ago

Hello josh,

could you help me with below error messages? Actually the came up with a fresh install: Thanks a lot for the great tool and your help.

Thx Marcus

_`2023-11-12:13:21:52,830 INFO geckodriver: assumed torsocks proxy found - tcp://127.0.0.1:9050 2023-11-12:13:21:52,830 INFO geckodriver: configuring proxy settings 2023-11-12:13:21:52,831 INFO geckodriver: starting webdriver 2023-11-12:13:24:07,35 ERROR geckodriver: error: Message: Failed to read marionette port

Traceback (most recent call last): File "/opt/ransomwatch/geckodrive.py", line 44, in main driver = webdriver.Firefox(options=options) File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/firefox/webdriver.py", line 67, in init super().init(command_executor=executor, options=options) File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 205, in init self.start_session(capabilities) File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Failed to read marionette port

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/ransomwatch/geckodrive.py", line 78, in main driver.quit() UnboundLocalError: local variable 'driver' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/ransomwatch/./ransomwatch.py", line 209, in scraper() File "/opt/ransomwatch/./ransomwatch.py", line 136, in scraper response = geckodrive.main(host['slug']) File "/opt/ransomwatch/geckodrive.py", line 81, in main if driver: UnboundLocalError: local variable 'driver' referenced before assignment root@intmon2:/opt/ransomwatch# `_

joshhighet commented 1 year ago

hi, thanks for raising it. I'm unable to reproduce this - could you let me know how you installed geckodriver and what OS you're running?

perhaps this ? https://github.com/RedSiege/EyeWitness/issues/604#issuecomment-1472761723

icepaule commented 1 year ago

Sure, my "history" part below, basically I sneeked your docker config: wget https://api.github.com/repos/mozilla/geckodriver/releases/latest tar -xvzf geckodriver-v0.33.0-linux32.tar.gz mv geckodriver /usr/local/bin

As this was just not the solution, I added: apt install firefox

But still the same issue. I'm running on Ubuntu 22.04.3 LTS.

Thx so much for your help.

icepaule commented 1 year ago

Just fixed it myself. ;-)

and now it works smoothly. ;-)

Thx for helping.