smkent / safeway-coupons

🥫 🎫 Automatic coupon clipper for Safeway's online "Safeway for U" coupons
GNU General Public License v3.0
57 stars 17 forks source link

Request for workaround: Safeway Account Authentication Failure For Multiple Users #87

Closed zhamoytin closed 1 year ago

zhamoytin commented 1 year ago

I'm running your software for myself and for my friends. And I have just discovered that it fails in the middle, because some friend changed the safeway account passowd. Could you please add some workaround for such scenario?

`Clipping coupons for Safeway account not_my_email@yahoo.com Connect to safeway.com Skipping cookie prompt which is not present Open Sign In sidebar Open Sign In form Populate Sign In form Deselect Keep Me Signed In Click Sign In button Wait for signed in landing page to load Would send email to not_my_email@yahoo.com

Safeway account: not_my_email@yahoo.com Error: Authentication Failure (Browser authentication timed out) <<<<<< Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/safeway_coupons/session.py", line 137, in _login wait.until(self._sign_in_success) File "/usr/local/lib/python3.11/site-packages/selenium/webdriver/support/wait.py", line 95, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/safeway_coupons/session.py", line 56, in init self._login(account) File "/usr/local/lib/python3.11/site-packages/safeway_coupons/session.py", line 158, in _login raise ExceptionWithAttachments( safeway_coupons.session.ExceptionWithAttachments: Browser authentication timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/bin/safeway-coupons", line 8, in sys.exit(main()) ^^^^^^ File "/usr/local/lib/python3.11/site-packages/safeway_coupons/app.py", line 101, in main sc.clip_for_account(account) File "/usr/local/lib/python3.11/site-packages/safeway_coupons/safeway.py", line 36, in clip_for_account swy = SafewayClient(account, self.debug_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/safeway_coupons/client.py", line 17, in init self.session = LoginSession(account, debug_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/safeway_coupons/session.py", line 58, in init raise AuthenticationFailure( safeway_coupons.errors.AuthenticationFailure: Authentication Failure (Browser authentication timed out) root@97f291ccee35:/# safeway-coupons -c accounts_file -d -n`

smkent commented 1 year ago

Thanks for the feedback! I've implemented this as an option in https://github.com/smkent/safeway-coupons/pull/90.

zhamoytin commented 1 year ago

Thanks for the quick fix!

Thanks for the feedback! I've implemented this as an option in #90.