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

Infinite loop when usage page not loading #2

Closed
tankdeer opened this issue May 6, 2024 · 1 comment · Fixed by #3
Closed

Infinite loop when usage page not loading #2

tankdeer opened this issue May 6, 2024 · 1 comment · Fixed by #3

Comments

@tankdeer
Copy link

tankdeer commented May 6, 2024

It seems like Xfinity is currently having issues with their site (shocker). If I try to log in manually right now and load the usage page, it tells me it's having issues and logs me out. However when the addon tries to do the same, it appears to get stuck in an infinite loop.

I'm no python dev, but it appears that this current scenario is causing us to get stuck in this portion of the loop, and because it can log in, but not load the page, nothing happens - it just keeps reloading and printing that line in the log file. I'd expect after a few attempts, it would abort and try again on the next scheduled update (Which I set to hourly, as I don't need 15-minute granularity).

Here is a log file except:

INFO: Entering username (URL: https://login.xfinity.com/login)
INFO: Entering password (URL: https://login.xfinity.com/login)
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details
INFO: Didn't get usage data, reloading page (URL: https://customer.xfinity.com/#/devices#usage)
INFO: Updating Session Details
INFO: Updating Session Details

Perhaps as simple as using the retry annotation/decorator that I see used on other methods?

@thor0215
Copy link
Owner

thor0215 commented May 6, 2024

I'll add some logic so that it only retries at most 5 time before giving up.

@thor0215 thor0215 linked a pull request May 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants