Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

MyQ API Error #1134

Closed
ghosilyk opened this issue Oct 20, 2023 · 5 comments
Closed

MyQ API Error #1134

ghosilyk opened this issue Oct 20, 2023 · 5 comments

Comments

@ghosilyk
Copy link

Describe The Problem:
Since the iOS latest update this plugin stopped working. It shows the following error:

myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity.

To Reproduce:

Logs:

[10/19/2023, 9:15:53 PM] [MyQ] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity.

Homebridge Configuration:

Config is standard, only info in there is my username and password.

Screenshots:

Environment:

  • Homebridge Version: 1. 6.1
  • Node Version: 18.18.2
  • Homebridge-myQ Plugin Version: 3.4.3
  • Apple Device and iOS / macOS / iPadOS / tvOS Version: iOS 17.0.3
  • Operating System and OS Version: Raspbian GNU/Linux Bullseye (11)
@Heralds01
Copy link

I just restored back to v3.4.1 and it is doing it there also. Thanks for logging, I was about to 👍

@spidercensus
Copy link

+1 I am experiencing the same issue on homebridge-myq v3.4.3

My log shows:

[10/19/2023, 10:52:13 PM] [myQ] myQ API: Unable to access the OAuth authorization endpoint.
[10/19/2023, 10:54:14 PM] [myQ] myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=(redacted)&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 429 

I notice that when I manually curl the URL above, I get sent through a cloudflare portal. I wonder if they've (MyQ) been getting DDoS'd and have implemented some rate-limiting security on their side.

@spidercensus
Copy link

spidercensus commented Oct 20, 2023

I notice retries are happening every 3 seconds on my instance.

[10/19/2023, 10:57:49 PM] [myQ] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity.
[10/19/2023, 10:57:50 PM] [myQ] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity.
[10/19/2023, 10:57:53 PM] [myQ] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity.

We may have a thundering herd issue wherein all the homebridge clients using MyQ are retrying and retrying without backing off, which could cause the API to rate-limit our client. Let's try implementing a random backoff timer for auth.

Edit: Actually this retry appears to be inside of the underlying library:
https://github.com/hjdhjd/myq/blob/99e39834767eff53c933bfdd19b4c31af4714de7/src/myq-api.ts#L909

This might be a little tricky because auth is implemented as a Promise and the retry can't be turned off. A change would have to be made upstream hjdhjd/myq.

To be honest, any retries wrapping a finicky API like MyQ's really should have exponential backoff.

@hjdhjd is this a feature you'd sign off on if I wrote it? I don't mind contributing.

@NathanBlais
Copy link

This is a copy of issue 1128 a lot of people are having this problem (including me) but the host has stated he is not interested in a fix as stated here.

myQ pulling some shenanigans no doubt. I can't speak for the guy but this will likely be closed soon.

@sapireli
Copy link

sapireli commented Oct 20, 2023

I believe he is actively working on a solution. This situation is constantly changing, and it's important to remember that he has a life beyond just working on the HomeKit garage door plugin. Someone mentioned that the problem might be related to Cloudflare's anti-bot measures. I genuinely empathize with him because he's receiving a lot of pressure. A few days ago, it appeared that the issue had been resolved, but unfortunately, it has resurfaced. It's worth noting that some users who haven't restarted Homebridge or needed to re-authenticate haven't experienced the issue when these reports were made and hence per his statement - at that time (3 days ago) there was nothing to fix.

@hjdhjd hjdhjd closed this as completed Oct 20, 2023
Repository owner locked and limited conversation to collaborators Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants