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

Encountered a Too Many Requests error while logging in. Skipping reservation retrieval #232

Closed
colinmcnamara opened this issue Feb 28, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@colinmcnamara
Copy link

Version

Auto-Southwest Check-In v7.2

Browser Version

selenium 4.22.5

Description

Title: Encountered "Too Many Requests" and "ElementClickInterceptedException" errors during login and reservation retrieval

Environment:

  • Date Encountered: 2024-02-28
  • Docker Image: jdholtz/auto-southwest-check-in (Latest as of 2024-02-28)
  • Docker Compose Configuration:
    • Service Name: auto-southwest-XXXXX
    • Container Name: auto-southwest-XXXXX
    • Restart Policy: on-failure
    • Environment Variables: PUID=501, PGID=20, TZ=America/Chicago
    • Volumes: /Users/XXXXX/code/home_media/auto-southwest-XXXXX/config.json:/app/config.json

Configuration Changes:

  • Reduced user count in the config from two to one.
  • Set check_fares to false.
  • Enabled a VPN to change the IP address.

Issue Description:
Upon attempting to log in and retrieve reservations using the auto-southwest-check-in Docker container, the following errors were encountered:

  1. A "Too Many Requests" error, indicating potential rate limiting issues with the service.
  2. An "ElementClickInterceptedException" error, suggesting a UI element interception during an automated click operation.

Error Messages:

  1. Too Many Requests Error:
    • Timestamp: 2024-02-28 11:48:28
    • Message: Encountered a Too Many Requests error while logging in. Skipping reservation retrieval.
  2. ElementClickInterceptedException:
    • Timestamp: 2024-02-28 11:38:31 to 11:38:43
    • Traceback: A detailed traceback highlighting the error's occurrence within the reservation_monitor.py and webdriver.py files, culminating in an ElementClickInterceptedException due to an element not being clickable at the expected location. The error specifically mentions an element <span class="login-button--box"> being intercepted by another element <div class="backdrop visible active"></div>.

Steps to Reproduce:

  1. Run the Docker container with the specified environment and volume configuration.
  2. Observe the application's attempt to log in and retrieve reservations.
  3. Encounter the specified errors in the container logs.

Expected Behavior:
The application should successfully log in and retrieve reservations without encountering rate limiting or element interaction exceptions.

Actual Behavior:
The application fails to proceed past the login phase due to "Too Many Requests" and "ElementClickInterceptedException" errors, preventing reservation retrieval.

Additional Information:

  • config.json Configuration: (Redacted for privacy, with important flags like check_fares being set to false).
  • The issue persists despite attempts to mitigate through configuration changes and IP address modifications via VPN.

Attachments:

  • Docker Compose configuration snippet.
  • config.json (partially redacted for privacy).
  • Full error logs as provided.

To Reproduce

docker-compose

auto-southwest-XXXXX:
image: jdholtz/auto-southwest-check-in
container_name: auto-southwest-XXXXX
restart: on-failure
environment:
- PUID=501
- PGID=20
- TZ=America/Chicago
volumes:
- /Users/XXXXX/code/home_media/auto-southwest-XXXXX/config.json:/app/config.json

config.json

  {
"check_fares": true,
"notification_urls": "",
"notification_level": 1,
"retrieval_interval": 24,
"accounts": [
    {"username": "XXXXX", "password": "XXXXX", "check_fares": false}
],
"reservations": []

}

Expected Behavior

The application should successfully log in and retrieve reservations without encountering rate limiting or element interaction exceptions.

Relevant logs and program output

Full error:
2024-02-28 11:38:31 Encountered a Too Many Requests error while logging in. Skipping reservation retrieval
2024-02-28 11:38:43 Process Process-1:
2024-02-28 11:38:43 Traceback (most recent call last):
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
2024-02-28 11:38:43     self.run()
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/multiprocessing/process.py", line 108, in run
2024-02-28 11:38:43     self._target(*self._args, **self._kwargs)
2024-02-28 11:38:43   File "/app/lib/reservation_monitor.py", line 42, in monitor
2024-02-28 11:38:43     self._monitor()
2024-02-28 11:38:43   File "/app/lib/reservation_monitor.py", line 157, in _monitor
2024-02-28 11:38:43     reservations, skip_scheduling = self._get_reservations()
2024-02-28 11:38:43                                     ^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 11:38:43   File "/app/lib/reservation_monitor.py", line 182, in _get_reservations
2024-02-28 11:38:43     reservations = webdriver.get_reservations(self)
2024-02-28 11:38:43                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 11:38:43   File "/app/lib/webdriver.py", line 84, in get_reservations
2024-02-28 11:38:43     driver.click(".login-button--box")
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/site-packages/seleniumbase/core/sb_driver.py", line 59, in click
2024-02-28 11:38:43     page_actions.click(self.driver, *args, **kwargs)
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/site-packages/seleniumbase/fixtures/page_actions.py", line 1526, in click
2024-02-28 11:38:43     element.click()
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webelement.py", line 94, in click
2024-02-28 11:38:43     self._execute(Command.CLICK_ELEMENT)
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webelement.py", line 395, in _execute
2024-02-28 11:38:43     return self._parent.execute(command, params)
2024-02-28 11:38:43            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 348, in execute
2024-02-28 11:38:43     self.error_handler.check_response(response)
2024-02-28 11:38:43   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
2024-02-28 11:38:43     raise exception_class(message, screen, stacktrace)
2024-02-28 11:38:43 selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <span class="login-button--box">...</span> is not clickable at point (1369, 29). Other element would receive the click: <div class="backdrop visible active"></div>
2024-02-28 11:38:43   (Session info: chrome=121.0.6167.85)
2024-02-28 11:38:43

Additional context

No response

@colinmcnamara colinmcnamara added the bug Something isn't working label Feb 28, 2024
@jdholtz
Copy link
Owner

jdholtz commented Feb 28, 2024

Thank you for the very detailed bug report! The Too Many Requests (429) issue is already being tracked in #201 and the ElementClickInterceptedException is fixed in the develop branch (from #226). The underlying issue of #226 is #230. I'll close this so these issues can be tracked in their respective reports.

@jdholtz jdholtz closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
@jdholtz jdholtz added duplicate This issue or pull request already exists and removed bug Something isn't working labels Feb 28, 2024
@colinmcnamara
Copy link
Author

Thanks for creating such a useful project.
Is there anyway I can be of use in troubleshooting the issues?

@jdholtz
Copy link
Owner

jdholtz commented Feb 29, 2024

Glad you’re finding it useful! There isn’t much troubleshooting that can be done from a high level. The troubleshooting would have to be at a lower level to find out why Southwest is detecting the browser only within the Docker container. If you want to do that, that would be great.

I’m also able to reproduce the issue and have worked on it a lot but nothing seems obvious as to what is the trigger for it being detected yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants