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

Failing to Authenticate on 2024.3 #212

Closed
74Rog opened this issue Mar 11, 2024 · 22 comments
Closed

Failing to Authenticate on 2024.3 #212

74Rog opened this issue Mar 11, 2024 · 22 comments
Assignees

Comments

@74Rog
Copy link

74Rog commented Mar 11, 2024

The problem

My HA installation was failing to update to 2024.3 so I've redeployed from scratch and then restored from backup and then waas able to upgrade to 2024.3.
I get a message that I need to reauthenticate MercedesMe 2020, I get the email with the code and enter it but it fails to authenticate with the following error in the HA logs.

This error originated from a custom integration.

Logger: custom_components.mbapi2020
Source: custom_components/mbapi2020/init.py:63
integration: MercedesME 2020 (documentation, issues)
First occurred: 22:36:27 (2 occurrences)
Last logged: 22:37:21

Authentication failed. Please reauthenticate.

What version of MBAPI2020 do use?

v0.12.0

What was the last working version of MBAPI2020?

v0.11.1

What type of installation are you running?

Home Assistant OS

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

@ReneNulschDE
Copy link
Owner

Please enable the debug log, run the process again and share the log

@tbkon3
Copy link

tbkon3 commented Mar 12, 2024

same for me: the error is:
[%key:common::config_flow::abort::reauth_successful%]

@tbkon3
Copy link

tbkon3 commented Mar 12, 2024

Fixed:
Deleted the old "Hub", reboot and reconfigured, all ok!!!

@ReneNulschDE
Copy link
Owner

same for me: the error is:
[%key:common::config_flow::abort::reauth_successful%]

Do you still have the logs? This is a standard HA key and this one is used everywhere... What is youre HA version?

@74Rog
Copy link
Author

74Rog commented Mar 12, 2024

I've deleted and reinstalled now and it is fine.
It did start to get a bit weird as I had multiple reconfigure buttons in Devices and Services but all good now.

@churchofnoise
Copy link
Contributor

Seems to be occurring here too since the last update (2024.3.3?)

@ReneNulschDE
Copy link
Owner

ReneNulschDE commented Mar 26, 2024

Thanks, This is not related to 2024.3.3.

  • The multiple button problem is on my list.
  • Reauth-Problem: I assume that this happens after an upgrade of HA in an HAOS environment. Whenever the backup is not created near time (<10min) before the upgrade than there is a high risk that invalid keys are stored in the backup. (Reason: the auth and reauth keys are vaild for 120min only and are renewed every 110min)

Workaround currently: Delete integration in HA (not in HACS) and re-add integration after a restart.

@janwilms
Copy link

This is the error I got now

This error originated from a custom integration.

Logger: custom_components.mbapi2020.oauth
Source: custom_components/mbapi2020/oauth.py:312
integration: MercedesME 2020 (documentation, issues)
First occurred: 08:48:43 (3 occurrences)
Last logged: 08:52:47

Error requesting: https://id.mercedes-benz.com/as/token.oauth2 - 0 - {"error_description":"unknown, invalid, or expired refresh token","error":"invalid_grant"}

@ReneNulschDE
Copy link
Owner

In what context did you got this error? HA-Upgrade / Restore?

@Marijncouckuyt
Copy link

Marijncouckuyt commented Apr 3, 2024

I ran into the same problem after upgrading to 24.3.3.
It fails to reauth after removing the integration and reinstalling it.
Gives 'unknown error'

EDIT: retried few hours later and now works fine

@ReneNulschDE ReneNulschDE self-assigned this Apr 4, 2024
@j9brown
Copy link

j9brown commented Apr 7, 2024

Hmm, I understand why the auth tokens expire and may need to be refreshed after an update, but why does authentication still not work after the reconfigure task completes successfully?

@j9brown
Copy link

j9brown commented Apr 19, 2024

Still unable to re-authenticate in v0.13.

@ReneNulschDE
Copy link
Owner

I have made one change in v0.14-beta1 and try to read from the HA config store first instead of using the file cache... But still testing it on my instances.

@j9brown
Copy link

j9brown commented Apr 26, 2024

I noticed this in the beta release notes. Not sure whether it is relevant but it sounds superficially related: https://developers.home-assistant.io/blog/2024/04/25/always-reload-after-successful-reauth-flow/

@ReneNulschDE
Copy link
Owner

Sounds related but we want the reload after the auth issue. I changed the flow a little bit in the latest beta of the component. Now I try to load the tokens from the cache instead of the file system.

@DirkV71
Copy link

DirkV71 commented May 28, 2024

Problem to create new hub.

German Customer with *.com Email-Adress. Only can create a Hub for North America. But there it can´t find my car via VIN.

The log file throw this error:

Error requesting: https://bff.emea-prod.mobilesdk.mercedes-benz.com/v1/login - 0

Regards, Dirk

@Rainman67
Copy link

Rainman67 commented May 28, 2024

I have a german *.de E-Mail-Adress and exactly the same problem. Maybe the authentication-server of Mercedes is temporarily down?

Regards, Michael

@DirkV71
Copy link

DirkV71 commented May 28, 2024

Yes, thats a option. I downgrade the integration to Version 0.12 and the problem was still there. I will try it tomorow again...

@Andreasroessler248
Copy link

Hi Dirk some issue here started today in the morning. Seems to be a general issue.

@ReneNulschDE
Copy link
Owner

see here #231

@DirkV71
Copy link

DirkV71 commented May 28, 2024

Hi, check the bug fix manually. Works fine for me again!

image

@ReneNulschDE
Copy link
Owner

ReneNulschDE commented Jun 4, 2024

Will close this one. The first issue was a HA-core bug.

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

No branches or pull requests

10 participants