[Bug]: NoSuchElementException
Description
I tired running the application and got no element exist error
Minimal Reproduction
I ran the setup program and enter my information and program mode type login and normal. I then ran the start.bat file and I get this error the moment the login page loads.
Error
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="password"]"} (Session info: chrome=135.0.7049.116); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Stacktrace: GetHandleVerifier [0x00007FF6F17DEFA5+77893] GetHandleVerifier [0x00007FF6F17DF000+77984] (No symbol) [0x00007FF6F15A91BA] (No symbol) [0x00007FF6F15FF16D] (No symbol) [0x00007FF6F15FF41C] (No symbol) [0x00007FF6F1652237] (No symbol) [0x00007FF6F162716F] (No symbol) [0x00007FF6F164F07F] (No symbol) [0x00007FF6F1626F03] (No symbol) [0x00007FF6F15F0328] (No symbol) [0x00007FF6F15F1093] GetHandleVerifier [0x00007FF6F1A97B6D+2931725] GetHandleVerifier [0x00007FF6F1A92132+2908626] GetHandleVerifier [0x00007FF6F1AB00F3+3031443] GetHandleVerifier [0x00007FF6F17F91EA+184970] GetHandleVerifier [0x00007FF6F180086F+215311] GetHandleVerifier [0x00007FF6F17E6EC4+110436] GetHandleVerifier [0x00007FF6F17E7072+110866] GetHandleVerifier [0x00007FF6F17CD479+5401] BaseThreadInitThunk [0x00007FFEE1DF7374+20] RtlUserThreadStart [0x00007FFEE263CC91+33]
Operating System Version
Windows 10
Browser and Browser Version
chrome 135.0.7049.116
Python Version
3.13
Program Version
fae7173
Any other information or context?
No response
What programMode are you running the program in? Normal or Reset?
What programMode are you running the program in? Normal or Reset?
I'm using normal mode
I'm not able to reproduce this myself, it works completely fine for me. What codeMode and browser are you using?
Also, it will help me if you could upload a screen recording of the program and the browser running together when it crashes like this.
I'm not able to reproduce this myself, it works completely fine for me. What
codeModeandbrowserare you using? Also, it will help me if you could upload a screen recording of the program and the browser running together when it crashes like this. Below are some screen shots and video.
Hi Sorry for the late replay. I'm running chrome. When the page loads up, only the background image of the site is loaded, the error message appears. Once the error appears then the login text box is loaded onto the screen. Below is the requested image and screen shots of the error and my settings
https://github.com/user-attachments/assets/4f00fd59-6147-4850-ad98-eaffb1c92161
diff --git a/src/backend.py b/src/backend.py
index 02f99e4..4fee342 100644
--- a/src/backend.py
+++ b/src/backend.py
@@ -101,9 +101,15 @@ def bootstrap_login_page(
is caught while trying to find the TOTP login field, the function continues to run, assuming that the hCaptcha has been completed.
"""
# Find the login input fields
- login_fields = {
- 'password': driver.find_element(by=By.NAME, value='password')
- }
+ login_fields = {}
+
+ try:
+ login_fields['password'] = WebDriverWait(driver, 10).until(
+ EC.presence_of_element_located((By.NAME, 'password'))
+ )
+ finally:
+ raise TimeoutException("Login page didn't load in fast enough")
+
match configuration['programMode'].lower():
case 'login':
login_fields['email'] = driver.find_element(by=By.NAME, value='email')
Could you copy the above .patch file, apply it in your local copy of the program, and test the program for me? (1. cd to the program's main folder, 2. git apply /path/to/patchfile.patch? https://gist.github.com/nepsilon/22bc62a23f785716705c See here for instructions)
I'm not able to test this myself, because it seems this is a network issue and the page is loading slowly only for you, while it's loading fast (and showing no errors) for me.
diff --git a/src/backend.py b/src/backend.py index 02f99e4..4fee342 100644 --- a/src/backend.py +++ b/src/backend.py @@ -101,9 +101,15 @@ def bootstrap_login_page( is caught while trying to find the TOTP login field, the function continues to run, assuming that the hCaptcha has been completed. """
Find the login input fields
- login_fields = {
'password': driver.find_element(by=By.NAME, value='password')- }
- login_fields = {}
- try:
login_fields['password'] = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME, 'password')))- finally:
raise TimeoutException("Login page didn't load in fast enough")- match configuration['programMode'].lower(): case 'login': login_fields['email'] = driver.find_element(by=By.NAME, value='email') Could you copy the above .patch file, apply it in your local copy of the program, and test the program for me? (1.
cdto the program's main folder, 2.git apply /path/to/patchfile.patch? https://gist.github.com/nepsilon/22bc62a23f785716705c See here for instructions)I'm not able to test this myself, because it seems this is a network issue and the page is loading slowly only for you, while it's loading fast (and showing no errors) for me.
I ran the update and I got a page, didn't load fast enough error.
Re-apply the patch and change the "10" to "20", or another big number. Keep raising and lowering until you find something that works for you.
Re-apply the patch and change the "10" to "20", or another big number. Keep raising and lowering until you find something that works for you.
I kept increasing the wait time and it doesn't seem to do anything. it loads at the same speed every time, I even entered 1000000000, just to make sure and i don't see a difference in the programs speed.
That's got to be a problem with your internet then.
Re-apply the patch and change the "10" to "20", or another big number. Keep raising and lowering until you find something that works for you.
I kept increasing the wait time and it doesn't seem to do anything. it loads at the same speed every time, I even entered 1000000000, just to make sure and i don't see a difference in the programs speed.
But still weird that the program, even after being told to wait for 20 seconds, doesn't wait.
That's got to be a problem with your internet then.
Re-apply the patch and change the "10" to "20", or another big number. Keep raising and lowering until you find something that works for you.
I kept increasing the wait time and it doesn't seem to do anything. it loads at the same speed every time, I even entered 1000000000, just to make sure and i don't see a difference in the programs speed.
But still weird that the program, even after being told to wait for 20 seconds, doesn't wait.
I got it working, I removed the try finally statement as when I open in vsCode, it gave a line indent error. I tried re-spacing them, but the error would not go away. When I remove the try statement and kept the delay, it started working. I think it was hitting the finally statement raise error, and not really running the delay webdriver inside the try statement. This is an error my end and my apology. Again Thank you for your help!
You removed the finally statement too?
You removed the
finallystatement too?
Yes, removing both made the program work. The finally statement had the indent line error, after removing it, the try statement began showing as an error, so I removed it as well.
Thanks for the help! Try the latest version and let me know if it works