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

Doesn't handle changed flights #199

Open
rufus210 opened this issue Jan 8, 2024 · 8 comments
Open

Doesn't handle changed flights #199

rufus210 opened this issue Jan 8, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@rufus210
Copy link

rufus210 commented Jan 8, 2024

Version

Auto-Southwest Check-In v7.1

Browser Version

120.0.6099.199

Description

The script was already running, with the every-24-hour check happening around noon.
Sunday evening I changed my flight from Tuesday to Wednesday morning.
Monday morning it tried to check into the flight which failed. The failure email just says Reason: Bad Request 400.

To Reproduce

Change a flight after the script has already scheduled it.

I'm not sure if changing the flight before or after the every-24-hour check makes a difference. I also changed a later flight and during the 24-hour check I do not see a "Scheduling check-in for current flight" that updates

Expected Behavior

I see 2 improvements here:

  1. During [checkin_handler:103]: Sleeping until check-in: 1792 seconds... it could double-check the reservation time is still correct.
  2. The logs have the proper reason for the failed checkin. This should be sent in the email (It is too early to check in for this trip. You can check in 24 hours before departure. Come back on Jan 9, 2024 when it is 11:00AM in XXX)

Relevant logs and program output

2024-01-04 12:23:04 DEBUG MainProcess[log:23]: Initialized the application
2024-01-04 12:23:04 DEBUG MainProcess[main:112]: Auto-Southwest Check-In v7.1
2024-01-04 12:23:04 DEBUG MainProcess[main:113]: Called with 0 arguments
2024-01-04 12:23:05 DEBUG MainProcess[config:107]: Initializing configuration file
2024-01-04 12:23:05 DEBUG MainProcess[config:135]: Reading the configuration file
2024-01-04 12:23:05 DEBUG MainProcess[config:53]: Setting check fares to True
2024-01-04 12:23:05 DEBUG MainProcess[config:67]: Setting notification level to <NotificationLevel.INFO: 1>
2024-01-04 12:23:05 DEBUG MainProcess[config:80]: Using 1 notification services
2024-01-04 12:23:05 DEBUG MainProcess[config:84]: Setting retrieval interval to 24 hours
2024-01-04 12:23:05 DEBUG MainProcess[config:118]: Creating configurations for 2 accounts
2024-01-04 12:23:05 DEBUG MainProcess[config:80]: Using 2 notification services
2024-01-04 12:23:05 DEBUG MainProcess[config:125]: Creating configurations for 0 reservations
2024-01-04 12:23:05 DEBUG MainProcess[main:142]: Monitoring 2 accounts and 0 reservations
2024-01-04 12:23:05 DEBUG Process-2[reservation_monitor:154]: Acquiring lock...
2024-01-04 12:23:05 DEBUG Process-2[reservation_monitor:156]: Lock acquired
2024-01-04 12:23:05 DEBUG Process-2[reservation_monitor:178]: Retrieving reservations for account
2024-01-04 12:23:05 DEBUG Process-2[webdriver:103]: Starting webdriver for current session
2024-01-04 12:23:05 DEBUG Process-1[reservation_monitor:154]: Acquiring lock...
2024-01-04 12:23:08 DEBUG Process-2[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-04 12:23:08 DEBUG Process-2[webdriver:123]: Loading Southwest Check-In page
2024-01-04 12:23:13 DEBUG Process-2[webdriver:80]: Logging into account to get a list of reservations and valid headers
2024-01-04 12:23:15 DEBUG Process-2[webdriver:152]: Waiting for headers_set to be set
2024-01-04 12:23:15 DEBUG Process-2[webdriver:156]: headers_set set successfully
2024-01-04 12:23:17 DEBUG Process-2[webdriver:144]: Login response has been received
2024-01-04 12:23:18 DEBUG Process-2[webdriver:152]: Waiting for login_request_id to be set
2024-01-04 12:23:18 DEBUG Process-2[webdriver:156]: login_request_id set successfully
2024-01-04 12:23:18 DEBUG Process-2[webdriver:226]: First time logging in. Setting account name
2024-01-04 12:23:18 DEBUG Process-2[webdriver:152]: Waiting for trips_request_id to be set
2024-01-04 12:23:18 DEBUG Process-2[webdriver:148]: Upcoming trips response has been received
2024-01-04 12:23:18 DEBUG Process-2[webdriver:156]: trips_request_id set successfully
2024-01-04 12:23:18 DEBUG Process-2[reservation_monitor:197]: Successfully retrieved 2 reservations
2024-01-04 12:23:18 DEBUG Process-2[reservation_monitor:84]: Scheduling flight check-ins for 2 reservations
2024-01-04 12:23:18 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-04 12:23:23 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:23 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-04 12:23:23 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-04 12:23:23 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-04 12:23:25 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:25 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-04 12:23:25 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-04 12:23:25 DEBUG Process-2[checkin_scheduler:43]: 4 total flights were found
2024-01-04 12:23:25 DEBUG Process-2[checkin_scheduler:100]: 4 new flights found
2024-01-04 12:23:25 DEBUG Process-2[checkin_scheduler:104]: Scheduling 4 flights for check-in
2024-01-04 12:23:25 DEBUG Process-2[checkin_handler:41]: Scheduling check-in for current flight
2024-01-04 12:23:25 DEBUG Process-2[checkin_handler:41]: Scheduling check-in for current flight
2024-01-04 12:23:25 DEBUG Process-2[checkin_handler:41]: Scheduling check-in for current flight
2024-01-04 12:23:25 DEBUG Process-2[checkin_handler:41]: Scheduling check-in for current flight
2024-01-04 12:23:25 DEBUG Process-2[notification_handler:66]: Sending new flights notification
2024-01-04 12:23:25 DEBUG Process-2:2[checkin_handler:89]: Sleeping until thirty minutes before check-in...
2024-01-04 12:23:25 DEBUG Process-2:3[checkin_handler:89]: Sleeping until thirty minutes before check-in...
2024-01-04 12:23:25 DEBUG Process-2:1[checkin_handler:89]: Sleeping until thirty minutes before check-in...
2024-01-04 12:23:25 DEBUG Process-2:4[checkin_handler:89]: Sleeping until thirty minutes before check-in...
2024-01-04 12:23:27 DEBUG Process-2[checkin_scheduler:116]: 4 flights are currently scheduled. Removing old flights
2024-01-04 12:23:27 DEBUG Process-2[checkin_scheduler:132]: Successfully removed old flights. 4 flights are now scheduled
2024-01-04 12:23:27 DEBUG Process-2[reservation_monitor:93]: Checking fares for 4 flights
2024-01-04 12:23:27 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-04 12:23:27 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-04 12:23:32 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:32 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-04 12:23:32 DEBUG Process-2[reservation_monitor:104]: Flight cannot be changed online. Skipping fare check
2024-01-04 12:23:32 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-04 12:23:32 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-04 12:23:36 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:36 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-04 12:23:36 DEBUG Process-2[reservation_monitor:104]: Flight cannot be changed online. Skipping fare check
2024-01-04 12:23:36 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-04 12:23:36 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-04 12:23:38 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:38 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-04 12:23:39 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:39 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-04 12:23:41 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:41 DEBUG Process-2[fare_checker:50]: Found 13 matching flights
2024-01-04 12:23:41 DEBUG Process-2[fare_checker:37]: Flight price change found for +1 USD
2024-01-04 12:23:41 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-04 12:23:41 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-04 12:23:43 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:43 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-04 12:23:44 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:44 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-04 12:23:46 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:46 DEBUG Process-2[fare_checker:50]: Found 14 matching flights
2024-01-04 12:23:46 DEBUG Process-2[fare_checker:37]: Flight price change found for -1 USD
2024-01-04 12:23:46 DEBUG Process-1[reservation_monitor:156]: Lock acquired
2024-01-04 12:23:46 DEBUG Process-1[reservation_monitor:178]: Retrieving reservations for account
2024-01-04 12:23:46 DEBUG Process-1[webdriver:103]: Starting webdriver for current session
2024-01-04 12:23:46 DEBUG Process-2[reservation_monitor:167]: Lock released
2024-01-04 12:23:46 DEBUG Process-2[reservation_monitor:116]: Sleeping for 86358 seconds
2024-01-04 12:23:48 DEBUG Process-1[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-04 12:23:48 DEBUG Process-1[webdriver:123]: Loading Southwest Check-In page
2024-01-04 12:23:52 DEBUG Process-1[webdriver:80]: Logging into account to get a list of reservations and valid headers
2024-01-04 12:23:54 DEBUG Process-1[webdriver:152]: Waiting for headers_set to be set
2024-01-04 12:23:54 DEBUG Process-1[webdriver:156]: headers_set set successfully
2024-01-04 12:23:55 DEBUG Process-1[webdriver:144]: Login response has been received
2024-01-04 12:23:56 DEBUG Process-1[webdriver:152]: Waiting for login_request_id to be set
2024-01-04 12:23:56 DEBUG Process-1[webdriver:156]: login_request_id set successfully
2024-01-04 12:23:56 DEBUG Process-1[webdriver:226]: First time logging in. Setting account name
2024-01-04 12:23:56 DEBUG Process-1[webdriver:152]: Waiting for trips_request_id to be set
2024-01-04 12:23:56 DEBUG Process-1[webdriver:148]: Upcoming trips response has been received
2024-01-04 12:23:56 DEBUG Process-1[webdriver:156]: trips_request_id set successfully
2024-01-04 12:23:56 DEBUG Process-1[reservation_monitor:197]: Successfully retrieved 2 reservations
2024-01-04 12:23:56 DEBUG Process-1[reservation_monitor:84]: Scheduling flight check-ins for 2 reservations
2024-01-04 12:23:56 DEBUG Process-1[checkin_scheduler:76]: Retrieving reservation information
2024-01-04 12:23:58 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:23:58 DEBUG Process-1[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-04 12:23:58 DEBUG Process-1[checkin_scheduler:57]: 1 flights found under current reservation
2024-01-04 12:23:58 DEBUG Process-1[checkin_scheduler:76]: Retrieving reservation information
2024-01-04 12:24:00 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:00 DEBUG Process-1[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-04 12:24:00 DEBUG Process-1[checkin_scheduler:57]: 1 flights found under current reservation
2024-01-04 12:24:00 DEBUG Process-1[checkin_scheduler:43]: 2 total flights were found
2024-01-04 12:24:00 DEBUG Process-1[checkin_scheduler:100]: 2 new flights found
2024-01-04 12:24:00 DEBUG Process-1[checkin_scheduler:104]: Scheduling 2 flights for check-in
2024-01-04 12:24:00 DEBUG Process-1[checkin_handler:41]: Scheduling check-in for current flight
2024-01-04 12:24:00 DEBUG Process-1[checkin_handler:41]: Scheduling check-in for current flight
2024-01-04 12:24:00 DEBUG Process-1[notification_handler:66]: Sending new flights notification
2024-01-04 12:24:00 DEBUG Process-1:1[checkin_handler:89]: Sleeping until thirty minutes before check-in...
2024-01-04 12:24:00 DEBUG Process-1:2[checkin_handler:89]: Sleeping until thirty minutes before check-in...
2024-01-04 12:24:01 DEBUG Process-1[checkin_scheduler:116]: 2 flights are currently scheduled. Removing old flights
2024-01-04 12:24:01 DEBUG Process-1[checkin_scheduler:132]: Successfully removed old flights. 2 flights are now scheduled
2024-01-04 12:24:01 DEBUG Process-1[reservation_monitor:93]: Checking fares for 2 flights
2024-01-04 12:24:01 DEBUG Process-1[fare_checker:30]: Checking current price for flight
2024-01-04 12:24:01 DEBUG Process-1[fare_checker:88]: Fetching reservation information
2024-01-04 12:24:04 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:04 DEBUG Process-1[fare_checker:103]: Retrieving search information for the current flight
2024-01-04 12:24:06 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:06 DEBUG Process-1[fare_checker:82]: Retrieving matching flights
2024-01-04 12:24:08 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:08 DEBUG Process-1[fare_checker:50]: Found 15 matching flights
2024-01-04 12:24:08 DEBUG Process-1[fare_checker:37]: Flight price change found for 0 USD
2024-01-04 12:24:08 DEBUG Process-1[fare_checker:30]: Checking current price for flight
2024-01-04 12:24:08 DEBUG Process-1[fare_checker:88]: Fetching reservation information
2024-01-04 12:24:09 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:09 DEBUG Process-1[fare_checker:103]: Retrieving search information for the current flight
2024-01-04 12:24:11 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:11 DEBUG Process-1[fare_checker:82]: Retrieving matching flights
2024-01-04 12:24:14 DEBUG Process-1[utils:34]: Successfully made request after 1 attempts
2024-01-04 12:24:14 DEBUG Process-1[fare_checker:50]: Found 14 matching flights
2024-01-04 12:24:14 DEBUG Process-1[fare_checker:37]: Flight price change found for +1 USD
2024-01-04 12:24:14 DEBUG Process-1[reservation_monitor:167]: Lock released
2024-01-04 12:24:14 DEBUG Process-1[reservation_monitor:116]: Sleeping for 86331 seconds
2024-01-04 13:19:55 DEBUG Process-1:1[checkin_handler:94]: Acquiring lock...
2024-01-04 13:19:55 DEBUG Process-1:1[checkin_handler:96]: Lock acquired
2024-01-04 13:19:55 DEBUG Process-1:1[checkin_scheduler:50]: Refreshing headers for current session
2024-01-04 13:19:55 DEBUG Process-1:1[webdriver:103]: Starting webdriver for current session
2024-01-04 13:19:56 DEBUG Process-1:1[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-04 13:19:56 DEBUG Process-1:1[webdriver:123]: Loading Southwest Check-In page
2024-01-04 13:19:59 DEBUG Process-1:1[webdriver:65]: Waiting for valid headers
2024-01-04 13:19:59 DEBUG Process-1:1[webdriver:152]: Waiting for headers_set to be set
2024-01-04 13:19:59 DEBUG Process-1:1[webdriver:156]: headers_set set successfully
2024-01-04 13:20:00 DEBUG Process-1:1[checkin_handler:99]: Lock released
2024-01-04 13:20:00 DEBUG Process-1:1[checkin_handler:103]: Sleeping until check-in: 1794 seconds...
2024-01-04 13:49:55 DEBUG Process-1:1[checkin_handler:124]: Attempting to check in
2024-01-04 13:49:55 DEBUG Process-1:1[checkin_handler:138]: Making GET request to check in
2024-01-04 13:50:09 DEBUG Process-1:1[utils:34]: Successfully made request after 7 attempts
2024-01-04 13:50:09 DEBUG Process-1:1[checkin_handler:144]: Making POST request to check in
2024-01-04 13:50:13 DEBUG Process-1:1[utils:34]: Successfully made request after 1 attempts
2024-01-04 13:50:13 DEBUG Process-1:1[checkin_handler:151]: Successfully checked in!
2024-01-04 13:50:13 DEBUG Process-1:1[notification_handler:99]: Sending successful check-in notification...
2024-01-05 12:23:05 DEBUG Process-2[reservation_monitor:154]: Acquiring lock...
2024-01-05 12:23:05 DEBUG Process-1[reservation_monitor:154]: Acquiring lock...
2024-01-05 12:23:05 DEBUG Process-2[reservation_monitor:156]: Lock acquired
2024-01-05 12:23:05 DEBUG Process-2[reservation_monitor:178]: Retrieving reservations for account
2024-01-05 12:23:05 DEBUG Process-2[webdriver:103]: Starting webdriver for current session
2024-01-05 12:23:07 DEBUG Process-2[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-05 12:23:07 DEBUG Process-2[webdriver:123]: Loading Southwest Check-In page
2024-01-05 12:23:12 DEBUG Process-2[webdriver:80]: Logging into account to get a list of reservations and valid headers
2024-01-05 12:23:14 DEBUG Process-2[webdriver:152]: Waiting for headers_set to be set
2024-01-05 12:23:14 DEBUG Process-2[webdriver:156]: headers_set set successfully
2024-01-05 12:23:15 DEBUG Process-2[webdriver:144]: Login response has been received
2024-01-05 12:23:16 DEBUG Process-2[webdriver:152]: Waiting for login_request_id to be set
2024-01-05 12:23:16 DEBUG Process-2[webdriver:156]: login_request_id set successfully
2024-01-05 12:23:16 DEBUG Process-2[webdriver:152]: Waiting for trips_request_id to be set
2024-01-05 12:23:17 DEBUG Process-2[webdriver:148]: Upcoming trips response has been received
2024-01-05 12:23:17 DEBUG Process-2[webdriver:156]: trips_request_id set successfully
2024-01-05 12:23:17 DEBUG Process-2[reservation_monitor:197]: Successfully retrieved 2 reservations
2024-01-05 12:23:17 DEBUG Process-2[reservation_monitor:84]: Scheduling flight check-ins for 2 reservations
2024-01-05 12:23:17 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-05 12:23:22 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:22 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-05 12:23:22 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-05 12:23:22 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-05 12:23:24 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:43]: 4 total flights were found
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:100]: 0 new flights found
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:104]: Scheduling 0 flights for check-in
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:116]: 4 flights are currently scheduled. Removing old flights
2024-01-05 12:23:24 DEBUG Process-2[checkin_scheduler:132]: Successfully removed old flights. 4 flights are now scheduled
2024-01-05 12:23:24 DEBUG Process-2[reservation_monitor:93]: Checking fares for 4 flights
2024-01-05 12:23:24 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-05 12:23:24 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-05 12:23:28 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:28 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-05 12:23:28 DEBUG Process-2[reservation_monitor:104]: Flight cannot be changed online. Skipping fare check
2024-01-05 12:23:28 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-05 12:23:28 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-05 12:23:33 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:33 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-05 12:23:33 DEBUG Process-2[reservation_monitor:104]: Flight cannot be changed online. Skipping fare check
2024-01-05 12:23:33 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-05 12:23:33 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-05 12:23:35 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:35 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-05 12:23:37 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:37 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-05 12:23:39 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:39 DEBUG Process-2[fare_checker:50]: Found 13 matching flights
2024-01-05 12:23:39 DEBUG Process-2[fare_checker:37]: Flight price change found for +1 USD
2024-01-05 12:23:39 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-05 12:23:39 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-05 12:23:40 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:40 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-05 12:23:42 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:42 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-05 12:23:44 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-05 12:23:44 DEBUG Process-2[fare_checker:50]: Found 14 matching flights
2024-01-05 12:23:44 DEBUG Process-2[fare_checker:37]: Flight price change found for -1 USD
2024-01-05 12:23:44 DEBUG Process-1[reservation_monitor:156]: Lock acquired
2024-01-05 12:23:44 DEBUG Process-1[reservation_monitor:178]: Retrieving reservations for account
2024-01-05 12:23:44 DEBUG Process-1[webdriver:103]: Starting webdriver for current session
2024-01-05 12:23:44 DEBUG Process-2[reservation_monitor:167]: Lock released
2024-01-05 12:23:44 DEBUG Process-2[reservation_monitor:116]: Sleeping for 86361 seconds
2024-01-05 12:23:45 DEBUG Process-1[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-05 12:23:45 DEBUG Process-1[webdriver:123]: Loading Southwest Check-In page
2024-01-05 12:23:48 DEBUG Process-1[webdriver:80]: Logging into account to get a list of reservations and valid headers
2024-01-05 12:23:51 DEBUG Process-1[webdriver:152]: Waiting for headers_set to be set
2024-01-05 12:23:51 DEBUG Process-1[webdriver:156]: headers_set set successfully
2024-01-05 12:23:52 DEBUG Process-1[webdriver:144]: Login response has been received
2024-01-05 12:23:56 DEBUG Process-1[webdriver:186]: Login form failed to submit. Clicking login button again
2024-01-06 12:23:05 DEBUG Process-2[reservation_monitor:154]: Acquiring lock...
2024-01-06 12:23:05 DEBUG Process-2[reservation_monitor:156]: Lock acquired
2024-01-06 12:23:05 DEBUG Process-2[reservation_monitor:178]: Retrieving reservations for account
2024-01-06 12:23:05 DEBUG Process-2[webdriver:103]: Starting webdriver for current session
2024-01-06 12:23:07 DEBUG Process-2[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-06 12:23:07 DEBUG Process-2[webdriver:123]: Loading Southwest Check-In page
2024-01-06 12:23:13 DEBUG Process-2[webdriver:80]: Logging into account to get a list of reservations and valid headers
2024-01-06 12:23:15 DEBUG Process-2[webdriver:152]: Waiting for headers_set to be set
2024-01-06 12:23:15 DEBUG Process-2[webdriver:156]: headers_set set successfully
2024-01-06 12:23:17 DEBUG Process-2[webdriver:144]: Login response has been received
2024-01-06 12:23:17 DEBUG Process-2[webdriver:152]: Waiting for login_request_id to be set
2024-01-06 12:23:17 DEBUG Process-2[webdriver:156]: login_request_id set successfully
2024-01-06 12:23:17 DEBUG Process-2[webdriver:152]: Waiting for trips_request_id to be set
2024-01-06 12:23:18 DEBUG Process-2[webdriver:148]: Upcoming trips response has been received
2024-01-06 12:23:18 DEBUG Process-2[webdriver:156]: trips_request_id set successfully
2024-01-06 12:23:19 DEBUG Process-2[reservation_monitor:197]: Successfully retrieved 2 reservations
2024-01-06 12:23:19 DEBUG Process-2[reservation_monitor:84]: Scheduling flight check-ins for 2 reservations
2024-01-06 12:23:19 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-06 12:23:23 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:23 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-06 12:23:23 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-06 12:23:23 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-06 12:23:25 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:43]: 4 total flights were found
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:100]: 0 new flights found
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:104]: Scheduling 0 flights for check-in
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:116]: 4 flights are currently scheduled. Removing old flights
2024-01-06 12:23:25 DEBUG Process-2[checkin_scheduler:132]: Successfully removed old flights. 4 flights are now scheduled
2024-01-06 12:23:25 DEBUG Process-2[reservation_monitor:93]: Checking fares for 4 flights
2024-01-06 12:23:25 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-06 12:23:25 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-06 12:23:30 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:30 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-06 12:23:30 DEBUG Process-2[reservation_monitor:104]: Flight cannot be changed online. Skipping fare check
2024-01-06 12:23:30 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-06 12:23:30 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-06 12:23:34 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:34 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-06 12:23:34 DEBUG Process-2[reservation_monitor:104]: Flight cannot be changed online. Skipping fare check
2024-01-06 12:23:34 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-06 12:23:34 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-06 12:23:36 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:36 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-06 12:23:39 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:39 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-06 12:23:41 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:41 DEBUG Process-2[fare_checker:50]: Found 13 matching flights
2024-01-06 12:23:41 DEBUG Process-2[fare_checker:37]: Flight price change found for +1 USD
2024-01-06 12:23:41 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-06 12:23:41 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-06 12:23:42 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:42 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-06 12:23:44 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:44 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-06 12:23:45 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-06 12:23:45 DEBUG Process-2[fare_checker:50]: Found 14 matching flights
2024-01-06 12:23:45 DEBUG Process-2[fare_checker:37]: Flight price change found for -1 USD
2024-01-06 12:23:45 DEBUG Process-2[reservation_monitor:167]: Lock released
2024-01-06 12:23:45 DEBUG Process-2[reservation_monitor:116]: Sleeping for 86359 seconds
2024-01-07 12:23:05 DEBUG Process-2[reservation_monitor:154]: Acquiring lock...
2024-01-07 12:23:05 DEBUG Process-2[reservation_monitor:156]: Lock acquired
2024-01-07 12:23:05 DEBUG Process-2[reservation_monitor:178]: Retrieving reservations for account
2024-01-07 12:23:05 DEBUG Process-2[webdriver:103]: Starting webdriver for current session
2024-01-07 12:23:06 DEBUG Process-2[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-07 12:23:06 DEBUG Process-2[webdriver:123]: Loading Southwest Check-In page
2024-01-07 12:23:12 DEBUG Process-2[webdriver:80]: Logging into account to get a list of reservations and valid headers
2024-01-07 12:23:14 DEBUG Process-2[webdriver:152]: Waiting for headers_set to be set
2024-01-07 12:23:14 DEBUG Process-2[webdriver:156]: headers_set set successfully
2024-01-07 12:23:16 DEBUG Process-2[webdriver:144]: Login response has been received
2024-01-07 12:23:16 DEBUG Process-2[webdriver:152]: Waiting for login_request_id to be set
2024-01-07 12:23:16 DEBUG Process-2[webdriver:156]: login_request_id set successfully
2024-01-07 12:23:16 DEBUG Process-2[webdriver:152]: Waiting for trips_request_id to be set
2024-01-07 12:23:17 DEBUG Process-2[webdriver:148]: Upcoming trips response has been received
2024-01-07 12:23:17 DEBUG Process-2[webdriver:156]: trips_request_id set successfully
2024-01-07 12:23:17 DEBUG Process-2[reservation_monitor:197]: Successfully retrieved 4 reservations
2024-01-07 12:23:17 DEBUG Process-2[reservation_monitor:84]: Scheduling flight check-ins for 4 reservations
2024-01-07 12:23:17 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-07 12:23:19 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:19 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-07 12:23:19 DEBUG Process-2[checkin_scheduler:57]: 1 flights found under current reservation
2024-01-07 12:23:19 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-07 12:23:21 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:21 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-07 12:23:21 DEBUG Process-2[checkin_scheduler:57]: 1 flights found under current reservation
2024-01-07 12:23:21 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-07 12:23:25 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:25 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-07 12:23:25 DEBUG Process-2[checkin_scheduler:57]: 1 flights found under current reservation
2024-01-07 12:23:25 DEBUG Process-2[checkin_scheduler:76]: Retrieving reservation information
2024-01-07 12:23:27 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:89]: Successfully retrieved reservation information
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:57]: 2 flights found under current reservation
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:43]: 5 total flights were found
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:100]: 0 new flights found
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:104]: Scheduling 0 flights for check-in
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:116]: 4 flights are currently scheduled. Removing old flights
2024-01-07 12:23:27 DEBUG Process-2[checkin_handler:52]: Stopping check-in for current flight
2024-01-07 12:23:27 DEBUG Process-2[checkin_handler:55]: Killing process with PID 1741239
2024-01-07 12:23:27 DEBUG Process-2[checkin_handler:59]: Waiting for process with PID 1741239 to be terminated
2024-01-07 12:23:27 DEBUG Process-2[checkin_handler:65]: Process with PID 1741239 successfully terminated
2024-01-07 12:23:27 DEBUG Process-2[checkin_scheduler:132]: Successfully removed old flights. 3 flights are now scheduled
2024-01-07 12:23:27 DEBUG Process-2[reservation_monitor:93]: Checking fares for 3 flights
2024-01-07 12:23:27 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-07 12:23:27 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-07 12:23:30 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:30 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-07 12:23:33 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:33 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-07 12:23:35 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:35 DEBUG Process-2[fare_checker:50]: Found 12 matching flights
2024-01-07 12:23:35 DEBUG Process-2[fare_checker:37]: Flight price change found for +146 USD
2024-01-07 12:23:35 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-07 12:23:35 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-07 12:23:37 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:37 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-07 12:23:39 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:39 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-07 12:23:41 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:41 DEBUG Process-2[fare_checker:50]: Found 13 matching flights
2024-01-07 12:23:41 DEBUG Process-2[fare_checker:37]: Flight price change found for +1 USD
2024-01-07 12:23:41 DEBUG Process-2[fare_checker:30]: Checking current price for flight
2024-01-07 12:23:41 DEBUG Process-2[fare_checker:88]: Fetching reservation information
2024-01-07 12:23:43 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:43 DEBUG Process-2[fare_checker:103]: Retrieving search information for the current flight
2024-01-07 12:23:44 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:44 DEBUG Process-2[fare_checker:82]: Retrieving matching flights
2024-01-07 12:23:46 DEBUG Process-2[utils:34]: Successfully made request after 1 attempts
2024-01-07 12:23:46 DEBUG Process-2[fare_checker:50]: Found 14 matching flights
2024-01-07 12:23:46 DEBUG Process-2[fare_checker:37]: Flight price change found for -1 USD
2024-01-07 12:23:46 DEBUG Process-2[reservation_monitor:167]: Lock released
2024-01-07 12:23:46 DEBUG Process-2[reservation_monitor:116]: Sleeping for 86359 seconds
2024-01-08 10:29:55 DEBUG Process-1:2[checkin_handler:94]: Acquiring lock...
2024-01-08 10:29:55 DEBUG Process-1:2[checkin_handler:96]: Lock acquired
2024-01-08 10:29:55 DEBUG Process-1:2[checkin_scheduler:50]: Refreshing headers for current session
2024-01-08 10:29:55 DEBUG Process-1:2[webdriver:103]: Starting webdriver for current session
2024-01-08 10:29:56 DEBUG Process-1:2[webdriver:119]: Using browser version: 120.0.6099.199
2024-01-08 10:29:56 DEBUG Process-1:2[webdriver:123]: Loading Southwest Check-In page
2024-01-08 10:30:02 DEBUG Process-1:2[webdriver:65]: Waiting for valid headers
2024-01-08 10:30:02 DEBUG Process-1:2[webdriver:152]: Waiting for headers_set to be set
2024-01-08 10:30:02 DEBUG Process-1:2[webdriver:156]: headers_set set successfully
2024-01-08 10:30:02 DEBUG Process-1:2[checkin_handler:99]: Lock released
2024-01-08 10:30:02 DEBUG Process-1:2[checkin_handler:103]: Sleeping until check-in: 1792 seconds...
2024-01-08 10:59:55 DEBUG Process-1:2[checkin_handler:124]: Attempting to check in
2024-01-08 10:59:55 DEBUG Process-1:2[checkin_handler:138]: Making GET request to check in
2024-01-08 11:00:23 DEBUG Process-1:2[utils:41]: Failed to make request after 20 attempts: Bad Request 400
2024-01-08 11:00:23 DEBUG Process-1:2[utils:44]: Response body: {"code":400308191,"message":"It is too early to check in for this trip. You can check in 24 hours before departure. Come back on Jan 9, 2024 when it is 11:00AM in San Diego","messageKey":"ERROR__AIR_TRAVEL__BEFORE_CHECKIN_WINDOW","header":null,"httpStatusCode":"BAD_REQUEST","requestId":"no-exp-id:0.da17dd17.1704740422.a687d93f:mweb","infoList":[]}
2024-01-08 11:00:23 DEBUG Process-1:2[checkin_handler:147]: Failed to check in. Error: Bad Request 400. Exiting
2024-01-08 11:00:23 DEBUG Process-1:2[notification_handler:108]: Sending failed check-in notification...

