Open Sopor opened 1 year ago
I fixed these issue in this branch: https://github.com/strenkml/afraid-autologin/tree/fix-gecko
If you are running the docker, you can just pull down the latest version of the image and everything should be working
I just tried the latest docker and it still seems to be failing. If I docker exec into the container and attempt to run it manually:
# bash -c "PATH=$PATH:/usr/local/bin/; source /app/venv/bin/activate && python /app/autologin.py"
2024-02-14 02:02:35,903 >>> DEBUG: afraid-autologin startup
2024-02-14 02:02:35,903 >>> DEBUG: init browser
The geckodriver version (0.33.0) detected in PATH at /usr/local/bin/geckodriver might not be compatible with the detected firefox version (120.0.1); currently, geckodriver 0.34.0 is recommended for firefox 120.*, so it is advised to delete the driver in PATH and retry
Traceback (most recent call last):
File "/app/autologin.py", line 125, in <module>
main(logger)
File "/app/autologin.py", line 72, in main
browser = webdriver.Firefox(options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/firefox/webdriver.py", line 69, in __init__
super().__init__(command_executor=executor, options=options)
File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 209, in __init__
self.start_session(capabilities)
File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 293, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 348, in execute
self.error_handler.check_response(response)
File "/app/venv/lib/python3.12/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 1
Ah scratch that you're --headless
option works, didn't realize that was being used by the script to facilitate the login:
# bash -c "PATH=$PATH:/usr/local/bin/; source /app/venv/bin/activate && python /app/autologin.py --verbose --headless"
2024-02-14 02:05:52,904 >>> DEBUG: afraid-autologin startup
2024-02-14 02:05:52,905 >>> DEBUG: init virtual display
2024-02-14 02:05:53,005 >>> DEBUG: init browser
The geckodriver version (0.33.0) detected in PATH at /usr/local/bin/geckodriver might not be compatible with the detected firefox version (120.0.1); currently, geckodriver 0.34.0 is recommended for firefox 120.*, so it is advised to delete the driver in PATH and retry
2024-02-14 02:05:57,216 >>> DEBUG: navigating to login page
2024-02-14 02:05:59,636 >>> DEBUG: submit login form
2024-02-14 02:06:01,864 >>> DEBUG: extending account if dormant
2024-02-14 02:06:03,780 >>> DEBUG: [<selenium.webdriver.remote.webelement.WebElement (session="XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX", element="f5ae24f9-f37b-4d86-8a07-c34ded56cfd3")>]
2024-02-14 02:06:06,523 >>> INFO: login sucessful
#
I can't get this to run at all 😥