home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.53k stars 30.72k forks source link

Client error '429 Too Many Requests' for URL #122645

Closed DieterC1984 closed 3 months ago

DieterC1984 commented 3 months ago

The problem

Integrations got stuck for below reasons: MyBMWQuotaError due to HTTPStatusError: Client error '429 Too Many Requests' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

MyBMWAPIError due to HTTPStatusError: invalid_request - The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed

Auto polling is disabled and refresh only taking place every 10 min. Also not able to sign in on the integration anymore after deleting and reinstalling.

What version of Home Assistant Core has the issue?

2024.7.3

What was the last working version of Home Assistant Core?

2024.7.3

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

BMW Connected Drive

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bmw_connected_drive

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @gerard33, @rikroe, mind taking a look at this issue as it has been labeled with an integration (bmw_connected_drive) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `bmw_connected_drive` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bmw_connected_drive` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


bmw_connected_drive documentation bmw_connected_drive source (message by IssueLinks)

nareso commented 3 months ago

Same

jrverheij commented 3 months ago

same here, tried removing the integration (so that tokens might refresh), but no luck, re-adding isn't even possible anymore.

uphillbattle commented 3 months ago

The MyBMW app is not working, and neither iso logging in to Connected Drive using a web browser, so my guess is that BMW’s servers are down.

DieterC1984 commented 3 months ago

The MyBMW app is not working, and neither iso logging in to Connected Drive using a web browser, so my guess is that BMW’s servers are down.

Sorry, but my app itself is working fine...

uphillbattle commented 3 months ago

The MyBMW app is not working, and neither iso logging in to Connected Drive using a web browser, so my guess is that BMW’s servers are down.

Sorry, but my app itself is working fine...

Hm, maybe something regional as well, then. I’m in Norway and neither the app, a browser nor the integration work. The app claims I have no internet connection, which is clearly wrong since I’m posting this over the same network…

limitless00net commented 3 months ago

Same here

HTTPStatusError: Client error '429 Too Many Requests' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

uphillbattle commented 3 months ago

The MyBMW app is not working, and neither iso logging in to Connected Drive using a web browser, so my guess is that BMW’s servers are down.

Sorry, but my app itself is working fine...

Hm, maybe something regional as well, then. I’m in Norway and neither the app, a browser nor the integration work. The app claims I have no internet connection, which is clearly wrong since I’m posting this over the same network…

App is back up, but the integration still gives a 429

jb123567 commented 3 months ago

Same here in the UK, app seems fine

RuiSSousa commented 3 months ago

Same here in Portugal. Apps works fine.

rikroe commented 3 months ago

Didn't happen for me in Germany yet. However I had some 503 Server Errors this morning.

If you're stuck with the error, please try to disable the integration (no need deleting it) and try again tomorrow (or after 12am UTC).

Auka84 commented 3 months ago

Same for me in Belgium since yesterday

I had an update of the iOS app also yesterday. :-/

RuiSSousa commented 3 months ago

After midnight in Portugal:

MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

Edit: It's working after getting a new IP.

jb123567 commented 3 months ago

After midnight in Portugal:

MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

Same here in the UK. Tried to reset integration, just says authentication failed.

k-janssens commented 3 months ago

I had the same thing. Using the bimmerconnected CLI tool did work though. The authentication fail was still because of the 429 when I looked at the logs.

I fixed it by restarting my modem to get a new IP as the rate limiting could have been at IP level ... and this did the trick for me.

rikroe commented 3 months ago

If rate limiting applies on IP level, please make sure to disable the integration for some time. Otherwise it will try in the background every couple of minutes, prolonging the limit.

Auka84 commented 3 months ago

I had the same thing. Using the bimmerconnected CLI tool did work though. The authentication fail was still because of the 429 when I looked at the logs.

I fixed it by restarting my modem to get a new IP as the rate limiting could have been at IP level ... and this did the trick for me.

for me it's not a solution,i'll get the same IP :-/

k-janssens commented 3 months ago

Like rikroe says, disable the integration and wait for at least 24 hours before enabling it. I was just impatient and wanted to see if I could get it resolved sooner.

At least now know it ain't a new trick BMW made to prevent this from working :)

Btw, I only refresh my car's data every 10-30 minutes (depending if my car is charging or not) and I still got rate limited ...

jrverheij commented 3 months ago

After midnight in Portugal:

MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

Same here this morning when trying to re-login into the integration, as I tried removing the account before:

2024-07-27 09:37:12.399 ERROR (MainThread) [bimmer_connected.api.authentication] MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

Logging in into the app worked like a charm with this login.

rikroe commented 3 months ago

Could also be that BMW is deprecating old app versions. Will update the library soon (https://github.com/bimmerconnected/bimmer_connected/pull/638) and then put in an update for HA.

rikroe commented 3 months ago

The following might still apply even with the bugfix included (in 2024.7.4 or 2024.8).

If you're stuck with the error, please try to disable the integration (no need deleting it) and try again tomorrow (or after 12am UTC).

rikroe commented 3 months ago

Due to https://github.com/home-assistant/core/pull/122699#issuecomment-2255823253, this will only be available in 2024.8.

wagnst commented 2 months ago

just to let you know, same is happening to me now running on 2024.8.2. I'm not sure but i didnt experience that before. Waiting does not solve the issue unfortunately, neither changing the public IP. Either the API is gone or different or they limit based on the user?

jrverheij commented 2 months ago

Here it started again yesterday afternoon. Also on 2024.8.2. (since 2024.8 it was working fine)

2024-08-23 10:15:09.575 ERROR (MainThread) [bimmer_connected.api.authentication] MyBMWAPIError due to HTTPStatusError: invalid_request - The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed 2024-08-23 10:15:21.884 ERROR (MainThread) [bimmer_connected.api.authentication] MyBMWQuotaError due to HTTPStatusError: Client error '429 Too Many Requests' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

I tried disabling it yesterday evening, hoping for it to be working again today, but unfortunately no luck yet when I just tried.

Schermbecker commented 2 months ago

Same here. I found out, that myBMW app works fine but login to BMW website is not possible with the affected BMW ID.

Just contacted BMW support to check my account.

pavelgz commented 2 months ago

Same problem, started happening yesterday. Tried changing route to customer.bmwgroup.com host to check if it is IP-related, but the error stays.

rikroe commented 2 months ago

This is now tracked in https://github.com/home-assistant/core/issues/124464 (separate reason for issue I guess).

tl;dr: If you have the QuotaError, disable the integration and retry after 0:00 UTC.