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

Successful check-in but still got error - can't login with account #129

Closed
darryllee opened this issue Aug 1, 2023 · 11 comments
Closed
Labels
dependency User has issues with the dependencies

Comments

@darryllee
Copy link

Description

I used the olde undetected-chromedriver for ARMv7 (3.1.0) with olde Chromium 104 and console showed error about too many requests, BUT CHECK-IN was successful (I think).

Do you suppose it's because I'm running such an old version of undetected_chromedriver (3.1.0)? I'd love to run a newer version but don't have the expertise to hack the newer undetected_chromedriver to work with ARMv7.

Thanks!

Output:

Checking in to flight from 'San Jose' to 'Orange County/Santa Ana' for Darryl Lee

Successfully scheduled the following flights to check in for Darryl Lee:
Flight from San Jose to Orange County/Santa Ana at 2023-08-01 15:55:00 UTC
Flight from Orange County/Santa Ana to San Jose at 2023-08-05 01:05:00 UTC

Failed to check in to flight XXXXXXX for Darryl Lee. Reason: Too Many Requests 429.
Check in at this url: https://mobile.southwest.com/check-in

Log:

2023-07-31 08:44:55 DEBUG Process-1:2[checkin_scheduler:50]: Refreshing headers for current session
2023-07-31 08:44:55 DEBUG Process-1:2[webdriver:138]: Starting webdriver for current session
2023-07-31 08:45:04 DEBUG Process-1:2[webdriver:147]: Loading Southwest Check-In page
2023-07-31 08:45:26 DEBUG Process-1:2[webdriver:60]: Filling out a check-in form to get valid headers
2023-07-31 08:45:31 DEBUG Process-1:2[webdriver:201]: Setting valid headers from previous request
2023-07-31 08:45:31 DEBUG Process-1:2[checkin_handler:88]: Sleeping until check-in: 563 seconds...
2023-07-31 08:54:55 DEBUG Process-1:2[checkin_handler:109]: Attempting to check in
2023-07-31 08:54:55 DEBUG Process-1:2[checkin_handler:123]: Making GET request to check in
2023-07-31 08:55:07 DEBUG Process-1:2[utils:34]: Successfully made request after 4 attempts
2023-07-31 08:55:07 DEBUG Process-1:2[checkin_handler:129]: Making POST request to check in
2023-07-31 08:55:23 DEBUG Process-1:2[utils:41]: Failed to make request after 20 attempts: Too Many Requests 429
2023-07-31 08:55:23 DEBUG Process-1:2[utils:44]: Response body: {
"code": 429999999,
"message": "Error.",
"messageKey": "ERROR",
"httpStatusCode": "BAD_REQUEST",
"requestId": "",
"infoList": []
}
2023-07-31 08:55:23 DEBUG Process-1:2[checkin_handler:132]: Failed to check in. Error: Too Many Requests 429. Exiting
2023-07-31 08:55:23 DEBUG Process-1:2[notification_handler:100]: Sending failed check-in notification...

And now I'm trying to log into my account for the return flight, and am seeing too many requests on console:

https://github.com/electron/electron/releases/download/v20.3.8/chromedriver-v20.3.8-linux-arm64.zip
/home/pi/.local/share/undetected_chromedriver/chromedriver
Encountered a Too Many Requests error while logging in. Skipping reservation retrieval

Log:

2023-07-31 21:22:11 DEBUG MainProcess[log:23]: Initialized the application
2023-07-31 21:22:11 DEBUG MainProcess[main:87]: Called with 2 arguments
2023-07-31 21:22:16 DEBUG MainProcess[config:44]: Reading the configuration file
2023-07-31 21:22:16 DEBUG MainProcess[config:95]: Setting notification level to 1
2023-07-31 21:22:16 DEBUG MainProcess[config:109]: Using 1 notification services
2023-07-31 21:22:16 DEBUG MainProcess[config:121]: Setting retrieval interval to 24 hours
2023-07-31 21:22:16 DEBUG MainProcess[main:105]: Account added through CLI arguments
2023-07-31 21:22:16 DEBUG MainProcess[main:113]: Monitoring 1 accounts and 0 reservations
2023-07-31 21:22:16 DEBUG Process-1[reservation_monitor:133]: Retrieving reservations for account
2023-07-31 21:22:16 DEBUG Process-1[webdriver:138]: Starting webdriver for current session
2023-07-31 21:22:29 DEBUG Process-1[webdriver:173]: An exception occurred when initializing the webdriver: Name: TypeError. Error: 'NoneType' object is not subscriptable
2023-07-31 21:22:29 DEBUG Process-1[webdriver:179]: 2 more attempts
2023-07-31 21:22:40 DEBUG Process-1[webdriver:147]: Loading Southwest Check-In page
2023-07-31 21:23:12 DEBUG Process-1[webdriver:90]: Logging into account to get a list of reservations and valid headers
2023-07-31 21:23:27 DEBUG Process-1[webdriver:226]: Logging in failed for an unknown reason
2023-07-31 21:23:27 WARNING Process-1[reservation_monitor:142]: Encountered a Too Many Requests error while logging in. Skipping reservation retrieval
2023-07-31 21:23:27 DEBUG Process-1[reservation_monitor:94]: Sleeping for 86328 seconds