Additional context

No response

@rufus210 rufus210 added the bug Something isn't working label Jan 8, 2024
@jdholtz
Copy link
Owner

jdholtz commented Jan 8, 2024

Thank you for reporting this. This bug is actually a regression from v6.1 when I changed the script to check if two flights were equal by their flight number. However, it didn't handle the departure time changing. Now this is fixed by checking both.

In a scenario like this, the old flight (before the change) would be canceled and the new flight (after the change) would be scheduled.

I also added a test to ensure this bug will be caught later down the line.

During [checkin_handler:103]: Sleeping until check-in: 1792 seconds... it could double-check the reservation time is still correct.

My fix still doesn't handle the issue of changing it within 24 hours of the flight (I actually forgot about this when pushing the fix). I can definitely add a check to reprocess the reservation again right before this message. The other option would be to just lower the retrieval interval--which seems worse. Let me know your thoughts on this.

@rufus210
Copy link
Author

rufus210 commented Jan 9, 2024

I think lowering the retrieval interval isn't a great answer, since you can never really get it reasonably "low enough". I think reprocess the reservation at the 30 minute mark before the final scheduling is basically as good as you can get.

@jdholtz
Copy link
Owner

jdholtz commented Jan 9, 2024

I agree with not lowering the retrieval interval.

