fbuetler / asvz-bot

ASVZ Bot to enroll to lessons. Get a place when the registration opens or when a place gets free. Works for ETH, UZH and ZHAW students.
GNU General Public License v3.0
66 stars 25 forks source link

TimeoutException for Login #32

Closed Mik13579 closed 11 months ago

Mik13579 commented 11 months ago

Hi, I wanted to try the script myself yesterday. Because I run Chrome 119, the script did not work out of the box. So, I updated the WebDriver myself to a compatible one. But now there is a new problem, and I do not know how to fix it. As soon as I try to enroll in a lesson, it seems that the login button is not found, which I think is odd because the name of the object is still the same. So, I think it has something to do with Selenium not being able to interact with the website, but I do not know how to fix this.

2023-11-21 10:29:49 INFO     Checking login credentials

DevTools listening on ws://127.0.0.1:55511/devtools/browser/7f950da7-d6cb-401d-afbb-5bfaa26dee22
[1121/102956.204:INFO:CONSOLE(1)] "WARNING: AuthGuard should be implemented for this route:  https://schalter.asvz.ch/tn/lessons/558486", source: https://schalter.asvz.ch/tn/main.b9c8419c543486bf.js (1)
[1121/102956.206:INFO:CONSOLE(1)] "ERROR [object Object]", source: https://schalter.asvz.ch/tn/main.b9c8419c543486bf.js (1)
2023-11-21 10:29:56 INFO     Login to 'Universität Zürich'
Traceback (most recent call last):
  File "C:\Users\ASVZ_Bot\src\asvz_bot.py", line 613, in <module>
    main()
  File "C:\Users\ASVZ_Bot\src\asvz_bot.py", line 609, in main
    enroller.enroll()
  File "C:\Users\ASVZ_Bot\src\asvz_bot.py", line 284, in enroll
    self.__organisation_login(driver)
  File "C:\Users\ASVZ_Bot\src\asvz_bot.py", line 437, in __organisation_login
    WebDriverWait(driver, 20).until(
  File "C:\UsersAppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\selenium\webdriver\support\wait.py", line 95, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
fbuetler commented 11 months ago

AFAIK UZH switched from having an own login to the switch login. Please see this issue https://github.com/fbuetler/asvz-bot/issues/31 for a suggested workaround.

fbuetler commented 11 months ago

Closing as duplicate of https://github.com/fbuetler/asvz-bot/issues/31.

Please try the newest version of the script. You should be able to use your UZH login again.