To Reproduce

  1. Run python southwest.py RESERVATION FIRSTNAME LASTNAME
  2. Run python southwest.py USERNAME PASSWORD

Expected Behavior

Should see a successful checkin. Also successful login and retrieval of upcoming reservation.

Version

Auto-Southwest Check-In v4.3

Additional context

No response

@darryllee darryllee added the bug Something isn't working label Aug 1, 2023
@jdholtz
Copy link
Owner

jdholtz commented Aug 1, 2023

Thanks for the detailed write-up. I’ll try later today with the same undetected chromedriver and Chrome v104 today to see if that’s the issue.

How did you get the image to build for ARMv7? I tried on my machine and it took about 20 minutes to build (because it was building a lot of libraries from scratch) and then failed.
Edit: Never mind, it doesn't appear you are using Docker.

@jdholtz
Copy link
Owner

jdholtz commented Aug 1, 2023

I'm not able to get Chromium v104, but I tried with Undetected Chromedriver 3.1.0 and did not run into any issues. Did you specify the Chrome version as 104 in your config.json? The logs don't seem to indicate that a specific version was set.

@darryllee
Copy link
Author

darryllee commented Aug 1, 2023 via email

@jdholtz
Copy link
Owner

jdholtz commented Aug 1, 2023

My guess is that the undetected chromedriver port you are using is the reason you are being detected by Southwest or . The regular library should work with ARMv7 except for the downloading of the chromedriver. In this case you can download your own (which it appears you already did) and add full path to it in the config.json under chromedriver_path.

@darryllee
Copy link
Author

Ooof, sorry I'm being dense. So I have upgraded my Chromium to 109, as I see there is already a "matching" chromedriver. Is this supposed to work with undetected_chromedriver? I do not know.

hi chromium-browser 109.0.5414.112-rpt2 arm64 Chromium web browser, open-source version of Chrome
ii chromium-chromedriver 109.0.5414.112-rpt2 arm64 WebDriver driver for the Chromium Browser

I grab the latest undetected_chromedriver by running:
pip install git+https://www.github.com/ultrafunkamsterdam/undetected-chromedriver@master # replace @master with @branchname for other branches

I make a copy of /usr/bin/chromedriver -> /home/pi/chromedriver_copy and specify it in config.json:

"chromedriver_path": "/home/pi/chromedriver_copy"