TL;DR for the below:
Specifying to ignore the error in the notification would be a good solution. The new flight would still be checked in (due to my commit above), so this error can now be safely ignored.

Longer explanation:

It actually is a lot more complicated to try to reprocess the reservation 30 minutes before check-in. The reasoning is that, once a check-in is scheduled, it is put into a separate process. This means that, once it ends, everything created from it ends as well. Triggering a reprocessing of a reservation may detect a change like this and set up the schedule for the new flight. However, once the original flight's check-in ends or is canceled (which would be done through the script as it would see that flight is no longer valid), all new flights scheduled like this would die.

Due to these issues, I think your second solution would actually work better. Due to the changes I made above, the next time the flight retrieves the reservations, a new flight would be scheduled and the old flight would be canceled. Since the change happened within 24 hours of the old flight's check-in, the old flight would still attempt to check in and fail. In this case, a notification can be sent with something along the lines of Flight is too early to check in. If you recently changed this flight, you can ignore this error. The new flight (after the change) would still be checked in correctly.

The only issue I can see with this is that, if the retrieval interval is high--say 48 hours--it wouldn't schedule the new flight to check in if it was changed 1.5 days before the check-in (as it was in your case). I would argue that this is more of a user issue though as they shouldn't be configuring a high retrieval interval if they change flights right before the check-in.

