Comments (24)
Interestingly, it's working now for me, with no changes made. Maybe something was intermittent on Southwest's side. I'll post again if it keeps happening.
I'm on Chrome 120
from auto-southwest-check-in.
@pcarn could you file a separate issue for this?
from auto-southwest-check-in.
Thanks for filing this issue. You could view the browser by changing headless=True
to headed=True
on line 118 of lib/webdriver.py
to see the browser loading the webpage and see what exactly is happening.
I probably should add a way to where you can view the browser through a flag, but for now you’ll have to manually edit the code.
from auto-southwest-check-in.
You could view the browser by changing headless=True to headed=True on line 118 of lib/webdriver.py to see the browser loading the webpage and see what exactly is happening.
I suspect I can't as I'm running this on a headless server (no UI, or no UI that I have access to).
If, without that information, there's no way to obtain further diagnostic data, feel free to close this out (as unfixable).
from auto-southwest-check-in.
I did set up a nearly identical setup as yours (same OS, Python version, and Chrome version) and was unfortunately not able to reproduce the issue.
If, without that information, there's no way to obtain further diagnostic data, feel free to close this out (as unfixable).
You could try google-chrome-beta
or Chromium (although that failed to login for me). I would like to solve the issue before closing it, so I'll keep it open.
from auto-southwest-check-in.
So I no longer have a Southwest flight to test with. Is there a good method to test if you don't have a current conf number and name combination? If so, I'm happy to give a different chromium browser a a try.
from auto-southwest-check-in.
Is there a good method to test if you don't have a current conf number and name combination?
Yes. You can either enter your account credentials to log in or a fake reservation to replicate the process.
from auto-southwest-check-in.
I'm having the same issue, when logging in with a user/password. My log shows this.
2024-03-13 11:46:18 DEBUG MainProcess[log:23]: Initialized the application
2024-03-13 11:46:18 DEBUG MainProcess[main:105]: Auto-Southwest Check-In v7.3
2024-03-13 11:46:18 DEBUG MainProcess[main:66]: Called with 0 arguments
2024-03-13 11:46:18 DEBUG MainProcess[config:132]: Initializing configuration file
2024-03-13 11:46:18 DEBUG MainProcess[config:161]: Reading the configuration file
2024-03-13 11:46:18 DEBUG MainProcess[config:174]: Reading configuration from environment variables
2024-03-13 11:46:18 DEBUG MainProcess[config:144]: Creating configurations for 4 accounts
2024-03-13 11:46:18 DEBUG MainProcess[main:90]: Monitoring 4 accounts and 0 reservations
2024-03-13 11:46:18 DEBUG Process-4[reservation_monitor:168]: Acquiring lock...
2024-03-13 11:46:18 DEBUG Process-4[reservation_monitor:170]: Lock acquired
2024-03-13 11:46:18 DEBUG Process-4[reservation_monitor:192]: Retrieving reservations for account
2024-03-13 11:46:18 DEBUG Process-4[webdriver:106]: Starting webdriver for current session
2024-03-13 11:46:18 DEBUG Process-3[reservation_monitor:168]: Acquiring lock...
2024-03-13 11:46:18 DEBUG Process-2[reservation_monitor:168]: Acquiring lock...
2024-03-13 11:46:18 DEBUG Process-1[reservation_monitor:168]: Acquiring lock...
2024-03-13 11:46:19 DEBUG Process-4[webdriver:122]: Using browser version: 120.0.6099.234
2024-03-13 11:46:19 DEBUG Process-4[webdriver:126]: Loading Southwest Check-In page
2024-03-13 11:46:19 DEBUG Process-4[webdriver:79]: Logging into account to get a list of reservations and valid headers
2024-03-13 11:46:25 DEBUG Process-4[webdriver:155]: Waiting for headers_set to be set
2024-03-13 11:46:27 DEBUG Process-4[webdriver:147]: Login response has been received
2024-03-13 11:46:28 DEBUG Process-4[webdriver:151]: Upcoming trips response has been received
With headed=True, the window shows this.
from auto-southwest-check-in.
From my quick debugging, looks like it is stuck on self._wait_for_attribute("headers_set")
. It never reaches this line, where request["url"] == CHECKIN_HEADERS_URL
.
from auto-southwest-check-in.
I'm having the same issue, when logging in with a user/password. My log shows this.
I'm not sure why that request isn't coming in even though the others are coming in perfectly fine. Perhaps updating your browser version works? Also, what browser are you using?
If you want to send me a little more details, you can put print(request["url"])
right above if request["url"] == CHECKIN_HEADERS_URL
and send me the output of that here so I can get a better understanding of the URLs you are getting.
from auto-southwest-check-in.
@jdholtz It's happening again for me - here is a log with the print(request["url"])
on one that gets stuck, and a successful one.
It appears it's looking for a https://mobile.southwest.com/api/chase/v2/chase/offers
request that never happens on the stuck one.
https://gist.github.com/pcarn/bd7bfbc758afbc786204502c6c1fa0ea
from auto-southwest-check-in.
Thanks. Since the login URL also has the request headers and the login is succeeding, I believe that changing request["url"] == CHECKIN_HEADERS_URL
to request["url"] == LOGIN_URL
will fix your issue. If it does, I can make the change to look for both of those URLs.
from auto-southwest-check-in.
That worked for me - the chase url was not in my output this time, but it was able to find my flights successfully.
from auto-southwest-check-in.
That worked for me - the chase url was not in my output this time, but it was able to find my flights successfully.
Great. Made the change locally, but one more thing to check: If you have the original code (revert the change made) and attempt to run the script with a reservation instead of a log in, will the CHECKIN_HEADERS_URL still not come through (I assume it will still get stuck)?
If it does, could you resend the print(request["url"])
output in reservation mode? Then I can look for another valid URL to use. The LOGIN_URL wouldn't work in this case because you aren't logging in.
from auto-southwest-check-in.
https://gist.github.com/pcarn/54301a189ae75c29ff9f9cf9da630461
from auto-southwest-check-in.
Thanks @pcarn. https://mobile.southwest.com/api/mobile-air-booking/v1/mobile-air-booking/feature/shopping-details
gives the headers for me, so that should work for you as well.
from auto-southwest-check-in.
I confirmed that URL works for me. Would you like a PR to add it?
from auto-southwest-check-in.
I confirmed that URL works for me. Would you like a PR to add it?
Awesome. I’ve already made the changes locally, and I’ll push them later today but I appreciate it.
I’ll leave this issue open for now because the original issue still has not been fixed. @gene1wood have you tried my suggestions about using Google Chrome Beta or Chromium?
from auto-southwest-check-in.
@jdholtz let me know if you want me to move this discussion elsewhere, but even run running the latest develop
branch I had a flight fail to check in, with this log:
2024-03-23 20:18:48 DEBUG Process-1[reservation_monitor:130]: Sleeping for 86356 seconds
2024-03-23 22:24:54 DEBUG Process-2:2[checkin_handler:100]: Acquiring lock...
2024-03-23 22:24:54 DEBUG Process-2:2[checkin_handler:102]: Lock acquired
2024-03-23 22:24:54 DEBUG Process-2:2[checkin_scheduler:51]: Refreshing headers for current session
2024-03-23 22:24:54 DEBUG Process-2:2[webdriver:109]: Starting webdriver for current session
2024-03-23 22:24:55 DEBUG Process-2:2[webdriver:125]: Using browser version: 122.0.6261.129
2024-03-23 22:24:55 DEBUG Process-2:2[webdriver:129]: Loading Southwest Check-In page
2024-03-23 22:24:56 DEBUG Process-2:2[webdriver:67]: Waiting for valid headers
2024-03-23 22:24:56 DEBUG Process-2:2[webdriver:158]: Waiting for headers_set to be set
from auto-southwest-check-in.
Hey @gene1wood, are you still running into this issue?
from auto-southwest-check-in.
Sure, sorry for the lack of response.
So I did a git pull
to get to version 7.4
And I ran
~/southwest/venv/bin/python southwest.py -v 1R08SZ First Last
using a fake confirmation number. (@jdholtz And you're saying that even with a non-existent confirmation number, the tool should progress past Loading Southwest Check-In page
is that right?)
Below is the output.
- Just a note for others reading, from
Starting webdriver for current session
to the next output lineUsing browser version: 124.0.6367.118
it took 1 minute 38 seconds. I only mention this as I was assuming it had hung there but then while I was writing this realized that step just took a long time. - As with version 7.3, it gets stuck at
Loading Southwest Check-In page
- I aborted after about 5 minutes, but if it's possible that it takes longer that would be good to know.
- I haven't yet tried using
google-chrome-beta
, but I'll do so now and report back.
$ ~/southwest/venv/bin/python southwest.py -v 1R08SZ First Last
2024-05-07 17:35:07 DEBUG MainProcess[log:23]: Initialized the application
2024-05-07 17:35:07 DEBUG MainProcess[main:105]: Auto-Southwest Check-In v7.4
2024-05-07 17:35:07 DEBUG MainProcess[main:66]: Called with 3 arguments
2024-05-07 17:35:07 DEBUG MainProcess[config:132]: Initializing configuration file
2024-05-07 17:35:07 DEBUG MainProcess[config:161]: Reading the configuration file
2024-05-07 17:35:07 DEBUG MainProcess[config:165]: No configuration file found. Using defaults
2024-05-07 17:35:07 DEBUG MainProcess[config:174]: Reading configuration from environment variables
2024-05-07 17:35:07 DEBUG MainProcess[main:79]: Adding reservation through CLI arguments
2024-05-07 17:35:07 DEBUG MainProcess[config:151]: Creating configurations for 1 reservations
2024-05-07 17:35:07 DEBUG MainProcess[main:90]: Monitoring 0 accounts and 1 reservations
2024-05-07 17:35:07 DEBUG Process-1[reservation_monitor:62]: Acquiring lock...
2024-05-07 17:35:07 DEBUG Process-1[reservation_monitor:64]: Lock acquired
2024-05-07 17:35:07 DEBUG Process-1[checkin_scheduler:51]: Refreshing headers for current session
2024-05-07 17:35:07 DEBUG Process-1[webdriver:133]: Starting webdriver for current session
2024-05-07 17:36:45 DEBUG Process-1[webdriver:149]: Using browser version: 124.0.6367.118
2024-05-07 17:36:45 DEBUG Process-1[webdriver:153]: Loading Southwest Check-In page
^C2024-05-07 17:42:26 INFO MainProcess[main:114]:
Ctrl+C pressed. Stopping all check-ins
Stopping monitoring for reservation with confirmation number 1R08SZ and name First Last
from auto-southwest-check-in.
Ok, interesting!
It looks like perhaps the issue all along was not understanding how slow the tool is.
I uninstalled google-chrome-stable
and attempted to install google-chrome-beta
. It appeared to hang after a number of minutes and so I aborted it and re-installed google-chrome-stable
.
I then ran the tool and just ignored it. It did actually finally complete. The issue was that it took 3 and a half minutes to progress from Loading Southwest Check-In page
to Waiting for valid headers
Maybe a good mitigation would be
- To add logging messages before these multi-minute long steps to indicate that it may take a long time to complete
- Add to the README details on what the user should expect to see, to know if the tool is hung or if it's just taking a long time. Maybe some example output with indicators about what happens at each point and where the delays are.
~/southwest/venv/bin/python southwest.py -v 1Q29TY Eugene Wood
2024-05-07 18:06:26 DEBUG MainProcess[log:23]: Initialized the application
2024-05-07 18:06:26 DEBUG MainProcess[main:105]: Auto-Southwest Check-In v7.4
2024-05-07 18:06:26 DEBUG MainProcess[main:66]: Called with 3 arguments
2024-05-07 18:06:26 DEBUG MainProcess[config:132]: Initializing configuration file
2024-05-07 18:06:26 DEBUG MainProcess[config:161]: Reading the configuration file
2024-05-07 18:06:26 DEBUG MainProcess[config:165]: No configuration file found. Using defaults
2024-05-07 18:06:26 DEBUG MainProcess[config:174]: Reading configuration from environment variables
2024-05-07 18:06:26 DEBUG MainProcess[main:79]: Adding reservation through CLI arguments
2024-05-07 18:06:26 DEBUG MainProcess[config:151]: Creating configurations for 1 reservations
2024-05-07 18:06:26 DEBUG MainProcess[main:90]: Monitoring 0 accounts and 1 reservations
2024-05-07 18:06:26 DEBUG Process-1[reservation_monitor:62]: Acquiring lock...
2024-05-07 18:06:26 DEBUG Process-1[reservation_monitor:64]: Lock acquired
2024-05-07 18:06:26 DEBUG Process-1[checkin_scheduler:51]: Refreshing headers for current session
2024-05-07 18:06:26 DEBUG Process-1[webdriver:133]: Starting webdriver for current session
Warning: uc_driver update needed. Getting it now:
*** chromedriver to download = 122.0.6261.128 (Legacy Version)
Downloading chromedriver-linux64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/linux64/chromedriver-linux64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-linux64.zip ...
Unzip Complete!
The file [uc_driver] was saved to:
/home/ubuntu/southwest/venv/lib/python3.10/site-packages/seleniumbase/drivers/uc_driver
Making [uc_driver 122.0.6261.128] executable ...
[uc_driver 122.0.6261.128] is now ready for use!
2024-05-07 18:06:57 DEBUG Process-1[webdriver:149]: Using browser version: 122.0.6261.111
2024-05-07 18:06:57 DEBUG Process-1[webdriver:153]: Loading Southwest Check-In page
2024-05-07 18:10:11 DEBUG Process-1[webdriver:88]: Waiting for valid headers
2024-05-07 18:10:11 DEBUG Process-1[webdriver:182]: Waiting for headers_set to be set
2024-05-07 18:10:38 DEBUG Process-1[webdriver:186]: headers_set set successfully
2024-05-07 18:10:43 DEBUG Process-1[reservation_monitor:86]: Scheduling flight check-ins for 1 reservations
2024-05-07 18:10:43 DEBUG Process-1[checkin_scheduler:78]: Retrieving reservation information
2024-05-07 18:10:59 DEBUG Process-1[utils:48]: Failed to make request after 21 attempts: Forbidden 403
2024-05-07 18:10:59 DEBUG Process-1[utils:50]: Response body: {
"code": 403050700
}
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:84]: Failed to retrieve reservation info. Error: Forbidden 403. Exiting
2024-05-07 18:10:59 DEBUG Process-1[notification_handler:78]: Sending failed reservation retrieval notification...
Failed to retrieve reservation for Eugene Wood with confirmation number 1Q29TY. Reason: Forbidden 403.
Make sure the reservation information is correct and try again.
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:58]: 0 flights found under current reservation
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:44]: 0 total flights were found
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:109]: 0 new flights found
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:113]: Scheduling 0 flights for check-in
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:125]: 0 flights are currently scheduled. Removing old flights
2024-05-07 18:10:59 DEBUG Process-1[checkin_scheduler:141]: Successfully removed old flights. 0 flights are now scheduled
2024-05-07 18:10:59 DEBUG Process-1[reservation_monitor:73]: No more flights are scheduled for check-in. Exiting...
from auto-southwest-check-in.
And you're saying that even with a non-existent confirmation number, the tool should progress past Loading Southwest Check-In page is that right?
Yes, that's correct.
It shouldn't take more than half a minute (for reference, my laptop completes it in less than 15 seconds). However, I did get really long load times when I was using a Raspberry Pi (3-5 minutes to load the page). I'm not too sure why it takes so long, but it could be possibly due to limited resources the computer has (although, running a browser should not be very resource intensive) or if there is a weak network connection. Are you running a server that may not have a strong connection to the internet? I've had some very long load times when my connection is weak.
Maybe a good mitigation would be
For 1, I can add something like Starting webdriver for current session (this may take a while)
and Loading Southwest Check-In page (this may take a while)
or perhaps just one message right after Refreshing headers for current session
that notes that it may take a while.
For 2, I can add an FAQ question (or somewhere else if you see a better fit) that describes that this situation may happen and note the log message that tells you when it may take a while.
Let me know your thoughts.
from auto-southwest-check-in.
it could be possibly due to limited resources the computer has (although, running a browser should not be very resource intensive) or if there is a weak network connection. Are you running a server that may not have a strong connection to the internet?
So in this case, it's not a bandwidth constraint, but more likely a compute constraint, I'm using an Oracle Cloud AMD-based compute VM with 1/8 OCPU and 1 GB memory (VM.Standard.E2.1.Micro
) (as they're free).
Let me know your thoughts.
Those sounds like good ideas to me. Thanks!
from auto-southwest-check-in.
Related Issues (20)
- Failed to log in to account with username XXXXX. Reason: Invalid credentials. Status code: 400. Passwords with non-alphanumeric characters? HOT 11
- Element click intercepted: Login Button is not clickable (Docker) HOT 13
- ModuleNotFoundError: No module named 'requests' HOT 19
- Forbidden 403 HOT 58
- Encountered a Too Many Requests error while logging in. Skipping reservation retrieval HOT 3
- AttributeError: 'WebDriver' object has no attribute 'add_cdp_listener' HOT 1
- Hang during setting headers_set HOT 7
- Failed to check in due to local time being ahead HOT 17
- ModuleNotFoundError: No module named 'requests' HOT 3
- Add devcontainer.json configuration to run the project on GitHub Codespaces
- Continuously hitting 403 error HOT 1
- Add jitter to requests time(s) HOT 1
- Add account / reservation level notification settings HOT 2
- Introduce a custom POST endpoint for "other" notifications HOT 1
- Headers not present on some requests HOT 4
- Reservation monitor hung with lock HOT 6
- Check-in attempt occurred 3 minutes late (didn't sleep computer) HOT 8
- Occasionally getting NTPExceptions - uncaught HOT 7
- "ERROR__AIR_TRAVEL__BEFORE_CHECKIN_WINDOW" on returning flight in a round trip reservation HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-southwest-check-in.