Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element click intercepted on login #189

Closed
vartana opened this issue Nov 27, 2023 · 8 comments
Closed

Element click intercepted on login #189

vartana opened this issue Nov 27, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@vartana
Copy link

vartana commented Nov 27, 2023

Version

7.1

Browser Version

119.0.6045.159

Description

Here is an error I get running it with config.json with my login information.

Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/vartana/projects/auto-southwest-check-in/lib/reservation_monitor.py", line 42, in monitor
self._monitor()
File "/home/vartana/projects/auto-southwest-check-in/lib/reservation_monitor.py", line 157, in _monitor
reservations, skip_scheduling = self._get_reservations()
File "/home/vartana/projects/auto-southwest-check-in/lib/reservation_monitor.py", line 182, in _get_reservations
reservations = webdriver.get_reservations(self)
File "/home/vartana/projects/auto-southwest-check-in/lib/webdriver.py", line 93, in get_reservations
self._wait_for_login(driver, account_monitor)
File "/home/vartana/projects/auto-southwest-check-in/lib/webdriver.py", line 163, in _wait_for_login
self._click_login_button(driver)
File "/home/vartana/projects/auto-southwest-check-in/lib/webdriver.py", line 187, in _click_login_button
driver.click(login_button)
File "/home/vartana/.local/lib/python3.8/site-packages/seleniumbase/core/sb_driver.py", line 54, in click
page_actions.click(self.driver, *args, **kwargs)
File "/home/vartana/.local/lib/python3.8/site-packages/seleniumbase/fixtures/page_actions.py", line 1526, in click
element.click()
File "/home/vartana/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 93, in click
self._execute(Command.CLICK_ELEMENT)
File "/home/vartana/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 394, in _execute
return self._parent.execute(command, params)
File "/home/vartana/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/home/vartana/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (712, 302). Other element would receive the click:


(Session info: chrome=119.0.6045.159)
Stacktrace:
#0 0x556403fdb5e3
#1 0x556403c9e0b7
#2 0x556403cf3cfc
#3 0x556403cf165f
#4 0x556403ceebe4
#5 0x556403ced934
#6 0x556403ce01a0
#7 0x556403d12ef2
#8 0x556403cdfa02
#9 0x556403d130be
#10 0x556403d2eb3d
#11 0x556403d12cc3
#12 0x556403cde0e4
#13 0x556403cdf0ae
#14 0x556403fa1ce1
#15 0x556403fa5b7e
#16 0x556403f8f4b5
#17 0x556403fa67d6
#18 0x556403f72dbf
#19 0x556403fc9748
#20 0x556403fc9917
#21 0x556403fda773
#22 0x7fcf7fc63609 start_thread

To Reproduce

python3 southwest.py

Expected Behavior

To not get an error.

Relevant logs and program output

No response

Additional context

No response

@vartana vartana added the bug Something isn't working label Nov 27, 2023
@jdholtz
Copy link
Owner

jdholtz commented Nov 27, 2023

Hi. Thanks for filing this issue. This happens when the login button was not clickable, and therefore the login form couldn't be submitted. Does this issue happen every time you run the script?

To further debug what's happening, could you put driver.save_screenshot("login.png") on line 186 of lib/webdriver.py and run the script again? There should be a popup that appears. What does the popup message say?

@vartana
Copy link
Author

vartana commented Nov 27, 2023

Happens every time @jdholtz

login

@jdholtz
Copy link
Owner

jdholtz commented Nov 27, 2023

Thanks. So it seems to be failing to log you in due to a 429, similar to #174. Could you send the logs of a run?

Also, can you delete line 187 (driver.click(login_button)) of lib/webdriver.py (the original version, not the one with the line for save_screenshot) and see if you get a "Too Many Requests" error, like #174? Knowing this will help me improve the script to not throw an 'element click intercepted' error, but instead the "Too Many Requests" error.

@jdholtz
Copy link
Owner

jdholtz commented Dec 3, 2023

Hey @vartana, any updates to my previous comment?

@sidneyvanness
Copy link

sidneyvanness commented Dec 6, 2023

This issue is happening for me as well, both when I run it locally, and when I install the Docker container on a fresh Digital Ocean server. I'll try to get debug. It does say it successfully logs in, but then produces the following, so I'm not sure if it will work or not.

Logs

Successfully logged in to Sidney Vanness's account

Successfully scheduled the following flights to check in for Sidney Vanness:
Flight from Sacramento to Burbank at 2023-12-08 02:25:00 UTC
Flight from Burbank to Sacramento at 2023-12-11 04:15:00 UTC