@jdholtz
Copy link
Owner

jdholtz commented Jan 11, 2024

I've been thinking about this a bit more and there are two scenarios I can think of that are affected in this issue:

  1. A flight is rescheduled within 24 hours of the check-in to just a few hours later (both before the next retrieval interval).

In this case, the script would fail for the first flight (as it was changed and is too early to check in) and not even schedule the next flight (the next retrieval has not been triggered yet).

I don't believe this is really an issue though since this situation is so rare (the average user will never have this happen). The workaround here--in the case that someone does frequently do this for some reason--is to lower the retrieval interval. That is partly the purpose of having a configurable retrieval interval, so someone can adjust it depending on how often they schedule/change flights.

With the way the script is structured, checking right before a flight checks in is infeasible. Majorly refactoring it to accommodate for this situation that affects a very small percentage of users (if any) doesn't seem worth it. Any suggestions on how to implement this cleanly are welcome.

  1. A flight is rescheduled within 24 hours of the check-in to over a day later (after the next retrieval is triggered). This is what happened in the situation described in this issue.

The old flight would fail to check in, as it is too early (the notification can be adjusted to say Ignore this error). However, the new flight would be scheduled to check in on the next retrieval (with my commit attached) and successfully check in once its check-in time is reached.

@rufus210
Copy link
Author

A flight is rescheduled within 24 hours of the check-in to just a few hours later (both before the next retrieval interval).

I can imagine this actually isn't too rare. Lets say I have a noon flight, and the day before the flight I reschedule from noon to 5pm.

I hadn't appreciated that it's an actual process that's spawned for each checkin. I can think of 2 ways to solve this:

  1. The parent switches from using sleep() to select(), which can be interrupted by a child signal. If a child sees that its flight no longer exists it signals back to the parent to trigger a re-processing.
  2. Don't spawn the checkin process until the final 30-minute point. The parent process keeps track of when closest "interesting event" is, where by default the next interesting event is the regular 24-hour check, and sleeps until that point. If there is a checkin at say 10 hours from the regular process it will sleep for 10 hours and do a full reprocess scan. At that point it will see the checkin is within 30 minutes and spawn a process to do that checkin.

Both work better with my idea of a fixed regular processing time (say 3am).

@jdholtz
Copy link
Owner

jdholtz commented Jan 16, 2024

Thanks for the detailed response. I like solution 2 and will implement it when I have the time. I’m not very familiar with select, but reading the Python documentation, there looks to be a lot of OS-dependent functionality that I want to try and avoid.

@Royal2000H
Copy link

Came here to open an issue and saw the issue already exists! Just here to state I encountered the same thing, guess it's not that crazy of an edge case.

My experience:

On Sunday AM (>24 hour from flight on Monday), rescheduled flight from Monday PM to Tuesday PM.
It still tried to check me in but failed with "Failed to check in to flight * for *. Reason: Too Many Requests 429."

And then on Monday, it did not check me in for the Tuesday flight.

I guess a refresh of the flight data on failure would help solve my case (but would not help solve the case of moving the flight up a few hours earlier).

@jdholtz jdholtz closed this as completed in f285437 Feb 7, 2024
@jdholtz jdholtz reopened this Feb 7, 2024
@jdholtz
Copy link
Owner

jdholtz commented Feb 7, 2024

This was not totally fixed in the commit above

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