And now... I don't know what's wrong. :-{

$ python southwest.py -v
2023-08-01 21:23:53 DEBUG MainProcess[log:23]: Initialized the application
2023-08-01 21:23:53 DEBUG MainProcess[main:87]: Called with 0 arguments
2023-08-01 21:23:55 DEBUG MainProcess[config:44]: Reading the configuration file
2023-08-01 21:23:55 DEBUG MainProcess[config:137]: Adding 1 accounts from the configuration file
2023-08-01 21:23:55 DEBUG MainProcess[config:66]: Setting check fares to True
2023-08-01 21:23:55 DEBUG MainProcess[config:80]: Setting custom Chromedriver path
2023-08-01 21:23:55 DEBUG MainProcess[config:95]: Setting notification level to 1
2023-08-01 21:23:55 DEBUG MainProcess[config:109]: Using 1 notification services
2023-08-01 21:23:55 DEBUG MainProcess[config:121]: Setting retrieval interval to 24 hours
2023-08-01 21:23:55 DEBUG MainProcess[main:113]: Monitoring 1 accounts and 0 reservations
2023-08-01 21:23:55 DEBUG Process-1[reservation_monitor:133]: Retrieving reservations for account
2023-08-01 21:23:55 DEBUG Process-1[webdriver:138]: Starting webdriver for current session
could not detect version_main.therefore, we are assuming it is chrome 108 or higher
2023-08-01 21:23:57 DEBUG Process-1[webdriver:147]: Loading Southwest Check-In page
2023-08-01 21:23:58 DEBUG Process-1[webdriver:90]: Logging into account to get a list of reservations and valid headers
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/workplace/auto-southwest-check-in/lib/reservation_monitor.py", line 113, in monitor
reservations, skip_scheduling = self._get_reservations()
File "/home/pi/workplace/auto-southwest-check-in/lib/reservation_monitor.py", line 137, in _get_reservations
reservations = webdriver.get_reservations(self)
File "/home/pi/workplace/auto-southwest-check-in/lib/webdriver.py", line 94, in get_reservations
WebDriverWait(driver, 30).until(
File "/home/pi/.local/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 95, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x00558907ff44
#1 0x005588e6b4cc
#2 0x005588ea0cd0
#3 0x005588ed4c0c
#4 0x005588e95bfc
#5 0x005588e96c08
#6 0x0055890cb27c
#7 0x0055890cd93c
#8 0x0055890cdf8c
#9 0x0055890b63e4
#10 0x0055890ce6a8
#11 0x0055890a8b6c
#12 0x0055890ec288
#13 0x0055890ec408
#14 0x005589106110
#15 0x007f95143648 start_thread
#16 0x007f94c6ec1c

@darryllee
Copy link
Author

For good measure I upgraded to Chromium 113 and had the same problems with a slightly different stacktrace:

hi chromium-browser 113.0.5672.95-rpt1 arm64 Chromium web browser, open-source version of Chrome
ii chromium-chromedriver 113.0.5672.95-rpt1 arm64 WebDriver driver for the Chromium Browser

Errors - hum. Maybe I need to maybe clean install selenium, et al.

selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x00557635a088
#1 0x0055760c9808
#2 0x0055760fee70
#3 0x0055761321c4
#4 0x0055760f4aa8
#5 0x0055760f5a04
#6 0x005576320aec
#7 0x0055763236b0
#8 0x005576323c88
#9 0x00557632b6e4
#10 0x0055763242dc
#11 0x0055762feda0
#12 0x005576342e98
#13 0x005576343028
#14 0x0055763526c4
#15 0x007f95cf7648 start_thread
#16 0x007f95822c1c

@darryllee
Copy link
Author

GAH. OK! Ran pip install -r requirements.txt and it downgraded from undetected-chromedriver-3.5.0 to 3.1.7

And it ran without errors!

So for anyone else, THIS WORKED on Debian GNU/Linux 11 (bullseye) on a Raspberry Pi 4:

  • undetected-chromedriver-3.1.7 (which is specified in requirements.txt)

With these packages installed:

  • chromium-browser 113.0.5672.95-rpt1
  • chromium-chromedriver 113.0.5672.95-rpt1

Copy the chromedriver binary so it can be patched by undetected_chromedriver:
cp /usr/bin/chromedriver /home/pi/chromedriver_copy

Specify the location of the chromedriver in json.config:
"chromedriver_path": "/home/pi/chromedriver_copy"

WOOT! (Well, we'll see if I get checked in on Thursday night. :-)

@jdholtz
Copy link
Owner

jdholtz commented Aug 2, 2023

Good to hear! Currently, this script only works with undetected chromedriver up to 3.4.7. It doesn’t work with version 3.5.0 due to Selenium Wire, but I made a pull request to fix it. That might take a while to be merged, however, because that project is not currently active.

@jdholtz
Copy link
Owner

jdholtz commented Aug 5, 2023

Hey @darryllee, was the check in successful on your Raspberry Pi?

@darryllee
Copy link
Author

darryllee commented Aug 5, 2023 via email

@jdholtz
Copy link
Owner

jdholtz commented Aug 5, 2023

Nice! I’ll point anyone with a similar setup to this issue in the future. Thanks for taking your time to test and outline the process.

@jdholtz jdholtz closed this as completed Aug 5, 2023
@jdholtz jdholtz added dependency User has issues with the dependencies and removed bug Something isn't working labels Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency User has issues with the dependencies
Projects
None yet
Development

No branches or pull requests

2 participants