Process Process-2:
Traceback (most recent call last):
File "/Users/sidneyvanness/auto-southwest-check-in/lib/webdriver.py", line 184, in _click_login_button
seleniumbase_actions.wait_for_element_not_visible(driver, login_button, timeout=5)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/seleniumbase/fixtures/page_actions.py", line 1030, in wait_for_element_not_visible
timeout_exception(Exception, message)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/seleniumbase/fixtures/page_actions.py", line 266, in timeout_exception
raise exc(msg)
Exception: Element {button#login-btn} was still visible after 5 seconds!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/sidneyvanness/miniforge3/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/Users/sidneyvanness/miniforge3/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/sidneyvanness/auto-southwest-check-in/lib/reservation_monitor.py", line 42, in monitor
self._monitor()
File "/Users/sidneyvanness/auto-southwest-check-in/lib/reservation_monitor.py", line 157, in _monitor
reservations, skip_scheduling = self._get_reservations()
File "/Users/sidneyvanness/auto-southwest-check-in/lib/reservation_monitor.py", line 182, in _get_reservations
reservations = webdriver.get_reservations(self)
File "/Users/sidneyvanness/auto-southwest-check-in/lib/webdriver.py", line 93, in get_reservations
self._wait_for_login(driver, account_monitor)
File "/Users/sidneyvanness/auto-southwest-check-in/lib/webdriver.py", line 163, in _wait_for_login
self._click_login_button(driver)
File "/Users/sidneyvanness/auto-southwest-check-in/lib/webdriver.py", line 187, in _click_login_button
driver.click(login_button)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/seleniumbase/core/sb_driver.py", line 54, in click
page_actions.click(self.driver, *args, **kwargs)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/seleniumbase/fixtures/page_actions.py", line 1526, in click
element.click()
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py", line 93, in click
self._execute(Command.CLICK_ELEMENT)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py", line 394, in _execute
return self._parent.execute(command, params)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/Users/sidneyvanness/miniforge3/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (720, 301). Other element would receive the click:


(Session info: chrome=119.0.6045.199)
Stacktrace:
0 uc_driver 0x0000000100710d28 uc_driver + 4795688
1 uc_driver 0x00000001007082b3 uc_driver + 4760243
2 uc_driver 0x00000001002e188d uc_driver + 407693
3 uc_driver 0x000000010033838a uc_driver + 762762
4 uc_driver 0x0000000100335d0b uc_driver + 752907
5 uc_driver 0x0000000100333174 uc_driver + 741748
6 uc_driver 0x0000000100331e89 uc_driver + 736905
7 uc_driver 0x00000001003243fa uc_driver + 680954
8 uc_driver 0x0000000100357ca2 uc_driver + 892066
9 uc_driver 0x0000000100323c63 uc_driver + 679011
10 uc_driver 0x0000000100357e5e uc_driver + 892510
11 uc_driver 0x0000000100373b2b uc_driver + 1006379
12 uc_driver 0x0000000100357a73 uc_driver + 891507
13 uc_driver 0x0000000100322143 uc_driver + 672067
14 uc_driver 0x000000010032331e uc_driver + 676638
15 uc_driver 0x00000001006d1795 uc_driver + 4536213
16 uc_driver 0x00000001006d6853 uc_driver + 4556883
17 uc_driver 0x00000001006b7001 uc_driver + 4427777
18 uc_driver 0x00000001006d759d uc_driver + 4560285
19 uc_driver 0x00000001006a848c uc_driver + 4367500
20 uc_driver 0x00000001006f70e8 uc_driver + 4690152
21 uc_driver 0x00000001006f729e uc_driver + 4690590
22 uc_driver 0x0000000100707eee uc_driver + 4759278
23 libsystem_pthread.dylib 0x00007ff80aeed202 _pthread_start + 99
24 libsystem_pthread.dylib 0x00007ff80aee8bab thread_start + 15

@sidneyvanness
Copy link

Checkin did actually work still.

@jdholtz
Copy link
Owner

jdholtz commented Dec 7, 2023

@sidneyvanness could you use my suggestion about editing the code here and let me know the results?

Also, do you have multiple accounts logging in on the script? It makes 2 processes so one might’ve worked and another didn’t.

@jdholtz jdholtz changed the title Message: element click intercepted Element click intercepted on login Dec 8, 2023
jdholtz added a commit that referenced this issue Dec 8, 2023
Fixes #189.

Whenever a 429 error or 400 (Invalid credentials) error occurred, a
popup would appear on Southwest's page. However, the script would
attempt to click the login button again, resulting in an Exception:
"Element click intercepted". Now, the login button is only clicked again
if no popup appears (for example, if the form failed to submit. See #162
for more details).
@jdholtz
Copy link
Owner

jdholtz commented Dec 8, 2023

I was able to reproduce this issue by providing invalid credentials to the login page. The issue is now fixed on the develop branch. Thanks for everyone who reported it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants